[pve-devel] [PATCH qemu-server] Fix: cpu hotplug feature can't be changed online

Fiona Ebner f.ebner at proxmox.com
Wed Oct 11 14:30:50 CEST 2023


Am 10.10.23 um 17:37 schrieb Alexandre Derumier:
> The cpus are passed as devices with specific id only when cpu hotplug is enable
> at start.
> We can't enable/disable it online or vcpu hotplug api will thrown errors
> not finding core id.

When removing cores after enabling the option this is true, but I can
1. start a VM without CPU hotplug and fewer than max vCPUs
2. enable CPU hotplug
3. add more cores

And doing the disable of the option online also doesn't seem problematic
at a first glance. So I thought this would technically be a breaking change.

But actually, the change is completely justified, because of migration.
Because the QEMU commandline changes based on the hotplug setting, so
the source and target VM will not agree and loading the state on the
target will get confused and crash:

> Oct 11 14:08:23 pve8a2 QEMU[160882]: kvm: get_pci_config_device: Bad config data: i=0x9a read: 8 device: 3 cmask: ff wmask: 0 w1cmask:0
> Oct 11 14:08:23 pve8a2 QEMU[160882]: kvm: Failed to load PCIDevice:config
> Oct 11 14:08:23 pve8a2 QEMU[160882]: kvm: Failed to load virtio-scsi:virtio
> Oct 11 14:08:23 pve8a2 QEMU[160882]: kvm: error while loading state for instance 0x0 of device '0000:00:05.0/virtio-scsi'
> Oct 11 14:08:23 pve8a2 QEMU[160882]: kvm: load of migration failed: Invalid argument

Therefore,
Reviewed-by: Fiona Ebner <f.ebner at proxmox.com>





More information about the pve-devel mailing list