]> git.proxmox.com Git - qemu-server.git/commit
cfg2cmd: support USB 3 SPICE ports with 4.0 machine feature
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 26 Sep 2019 08:54:05 +0000 (10:54 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 26 Sep 2019 09:54:53 +0000 (11:54 +0200)
commit733234be04d585febd74c655d8b82d17ebf9e133
tree7f0513ebe275b3d05a692960289697a848429bc1
parentfce8336a00bbdd2d27ef1af42872ff51862893c0
cfg2cmd: support USB 3 SPICE ports with 4.0 machine feature

The reason for why we did not do this in the first place was the fact
that the "usb3" flag could be set in older qemu-server versions, we
just ignored it but not filtered it out of the config..

That means there can be VMs out there which would now become a
different HW layout, and issue for migration and live-snapshot
restore.

But, actually, while the "usb3" property could be set it allowed to
start the VM in only if an additional USB devices was added to the VM
with USB2, or the VM uses "q35" based machine - as else no "ehci" was
available, and thus the "ignored" USB3 - SPICE could not get attached
anywhere -> QEMU chickened out.

And if a user had a configuration where this could started we have
still a bit luck, live-migration was not possible as the "can't
migrate VM which uses local devices:" check still hit, as in
qemu-server older than 6.0-8 we explicitly checked for "spice" when
seeing what usb device were not local, so a "spice,usb3=X" was always
(luckily) wrongly detected as local device -> migration was blocked.

So we only have one case left: restoring a live-snapshot. Here sadly
there seems no way out, it was possible to do with a "spice,usb3=1"
usb device, and thus all Snapshots taken on such VMs after they had a
clean restart on PVE 6 (to have a machine version >= 4.0) are broken
- but can be easily fixed by removing the "usb3=1" from the
problematic snapshot config.
As restoring a snapshot can be repeated more than once even on
failure without rendering the snapshot or VM permanently unusable,
this should be a reasonable compromise.

I strongly believe that the chance is so small that no one is
affected in practice and the property description mentioned that it
was not supported. If anybody is affected on snapshot restore we can
help them on a case-per-case basis.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/QemuServer.pm
test/cfg2cmd/spice-usb3.conf