Pino Toscano
2015-Oct-22 12:24 UTC
[Libguestfs] [PATCH] v2v: -o libvirt: fix <video> element (RHBZ#1225789)
Create the correct tags for <video> in the libvirtxml, so all the attributes are in a <model> child of <video> instead of <video> itself. Adapt the XML of test-v2v-i-ova to the different expected XML. --- v2v/output_libvirt.ml | 9 +++++---- v2v/test-v2v-i-ova.xml | 4 +++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/v2v/output_libvirt.ml b/v2v/output_libvirt.ml index 0255e15..abdd410 100644 --- a/v2v/output_libvirt.ml +++ b/v2v/output_libvirt.ml @@ -223,16 +223,17 @@ let create_libvirt_xml ?pool source target_buses guestcaps * missing from the old metadata. *) let video, graphics - let video, graphics + let video_model, graphics match guestcaps.gcaps_video with | QXL -> - e "video" [ "type", "qxl"; "ram", "65536" ] [], + e "model" [ "type", "qxl"; "ram", "65536" ] [], e "graphics" [ "type", "vnc" ] [] | Cirrus -> - e "video" [ "type", "cirrus"; "vram", "9216" ] [], + e "model" [ "type", "cirrus"; "vram", "9216" ] [], e "graphics" [ "type", "spice" ] [] in - append_attr ("heads", "1") video; + append_attr ("heads", "1") video_model; + let video = e "video" [] [ video_model ] in (match source.s_display with | Some { s_keymap = Some km } -> append_attr ("keymap", km) graphics diff --git a/v2v/test-v2v-i-ova.xml b/v2v/test-v2v-i-ova.xml index 2eeff83..bb765e3 100644 --- a/v2v/test-v2v-i-ova.xml +++ b/v2v/test-v2v-i-ova.xml @@ -33,7 +33,9 @@ <source network='Ethernet 1'/> <model type='virtio'/> </interface> - <video type='qxl' ram='65536' heads='1'/> + <video> + <model type='qxl' ram='65536' heads='1'/> + </video> <graphics type='vnc' autoport='yes' port='-1'/> <input type='tablet' bus='usb'/> <input type='mouse' bus='ps2'/> -- 2.1.0
Richard W.M. Jones
2015-Oct-22 15:36 UTC
Re: [Libguestfs] [PATCH] v2v: -o libvirt: fix <video> element (RHBZ#1225789)
On Thu, Oct 22, 2015 at 02:24:46PM +0200, Pino Toscano wrote:> Create the correct tags for <video> in the libvirtxml, so all the > attributes are in a <model> child of <video> instead of <video> itself. > > Adapt the XML of test-v2v-i-ova to the different expected XML. > --- > v2v/output_libvirt.ml | 9 +++++---- > v2v/test-v2v-i-ova.xml | 4 +++- > 2 files changed, 8 insertions(+), 5 deletions(-) > > diff --git a/v2v/output_libvirt.ml b/v2v/output_libvirt.ml > index 0255e15..abdd410 100644 > --- a/v2v/output_libvirt.ml > +++ b/v2v/output_libvirt.ml > @@ -223,16 +223,17 @@ let create_libvirt_xml ?pool source target_buses guestcaps > * missing from the old metadata. > *) > let video, graphics > - let video, graphics > + let video_model, graphics > match guestcaps.gcaps_video with > | QXL -> > - e "video" [ "type", "qxl"; "ram", "65536" ] [], > + e "model" [ "type", "qxl"; "ram", "65536" ] [], > e "graphics" [ "type", "vnc" ] [] > | Cirrus -> > - e "video" [ "type", "cirrus"; "vram", "9216" ] [], > + e "model" [ "type", "cirrus"; "vram", "9216" ] [], > e "graphics" [ "type", "spice" ] [] in > > - append_attr ("heads", "1") video; > + append_attr ("heads", "1") video_model; > + let video = e "video" [] [ video_model ] in > > (match source.s_display with > | Some { s_keymap = Some km } -> append_attr ("keymap", km) graphics > diff --git a/v2v/test-v2v-i-ova.xml b/v2v/test-v2v-i-ova.xml > index 2eeff83..bb765e3 100644 > --- a/v2v/test-v2v-i-ova.xml > +++ b/v2v/test-v2v-i-ova.xml > @@ -33,7 +33,9 @@ > <source network='Ethernet 1'/> > <model type='virtio'/> > </interface> > - <video type='qxl' ram='65536' heads='1'/> > + <video> > + <model type='qxl' ram='65536' heads='1'/> > + </video> > <graphics type='vnc' autoport='yes' port='-1'/> > <input type='tablet' bus='usb'/> > <input type='mouse' bus='ps2'/>ACK. This was correct in virt-v2v 0.9, broken when I translated it ... Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top
Possibly Parallel Threads
- [PATCH 1/2] v2v: -o libvirt: Refactor video and graphics elements.
- [PATCH] v2v: -o libvirt: dump XML for libvirt if verbose
- [PATCH 1/2] sparsify: Refactor handling of checks of copying mode / --in-place.
- [PATCH 08/11] v2v: don't set spice display if QXL isn't supported
- [PATCH v2 08/11] v2v: don't set spice display if QXL isn't supported