Tomáš Golembiovský
2017-Apr-06 20:53 UTC
[Libguestfs] [PATCH] v2v: ovf: Add virtio-rng and memory balloon device
This affects -o rhv and -o vdsm.
Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
---
v2v/create_ovf.ml | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/v2v/create_ovf.ml b/v2v/create_ovf.ml
index cfca63452..03df7f934 100644
--- a/v2v/create_ovf.ml
+++ b/v2v/create_ovf.ml
@@ -390,6 +390,29 @@ let rec create_ovf source targets guestcaps inspect
]
];
+ (* Add the miscellaneous KVM devices. *)
+ if guestcaps.gcaps_virtio_rng then
+ append virtual_hardware_section_items [
+ e "Item" [] [
+ e "rasd:Description" [] [PCData "RNG Device"];
+ e "rasd:InstanceId" [] [PCData (uuidgen ())];
+ e "rasd:ResourceType" [] [PCData "0"];
+ e "Type" [] [PCData "rng"];
+ e "Device" [] [PCData "virtio"];
+ ]
+ ];
+ if guestcaps.gcaps_virtio_balloon then
+ append virtual_hardware_section_items [
+ e "Item" [] [
+ e "rasd:Description" [] [PCData "Memory Ballooning
Device"];
+ e "rasd:InstanceId" [] [PCData (uuidgen ())];
+ e "rasd:ResourceType" [] [PCData "0"];
+ e "Type" [] [PCData "balloon"];
+ e "Device" [] [PCData "memballoon"];
+ ]
+ ];
+
+
push_back content_subnodes (
e "Section" ["xsi:type",
"ovf:VirtualHardwareSection_Type"]
!virtual_hardware_section_items
--
2.12.1
Pino Toscano
2017-Apr-07 10:29 UTC
Re: [Libguestfs] [PATCH] v2v: ovf: Add virtio-rng and memory balloon device
On Thursday, 6 April 2017 22:53:08 CEST Tomáš Golembiovský wrote:> This affects -o rhv and -o vdsm. > > Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com> > ---Looks mostly good.> v2v/create_ovf.ml | 23 +++++++++++++++++++++++ > 1 file changed, 23 insertions(+) > > diff --git a/v2v/create_ovf.ml b/v2v/create_ovf.ml > index cfca63452..03df7f934 100644 > --- a/v2v/create_ovf.ml > +++ b/v2v/create_ovf.ml > @@ -390,6 +390,29 @@ let rec create_ovf source targets guestcaps inspect > ] > ]; > > + (* Add the miscellaneous KVM devices. *) > + if guestcaps.gcaps_virtio_rng then > + append virtual_hardware_section_items [ > + e "Item" [] [ > + e "rasd:Description" [] [PCData "RNG Device"];Could it be rasd:Caption here?> + e "rasd:InstanceId" [] [PCData (uuidgen ())]; > + e "rasd:ResourceType" [] [PCData "0"]; > + e "Type" [] [PCData "rng"]; > + e "Device" [] [PCData "virtio"]; > + ] > + ]; > + if guestcaps.gcaps_virtio_balloon then > + append virtual_hardware_section_items [ > + e "Item" [] [ > + e "rasd:Description" [] [PCData "Memory Ballooning Device"];Ditto.> + e "rasd:InstanceId" [] [PCData (uuidgen ())]; > + e "rasd:ResourceType" [] [PCData "0"]; > + e "Type" [] [PCData "balloon"]; > + e "Device" [] [PCData "memballoon"]; > + ] > + ]; > + > +One extra empty line. Thanks, -- Pino Toscano
Tomáš Golembiovský
2017-Apr-07 22:21 UTC
Re: [Libguestfs] [PATCH] v2v: ovf: Add virtio-rng and memory balloon device
On Fri, 07 Apr 2017 12:29:59 +0200 Pino Toscano <ptoscano@redhat.com> wrote:> On Thursday, 6 April 2017 22:53:08 CEST Tomáš Golembiovský wrote: > > This affects -o rhv and -o vdsm. > > > > Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com> > > --- > > Looks mostly good. > > > v2v/create_ovf.ml | 23 +++++++++++++++++++++++ > > 1 file changed, 23 insertions(+) > > > > diff --git a/v2v/create_ovf.ml b/v2v/create_ovf.ml > > index cfca63452..03df7f934 100644 > > --- a/v2v/create_ovf.ml > > +++ b/v2v/create_ovf.ml > > @@ -390,6 +390,29 @@ let rec create_ovf source targets guestcaps inspect > > ] > > ]; > > > > + (* Add the miscellaneous KVM devices. *) > > + if guestcaps.gcaps_virtio_rng then > > + append virtual_hardware_section_items [ > > + e "Item" [] [ > > + e "rasd:Description" [] [PCData "RNG Device"]; > > Could it be rasd:Caption here?Yes it can, it doesn't matter to oVirt. Although rasd:Description seems more OVFish. (Read: I don't see rasd:Caption in OVF specs.) Tomas> > + e "rasd:InstanceId" [] [PCData (uuidgen ())]; > > + e "rasd:ResourceType" [] [PCData "0"]; > > + e "Type" [] [PCData "rng"]; > > + e "Device" [] [PCData "virtio"]; > > + ] > > + ]; > > + if guestcaps.gcaps_virtio_balloon then > > + append virtual_hardware_section_items [ > > + e "Item" [] [ > > + e "rasd:Description" [] [PCData "Memory Ballooning Device"]; > > Ditto. > > > + e "rasd:InstanceId" [] [PCData (uuidgen ())]; > > + e "rasd:ResourceType" [] [PCData "0"]; > > + e "Type" [] [PCData "balloon"]; > > + e "Device" [] [PCData "memballoon"]; > > + ] > > + ]; > > + > > + > > One extra empty line. > > Thanks, > -- > Pino Toscano-- Tomáš Golembiovský <tgolembi@redhat.com>
Apparently Analagous Threads
- [PATCH v2] v2v: ovf: Add virtio-rng and memory balloon device
- Re: [PATCH] v2v: ovf: Add virtio-rng and memory balloon device
- [PATCH 1/2] Revert "v2v: oVirt changed the ResourceType for QXL video devices (RHBZ#1598715)."
- [PATCH v2 0/3] Make generated OVF more conforming to standard
- [PATCH 0/3] Make generated OVF more conforming to standard