From Piotr Kliczewski <piotr.kliczewski(a)gmail.com>:
Piotr Kliczewski has submitted this change and it was merged.
Change subject: core: make the unmanaged usb controller to be managed
core: make the unmanaged usb controller to be managed
- a VM is started on an older (pre 4.0) engine
- in this engine, if the USB is configured as disabled, no USB device is sent
- libvirt reacts by creating a new unmanaged USB controller
- this controller appears in engine as an unmanaged device
- after updating the engine, update of all VMs is called to modify the devices
according to the need of the new engine
- this code adds a managed USB controller
- in this stage, this VM has 2 USB controllers, one managed and one unmanaged
- from this point, anytime the USB devices are about to be touched (e.g.
creating a new template from this VM or from a snapshot of the VM) a sanity
check checking that there is only 1 USB controller fails throwing an exception
The fix is to detect that the unmanaged device is the one created by
libvirt and adopt it as ours.
If there are two usb controller for the VM:
* managed, unplugged
* unmanaged, plugged
and a snapshot is made and then previewed, the VM has two managed usb
controllers. It is caused by the fact that OVF doesn't store 'managed'
To mitigate this, every time normal usb controllers are updated and
there are more then one managed controller, all controllers are removed
and the proper one is recreated.
Signed-off-by: Tomas Jelinek <tjelinek(a)redhat.com>
Signed-off-by: Jakub Niedermertl <jniederm(a)redhat.com>
1 file changed, 55 insertions(+), 13 deletions(-)
Jakub Niedermertl: Verified
Jenkins CI: Passed CI tests
Arik Hadas: Looks good to me, approved
To view, visit https://gerrit.ovirt.org/75713
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-Owner: Jakub Niedermertl <jniederm(a)redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Jakub Niedermertl <jniederm(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>