1 minute read

For a while, I’ve been having issues when soft rebooting some of my older KVM guest machines: They would hang on reboot, and when connecting to the VM console via the Virtual Machine Manager, it was obvious that they had hung before the POST screen. It only happened on Q35 UEFI machines, and only, as mentioned, on older ones, so after some digging I started suspecting I could have an issue with the virtual machine version.

I used Virtual Machine Manager to edit the XML of one of the problematic machines, and located the relevant section:

<type arch="x86_64" machine="pc-q35-4.2">hvm</type>

Next question was what version to choose. I tried the kvm command on the hypervisor and quickly found the correct parameters to use, and then also the answer to my question:

$ kvm -machine help
Supported machines are:
(...)
q35                  Standard PC (Q35 + ICH9, 2009) (alias of pc-q35-6.2)
(...)

I replaced the relevant part of the VM definition XML, changing the machine part:

<type arch="x86_64" machine="q35">hvm</type>

Upon applying the change, the line auto changed into the expected pc-q35-6.2.

The VM had to be fully stopped and restarted for the change to apply, but after that, it could soft reboot from the command line with no issues, so I performed the same change to the other VMs that had the same problem.

The real test will be to see how they behave after the next unattended upgrade, but so far so good.

Categories:

Updated: