[Libguestfs] [PATCH] v2v: ovf: store CPU model for oVirt

Tomáš Golembiovský tgolembi at redhat.com
Thu Apr 13 16:49:33 UTC 2017


If CPU model is available store it in OVF for oVirt. This affects
-o rhev and -o vdsm.

Signed-off-by: Tomáš Golembiovský <tgolembi at redhat.com>
---
 v2v/create_ovf.ml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/v2v/create_ovf.ml b/v2v/create_ovf.ml
index f5dc64753..9d7341696 100644
--- a/v2v/create_ovf.ml
+++ b/v2v/create_ovf.ml
@@ -306,6 +306,12 @@ let rec create_ovf source targets guestcaps inspect
         e "DefaultDisplayType" [] [PCData "1"];
       ] in
 
+      (match source.s_cpu_model with
+        | None -> ()
+        | Some model ->
+           push_back content_subnodes (e "CustomCpuName" [] [PCData model])
+      );
+
       (* Add the <Origin/> element if we can. *)
       (match origin_of_source_hypervisor source.s_hypervisor with
        | None -> ()
-- 
2.12.1




More information about the Libguestfs mailing list