[Pkg-libvirt-commits] [libguestfs] 05/35: v2v: Add xvda -> sda etc mappings (RHBZ#1142004).
Hilko Bengen
bengen at moszumanska.debian.org
Fri Oct 3 14:46:36 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag debian/1%1.27.49-1
in repository libguestfs.
commit 01b25d7fc6ea1dee80d104118436980b7d504af0
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Tue Sep 16 16:20:15 2014 +0100
v2v: Add xvda -> sda etc mappings (RHBZ#1142004).
For Xen guests, a device can be presented twice as (eg) xvda and sda,
and therefore we should map any otherwise unmapped xvdX.
For non-Xen guests, this should have no effect.
---
v2v/convert_linux.ml | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/v2v/convert_linux.ml b/v2v/convert_linux.ml
index 0e00686..03cf406 100644
--- a/v2v/convert_linux.ml
+++ b/v2v/convert_linux.ml
@@ -1106,6 +1106,20 @@ let rec convert ~verbose ~keep_serial_console (g : G.guestfs) inspect source =
source_dev, target_dev
) source.s_disks in
+ (* If a Xen guest has non-PV devices, Xen also simultaneously
+ * presents these as xvd devices. i.e. hdX and xvdX both exist and
+ * are the same device.
+ *
+ * This mapping is also useful for P2V conversion of Citrix
+ * Xenserver guests done in HVM mode. Disks are detected as sdX,
+ * although the guest uses xvdX natively.
+ *)
+ let map = map @
+ mapi (
+ fun i disk ->
+ "xvd" ^ drive_name i, block_prefix ^ drive_name i
+ ) source.s_disks in
+
(* Possible Augeas paths to search for device names. *)
let paths = [
(* /etc/fstab *)
--
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