Pino Toscano
2018-Jul-13 11:28 UTC
[Libguestfs] [PATCH 1/2] Revert "v2v: oVirt changed the ResourceType for QXL video devices (RHBZ#1598715)."
The change is not correct in case the OVF is used in -o vdsm mode, for example. Let's revert it, and then implement it properly. This reverts commit 296b2f66c71df0bf5ee2ee605fe4b92672796ab3. --- v2v/create_ovf.ml | 2 +- v2v/test-v2v-o-rhv.ovf.expected | 2 +- v2v/test-v2v-o-vdsm-options.ovf.expected | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/v2v/create_ovf.ml b/v2v/create_ovf.ml index 1cba165a4..901d47528 100644 --- a/v2v/create_ovf.ml +++ b/v2v/create_ovf.ml @@ -646,7 +646,7 @@ let rec create_ovf source targets guestcaps inspect e "Item" [] [ e "rasd:Caption" [] [PCData "Graphical Controller"]; e "rasd:InstanceId" [] [PCData (uuidgen ())]; - e "rasd:ResourceType" [] [PCData "32768"]; + e "rasd:ResourceType" [] [PCData "20"]; e "Type" [] [PCData "video"]; e "rasd:VirtualQuantity" [] [PCData "1"]; e "rasd:Device" [] [PCData "qxl"]; diff --git a/v2v/test-v2v-o-rhv.ovf.expected b/v2v/test-v2v-o-rhv.ovf.expected index 2f1032b1f..7bcc456c5 100644 --- a/v2v/test-v2v-o-rhv.ovf.expected +++ b/v2v/test-v2v-o-rhv.ovf.expected @@ -56,7 +56,7 @@ <Item> <rasd:Caption>Graphical Controller</rasd:Caption> <rasd:InstanceId>#UUID#</rasd:InstanceId> - <rasd:ResourceType>32768</rasd:ResourceType> + <rasd:ResourceType>20</rasd:ResourceType> <Type>video</Type> <rasd:VirtualQuantity>1</rasd:VirtualQuantity> <rasd:Device>qxl</rasd:Device> diff --git a/v2v/test-v2v-o-vdsm-options.ovf.expected b/v2v/test-v2v-o-vdsm-options.ovf.expected index abaf37e54..c1282c19b 100644 --- a/v2v/test-v2v-o-vdsm-options.ovf.expected +++ b/v2v/test-v2v-o-vdsm-options.ovf.expected @@ -56,7 +56,7 @@ <Item> <rasd:Caption>Graphical Controller</rasd:Caption> <rasd:InstanceId>#UUID#</rasd:InstanceId> - <rasd:ResourceType>32768</rasd:ResourceType> + <rasd:ResourceType>20</rasd:ResourceType> <Type>video</Type> <rasd:VirtualQuantity>1</rasd:VirtualQuantity> <rasd:Device>qxl</rasd:Device> -- 2.17.1
Pino Toscano
2018-Jul-13 11:28 UTC
[Libguestfs] [PATCH 2/2] v2v: change QXL ResourceType in OVirt flavour (RHBZ#1598715)
Due to a conflict with the IDs of the OVF standard, and the existing implementation in ovirt-engine, the ID of QXL devices changed to a different value. As a consequence, change the ResourceType of QXL devices, but only in OVirt flavour to avoid breaking vdsm mode. See: https://bugzilla.redhat.com/show_bug.cgi?id=1598715#c5 --- v2v/create_ovf.ml | 6 +++++- v2v/test-v2v-o-vdsm-options.ovf.expected | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/v2v/create_ovf.ml b/v2v/create_ovf.ml index 901d47528..2cf610333 100644 --- a/v2v/create_ovf.ml +++ b/v2v/create_ovf.ml @@ -643,10 +643,14 @@ let rec create_ovf source targets guestcaps inspect * See RHBZ#1213701 and RHBZ#1211231 for the reasoning * behind that. *) + let qxl_resourcetype + match ovf_flavour with + | OVirt -> 32768 (* RHBZ#1598715 *) + | RHVExportStorageDomain -> 20 in e "Item" [] [ e "rasd:Caption" [] [PCData "Graphical Controller"]; e "rasd:InstanceId" [] [PCData (uuidgen ())]; - e "rasd:ResourceType" [] [PCData "20"]; + e "rasd:ResourceType" [] [PCData (string_of_int qxl_resourcetype)]; e "Type" [] [PCData "video"]; e "rasd:VirtualQuantity" [] [PCData "1"]; e "rasd:Device" [] [PCData "qxl"]; diff --git a/v2v/test-v2v-o-vdsm-options.ovf.expected b/v2v/test-v2v-o-vdsm-options.ovf.expected index c1282c19b..abaf37e54 100644 --- a/v2v/test-v2v-o-vdsm-options.ovf.expected +++ b/v2v/test-v2v-o-vdsm-options.ovf.expected @@ -56,7 +56,7 @@ <Item> <rasd:Caption>Graphical Controller</rasd:Caption> <rasd:InstanceId>#UUID#</rasd:InstanceId> - <rasd:ResourceType>20</rasd:ResourceType> + <rasd:ResourceType>32768</rasd:ResourceType> <Type>video</Type> <rasd:VirtualQuantity>1</rasd:VirtualQuantity> <rasd:Device>qxl</rasd:Device> -- 2.17.1
Richard W.M. Jones
2018-Jul-13 16:03 UTC
Re: [Libguestfs] [PATCH 2/2] v2v: change QXL ResourceType in OVirt flavour (RHBZ#1598715)
On Fri, Jul 13, 2018 at 01:28:21PM +0200, Pino Toscano wrote:> Due to a conflict with the IDs of the OVF standard, and the existing > implementation in ovirt-engine, the ID of QXL devices changed to a > different value. > > As a consequence, change the ResourceType of QXL devices, but only in > OVirt flavour to avoid breaking vdsm mode. > > See: https://bugzilla.redhat.com/show_bug.cgi?id=1598715#c5 > --- > v2v/create_ovf.ml | 6 +++++- > v2v/test-v2v-o-vdsm-options.ovf.expected | 2 +- > 2 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/v2v/create_ovf.ml b/v2v/create_ovf.ml > index 901d47528..2cf610333 100644 > --- a/v2v/create_ovf.ml > +++ b/v2v/create_ovf.ml > @@ -643,10 +643,14 @@ let rec create_ovf source targets guestcaps inspect > * See RHBZ#1213701 and RHBZ#1211231 for the reasoning > * behind that. > *) > + let qxl_resourcetype > + match ovf_flavour with > + | OVirt -> 32768 (* RHBZ#1598715 *) > + | RHVExportStorageDomain -> 20 in > e "Item" [] [ > e "rasd:Caption" [] [PCData "Graphical Controller"]; > e "rasd:InstanceId" [] [PCData (uuidgen ())]; > - e "rasd:ResourceType" [] [PCData "20"]; > + e "rasd:ResourceType" [] [PCData (string_of_int qxl_resourcetype)]; > e "Type" [] [PCData "video"]; > e "rasd:VirtualQuantity" [] [PCData "1"]; > e "rasd:Device" [] [PCData "qxl"]; > diff --git a/v2v/test-v2v-o-vdsm-options.ovf.expected b/v2v/test-v2v-o-vdsm-options.ovf.expected > index c1282c19b..abaf37e54 100644 > --- a/v2v/test-v2v-o-vdsm-options.ovf.expected > +++ b/v2v/test-v2v-o-vdsm-options.ovf.expected > @@ -56,7 +56,7 @@ > <Item> > <rasd:Caption>Graphical Controller</rasd:Caption> > <rasd:InstanceId>#UUID#</rasd:InstanceId> > - <rasd:ResourceType>20</rasd:ResourceType> > + <rasd:ResourceType>32768</rasd:ResourceType> > <Type>video</Type> > <rasd:VirtualQuantity>1</rasd:VirtualQuantity> > <rasd:Device>qxl</rasd:Device> > -- > 2.17.1ACK Note that I pushed the revert commit already, before I saw this email. Thanks, Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/
Reasonably Related Threads
- [PATCH 2/2] v2v: change QXL ResourceType in OVirt flavour (RHBZ#1598715)
- [PATCH] v2v: oVirt changed the ResourceType for QXL video devices (RHBZ#1598715).
- [PATCH 0/3] Make generated OVF more conforming to standard
- [PATCH v2 0/3] Make generated OVF more conforming to standard
- [PATCH] v2v: ovf: Add virtio-rng and memory balloon device