[Pkg-libvirt-commits] [libguestfs] 148/165: v2v: When parsing input libvirt XML, get correct disk image format.
Hilko Bengen
bengen at moszumanska.debian.org
Sat Aug 30 08:25:24 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch experimental
in repository libguestfs.
commit 90bf3422c5333b3bb295d6fc466d4cf429b8301e
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Thu Jun 19 13:29:15 2014 +0100
v2v: When parsing input libvirt XML, get correct disk image format.
Old Xen PV guests had:
<driver name='tap' type='aio'/>
The previous xpath expression matched any driver type attribute in
order to pick up the format. However we only want to match:
<driver name='qemu' type='raw'/>
so we need to check the name attribute as well.
---
v2v/source_libvirt.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/v2v/source_libvirt.ml b/v2v/source_libvirt.ml
index 520b1e3..4a3c9f1 100644
--- a/v2v/source_libvirt.ml
+++ b/v2v/source_libvirt.ml
@@ -95,7 +95,7 @@ let create_xml ?dir xml =
Xml.xpathctx_set_current_context xpathctx node;
let format =
- let format = xpath_to_string "driver/@type" "" in
+ let format = xpath_to_string "driver[name='qemu']/@type" "" in
if format <> "" then Some format else None in
(* The <disk type='...'> attribute may be 'block', 'file' or
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list