[Pkg-libvirt-commits] [libguestfs] 14/146: v2v: linux: Print block device map in verbose mode.

Hilko Bengen bengen at moszumanska.debian.org
Sun Mar 29 17:00:05 UTC 2015


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch master
in repository libguestfs.

commit d74917f4aeddc4ad84f718aedc1fc932440ceca9
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Tue Nov 18 13:53:13 2014 +0000

    v2v: linux: Print block device map in verbose mode.
    
    Very useful for debugging device mapping problems.
    
    (cherry picked from commit e25f68c47efaab886ada330b7ab596681705b02b)
---
 v2v/convert_linux.ml | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/v2v/convert_linux.ml b/v2v/convert_linux.ml
index 088c2e8..d5d3169 100644
--- a/v2v/convert_linux.ml
+++ b/v2v/convert_linux.ml
@@ -1268,6 +1268,15 @@ let rec convert ~verbose ~keep_serial_console (g : G.guestfs) inspect source =
           "xvd" ^ drive_name i, block_prefix_after_conversion ^ drive_name i
       ) source.s_disks in
 
+    if verbose then (
+      printf "block device map:\n";
+      List.iter (
+        fun (source_dev, target_dev) ->
+          printf "\t%s\t-> %s\n" source_dev target_dev
+      ) (List.sort (fun (a,_) (b,_) -> compare a b) map);
+      flush stdout
+    );
+
     (* 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