[Libguestfs] [PATCH 2/2] v2v: Handle SATA controller (RHBZ#1508874).

Richard W.M. Jones rjones at redhat.com
Thu Nov 2 13:03:55 UTC 2017


This also makes a fix to a related code comment.
---
 v2v/parse_ovf_from_ova.ml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/v2v/parse_ovf_from_ova.ml b/v2v/parse_ovf_from_ova.ml
index 6927e64e4..7dd4cc5c2 100644
--- a/v2v/parse_ovf_from_ova.ml
+++ b/v2v/parse_ovf_from_ova.ml
@@ -105,10 +105,11 @@ let parse_ovf_from_ova ovf_filename =
     let expr = sprintf "/ovf:Envelope/ovf:VirtualSystem/ovf:VirtualHardwareSection/ovf:Item[rasd:InstanceID/text()=%d]/rasd:ResourceType/text()" id in
     let controller = xpath_int expr in
 
-    (* 6: iscsi controller, 5: ide *)
+    (* 5: IDE, 6: SCSI controller, 20: SATA *)
     match controller with
-    | Some 6 -> Some Source_SCSI
     | Some 5 -> Some Source_IDE
+    | Some 6 -> Some Source_SCSI
+    | Some 20 -> Some Source_SATA
     | None ->
        warning (f_"ova disk has no parent controller, please report this as a bug supplying the *.ovf file extracted from the ova");
        None
-- 
2.13.2




More information about the Libguestfs mailing list