Laszlo Ersek
2021-Nov-13 22:29 UTC
[Libguestfs] [virt-v2v wave 2 PATCH v1 08/16] lib/create_ovf: place a standard VGA video device in the OVF xml
As of ovirt-engine commit daca2ca6cd91, ovirt-engine ignores <rasd:Device>qxl</rasd:Device> entirely; ovirt-engine picks the QXL device based on other factors. In preparation for ovirt-engine honoring <rasd:Device>, and in particular for selecting VGA over QXL as a policy change, replace the element's contents "qxl" with "vga". (The latter is a part of ovirt-engine's VmDeviceType enum type just the same.) Reference: [Libguestfs] specifying a standard VGA video controller in OVF for oVirt https://listman.redhat.com/archives/libguestfs/2021-November/msg00149.html Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1961107 Signed-off-by: Laszlo Ersek <lersek at redhat.com> --- Notes: v1: - new in v1 lib/create_ovf.ml | 11 +++++++---- tests/test-v2v-o-rhv.ovf.expected | 2 +- tests/test-v2v-o-vdsm-options.ovf.expected | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/create_ovf.ml b/lib/create_ovf.ml index 8c8ef43a42cd..6ccea1e9e6d7 100644 --- a/lib/create_ovf.ml +++ b/lib/create_ovf.ml @@ -675,9 +675,12 @@ let rec create_ovf source inspect e "rasd:UsbPolicy" [] [PCData "Disabled"]; ]; - (* We always add a qxl device when outputting to RHV. - * See RHBZ#1213701 and RHBZ#1211231 for the reasoning - * behind that. + (* We always add a standard VGA-compatible video controller when + * outputting to RHV. See RHBZ#1213701 and RHBZ#1211231 for the + * reasoning behind that. The device model used to be QXL previously, + * but only the unaccelerated standard VGA framebuffer is needed; so + * the (simpler) standard VGA device itself suffices. Refer to + * RHBZ#1961107. *) let monitor_resourcetype match ovf_flavour with @@ -690,7 +693,7 @@ let rec create_ovf source inspect [PCData (string_of_int monitor_resourcetype)]; e "Type" [] [PCData "video"]; e "rasd:VirtualQuantity" [] [PCData "1"]; - e "rasd:Device" [] [PCData "qxl"]; + e "rasd:Device" [] [PCData "vga"]; ] ]; diff --git a/tests/test-v2v-o-rhv.ovf.expected b/tests/test-v2v-o-rhv.ovf.expected index f8aa07c45d4c..a8f5ebdfc7e9 100644 --- a/tests/test-v2v-o-rhv.ovf.expected +++ b/tests/test-v2v-o-rhv.ovf.expected @@ -60,7 +60,7 @@ <rasd:ResourceType>20</rasd:ResourceType> <Type>video</Type> <rasd:VirtualQuantity>1</rasd:VirtualQuantity> - <rasd:Device>qxl</rasd:Device> + <rasd:Device>vga</rasd:Device> </Item> <Item> <rasd:Caption>RNG Device</rasd:Caption> diff --git a/tests/test-v2v-o-vdsm-options.ovf.expected b/tests/test-v2v-o-vdsm-options.ovf.expected index f861071c08c3..a2a26a839462 100644 --- a/tests/test-v2v-o-vdsm-options.ovf.expected +++ b/tests/test-v2v-o-vdsm-options.ovf.expected @@ -60,7 +60,7 @@ <rasd:ResourceType>32768</rasd:ResourceType> <Type>video</Type> <rasd:VirtualQuantity>1</rasd:VirtualQuantity> - <rasd:Device>qxl</rasd:Device> + <rasd:Device>vga</rasd:Device> </Item> <Item> <rasd:Caption>RNG Device</rasd:Caption> -- 2.19.1.3.g30247aa5d201
Laszlo Ersek
2021-Nov-23 12:36 UTC
[Libguestfs] [virt-v2v wave 2 PATCH v1 08/16] lib/create_ovf: place a standard VGA video device in the OVF xml
On 11/13/21 23:29, Laszlo Ersek wrote:> As of ovirt-engine commit daca2ca6cd91, ovirt-engine ignores > > <rasd:Device>qxl</rasd:Device> > > entirely; ovirt-engine picks the QXL device based on other factors. In > preparation for ovirt-engine honoring <rasd:Device>, and in particular for > selecting VGA over QXL as a policy change, replace the element's contents > "qxl" with "vga". (The latter is a part of ovirt-engine's VmDeviceType > enum type just the same.) > > Reference: > [Libguestfs] specifying a standard VGA video controller in OVF for oVirt > https://listman.redhat.com/archives/libguestfs/2021-November/msg00149.html > > Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1961107 > Signed-off-by: Laszlo Ersek <lersek at redhat.com> > --- > > Notes: > v1: > > - new in v1 > > lib/create_ovf.ml | 11 +++++++---- > tests/test-v2v-o-rhv.ovf.expected | 2 +- > tests/test-v2v-o-vdsm-options.ovf.expected | 2 +- > 3 files changed, 9 insertions(+), 6 deletions(-) > > diff --git a/lib/create_ovf.ml b/lib/create_ovf.ml > index 8c8ef43a42cd..6ccea1e9e6d7 100644 > --- a/lib/create_ovf.ml > +++ b/lib/create_ovf.ml > @@ -675,9 +675,12 @@ let rec create_ovf source inspect > e "rasd:UsbPolicy" [] [PCData "Disabled"]; > ]; > > - (* We always add a qxl device when outputting to RHV. > - * See RHBZ#1213701 and RHBZ#1211231 for the reasoning > - * behind that. > + (* We always add a standard VGA-compatible video controller when > + * outputting to RHV. See RHBZ#1213701 and RHBZ#1211231 for the > + * reasoning behind that. The device model used to be QXL previously, > + * but only the unaccelerated standard VGA framebuffer is needed; so > + * the (simpler) standard VGA device itself suffices. Refer to > + * RHBZ#1961107. > *) > let monitor_resourcetype > match ovf_flavour with > @@ -690,7 +693,7 @@ let rec create_ovf source inspect > [PCData (string_of_int monitor_resourcetype)]; > e "Type" [] [PCData "video"]; > e "rasd:VirtualQuantity" [] [PCData "1"]; > - e "rasd:Device" [] [PCData "qxl"]; > + e "rasd:Device" [] [PCData "vga"]; > ] > ]; > > diff --git a/tests/test-v2v-o-rhv.ovf.expected b/tests/test-v2v-o-rhv.ovf.expected > index f8aa07c45d4c..a8f5ebdfc7e9 100644 > --- a/tests/test-v2v-o-rhv.ovf.expected > +++ b/tests/test-v2v-o-rhv.ovf.expected > @@ -60,7 +60,7 @@ > <rasd:ResourceType>20</rasd:ResourceType> > <Type>video</Type> > <rasd:VirtualQuantity>1</rasd:VirtualQuantity> > - <rasd:Device>qxl</rasd:Device> > + <rasd:Device>vga</rasd:Device> > </Item> > <Item> > <rasd:Caption>RNG Device</rasd:Caption> > diff --git a/tests/test-v2v-o-vdsm-options.ovf.expected b/tests/test-v2v-o-vdsm-options.ovf.expected > index f861071c08c3..a2a26a839462 100644 > --- a/tests/test-v2v-o-vdsm-options.ovf.expected > +++ b/tests/test-v2v-o-vdsm-options.ovf.expected > @@ -60,7 +60,7 @@ > <rasd:ResourceType>32768</rasd:ResourceType> > <Type>video</Type> > <rasd:VirtualQuantity>1</rasd:VirtualQuantity> > - <rasd:Device>qxl</rasd:Device> > + <rasd:Device>vga</rasd:Device> > </Item> > <Item> > <rasd:Caption>RNG Device</rasd:Caption> >Based on feedback from Liran and Arik, here: https://bugzilla.redhat.com/show_bug.cgi?id=1976607#c3 https://bugzilla.redhat.com/show_bug.cgi?id=1976607#c4 I should use <Device>vga</Device> not <rasd:Device>vga</rasd:Device> and then ovirt-engine already has code to handle that. Liran: in comment 3 on the above BZ, you provide the snippet <Item> <rasd:Caption>Graphical Controller</rasd:Caption> <rasd:InstanceID>2834786b-e9d0-4419-8e6a-c4843fed2f9c</rasd:InstanceID> <rasd:ResourceType>32768</rasd:ResourceType> <rasd:VirtualQuantity>1</rasd:VirtualQuantity> <rasd:SinglePciQxl>false</rasd:SinglePciQxl> <Type>video</Type> <Device>vga</Device> <rasd:Address></rasd:Address> <BootOrder>0</BootOrder> <IsPlugged>true</IsPlugged> <IsReadOnly>false</IsReadOnly> <Alias></Alias> <SpecParams> <vram>16384</vram> </SpecParams> </Item>>From these, virt-v2v does not provide the following at all:- rasd:SinglePciQxl - rasd:Address - BootOrder - IsPlugged - IsReadOnly - Alias - SpecParams (with child node "vram") Are any of these required, in addition to <Device>vga</Device>? Thanks, Laszlo