setting xenpvh as os_type result in libvirt crash
Software environment
- Operating system: Arch Linux
- Architecture: x64
- kernel version: 5.19.13 (Dom0)
- libvirt version: 8.7.0 and 8.8.0
- Hypervisor and version: Xen 4.16.1 and Xen 4.16.2
Description of problem
After reconfiguring a Xen VM from type Xen PV to Xen PVH, libvirt crashes on VM start.
Steps to reproduce
- shutdown VM myvm
- virsh edit myvm
- change os type from Xen PV to Xen PVH, see additional info below.
- virsh start myvm
Additional info
Change OS type from Xen PV to Xen PVH
[user@xen1 ~]$ sudo virsh edit myvm
Domain 'myvm' XML configuration edited.
Before
<os>
<type arch='x86_64' machine='xenpv'>linux</type>
</os>
After
<os>
<type arch='x86_64' machine='xenpv'>xenpvh</type>
</os>
Start the VM
[user@xen1 ~]$ sudo virsh start myvm
error: Disconnected from xen:///system due to end of file
error: Failed to start domain 'myvm'
error: End of file while reading data: Input/output error
xl list - shows a 'death' VM which I kill with xl destroy vm-id
[user@xen1 ~]$ sudo xl list
Name ID Mem VCPUs State Time(s)
Domain-0 0 8192 12 r----- 14987.7
xxxxxxx 1 512 1 -b---- 1516.3
xxxxxxx 2 8098 4 -b---- 31768.4
xxxxxxx 3 8192 2 -b---- 8934.3
xxxxxxx 4 4096 2 -b---- 5427.4
xxxxxxx 6 512 1 -b---- 997.7
xxxxxxx 7 8192 4 r----- 25707.5
xxxxxxx 8 10240 4 -b---- 87067.6
xxxxxxx 9 5120 1 r----- 17191.1
myvm 16 0 0 --p--- 0.0
[user@xen1 ~]$ sudo xl destroy 16
Revert the change
[user@xen1 ~]$ sudo virsh edit myvm
Domain 'myvm' XML configuration edited.
Start the VM myvm
[user@xen1 ~]$ sudo virsh start myvm
Domain 'myvm' started
systemd-journal shows
libvirtd: libxl_dom.c:948: libxl__domain_firmware: Assertion `info->type == LIBXL_DOMAIN_TYPE_HVM' failed.
followed by a core dump of libvirtd, see systemd-journal.txt, starting at line 5234.
Edited by Arthur Borsboom