On Wed, Aug 15, 2018 at 09:24:03AM +0200, Pino Toscano wrote:
When parsing the libvirt XML, make sure to assign the IDs for disks
(s_disk_id) from 0 instead of 1. This does not change the actual
behaviour, just makes the IDs like in all the other input modes not
based on libvirt XML.
---
v2v/parse_libvirt_xml.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/v2v/parse_libvirt_xml.ml b/v2v/parse_libvirt_xml.ml
index 78a6e71c0..dac99511c 100644
--- a/v2v/parse_libvirt_xml.ml
+++ b/v2v/parse_libvirt_xml.ml
@@ -246,7 +246,7 @@ let parse_libvirt_xml ?conn xml =
(* Non-removable disk devices. *)
let disks =
let get_disks, add_disk =
- let disks = ref [] and i = ref 0 in
+ let disks = ref [] and i = ref (-1) in
let get_disks () = List.rev !disks in
let add_disk qemu_uri format controller p_source =
incr i;
--
ACK
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/