diff --git a/v2v/parse_libvirt_xml.ml b/v2v/parse_libvirt_xml.ml index 03a201e77..44723014c 100644 --- a/v2v/parse_libvirt_xml.ml +++ b/v2v/parse_libvirt_xml.ml @@ -379,6 +379,16 @@ let parse_libvirt_xml ?conn xml = let target_dev = xpath_string "target/@dev" in match target_dev with | None -> None + | Some dev when String.is_prefix dev "sr" -> + (* "srN" devices are found mostly in the physical XML written by + * virt-p2v. + *) + let name = String.sub dev 2 (String.length dev - 2) in + (try Some (int_of_string name) + with Failure _ -> + warning (f_"could not parse device name ā€˜%s’ from the source libvirt XML") dev; + None + ) | Some dev -> let rec loop = function | [] ->