UnicodeEncodeError in starting imported VM in R4.2

This may be a subject to open an issue, but first I’d like to hear from you how could I troubleshoot this.

I recently installed R4.2-rc2 and imported some VMs of my previous installation (R4.1). The original VM was using the fedora-37-xfce template and when importing it migrated to fedora-38-template.

When starting the VM, an exception is raised as informed in journalctl: UnicodeEncodeError: 'ascii' codec can't encode character '\xed' in position 54: ordinal not in range(128), as provided below.

I checked the related code in the qubes-core-admin repository, it was not changed recently, so at least in this part of the code, the error is not related to the R4.2 release.

No logs for the VM are created, because it was not started, this information in journalctl is everything I have for now. I tried starting the VM in debug mode as well, no difference.

(dom0 was installed in Portuguese due to the locale selection from the installer, my previous installation was in English. I don’t think this could create any problems).

set 16 09:33:32 dom0 libvirtd[3021]: erro interno: libxenlight falhou ao criar o domínio novo 'sangha'
set 16 09:33:32 dom0 qubesd[3438]: vm.sangha: Start failed: erro interno: libxenlight falhou ao criar o domínio novo 'sangha'
set 16 09:33:32 dom0 qubesd[3438]: unhandled exception while calling src=b'dom0' meth=b'admin.vm.Start' dest=b'sangha' arg=b'' len(untrusted_payload)=0
set 16 09:33:32 dom0 qubesd[3438]: Traceback (most recent call last):
set 16 09:33:32 dom0 qubesd[3438]:   File "/usr/lib/python3.11/site-packages/qubes/vm/qubesvm.py", line 1198, in start
set 16 09:33:32 dom0 qubesd[3438]:     self.libvirt_domain.createWithFlags(
set 16 09:33:32 dom0 qubesd[3438]:   File "/usr/lib/python3.11/site-packages/qubes/app.py", line 103, in wrapper
set 16 09:33:32 dom0 qubesd[3438]:     return attr(*args, **kwargs)
set 16 09:33:32 dom0 qubesd[3438]:            ^^^^^^^^^^^^^^^^^^^^^
set 16 09:33:32 dom0 qubesd[3438]:   File "/usr/lib64/python3.11/site-packages/libvirt.py", line 1409, in createWithFlags
set 16 09:33:32 dom0 qubesd[3438]:     raise libvirtError('virDomainCreateWithFlags() failed')
set 16 09:33:32 dom0 qubesd[3438]: libvirt.libvirtError: erro interno: libxenlight falhou ao criar o domínio novo 'sangha'
set 16 09:33:32 dom0 qubesd[3438]: During handling of the above exception, another exception occurred:
set 16 09:33:32 dom0 qubesd[3438]: Traceback (most recent call last):
set 16 09:33:32 dom0 qubesd[3438]:   File "/usr/lib/python3.11/site-packages/qubes/api/__init__.py", line 297, in respond
set 16 09:33:32 dom0 qubesd[3438]:     response = await self.mgmt.execute(
set 16 09:33:32 dom0 qubesd[3438]:                ^^^^^^^^^^^^^^^^^^^^^^^^
set 16 09:33:32 dom0 qubesd[3438]:   File "/usr/lib/python3.11/site-packages/qubes/api/admin.py", line 862, in vm_start
set 16 09:33:32 dom0 qubesd[3438]:     await self.dest.start()
set 16 09:33:32 dom0 qubesd[3438]:   File "/usr/lib/python3.11/site-packages/qubes/vm/qubesvm.py", line 1215, in start
set 16 09:33:32 dom0 qubesd[3438]:     await self.fire_event_async('domain-start-failed',
set 16 09:33:32 dom0 qubesd[3438]:   File "/usr/lib/python3.11/site-packages/qubes/events.py", line 227, in fire_event_async
set 16 09:33:32 dom0 qubesd[3438]:     sync_effects, async_effects = self._fire_event(event,
set 16 09:33:32 dom0 qubesd[3438]:                                   ^^^^^^^^^^^^^^^^^^^^^^^
set 16 09:33:32 dom0 qubesd[3438]:   File "/usr/lib/python3.11/site-packages/qubes/events.py", line 164, in _fire_event
set 16 09:33:32 dom0 qubesd[3438]:     effect = func(self, event, **kwargs)
set 16 09:33:32 dom0 qubesd[3438]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
set 16 09:33:32 dom0 qubesd[3438]:   File "/usr/lib/python3.11/site-packages/qubes/api/admin.py", line 70, in vm_handler
set 16 09:33:32 dom0 qubesd[3438]:     self.send_event(subject, event, **kwargs)
set 16 09:33:32 dom0 qubesd[3438]:   File "/usr/lib/python3.11/site-packages/qubes/api/__init__.py", line 374, in send_event
set 16 09:33:32 dom0 qubesd[3438]:     self.transport.write('{}\0{}\0'.format(k, str(v)).encode('ascii'))
set 16 09:33:32 dom0 qubesd[3438]:                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
set 16 09:33:32 dom0 qubesd[3438]: UnicodeEncodeError: 'ascii' codec can't encode character '\xed' in position 54: ordinal not in range(128)

Had the same problem.
I reinstalled Qubes on the same drive.
It seems, the installer did not purge the old installation and installed just the deltas.
Results is a mismatch.

Solution:
I wiped the drive with gparted. (New partition table)
And did a new clean installation.

Anything is fine again.