[Libguestfs] [PATCH] v2v: Don't hang when rebuilding SUSE kdump initrd (RHBZ#1465849).

Richard W.M. Jones rjones at redhat.com
Mon Jul 17 17:48:49 UTC 2017


The ‘vmware-uninstall-tools.pl’ script tries to rebuild the initrd.
On SUSE, if kdump initrd has been enabled, this hangs because the
‘mkdumprd’ doesn't know what root device to use.  Fix that by setting
the ‘rootdev’ environment variable.
---
 v2v/convert_linux.ml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/v2v/convert_linux.ml b/v2v/convert_linux.ml
index c34bf3e91..2fa9bfa51 100644
--- a/v2v/convert_linux.ml
+++ b/v2v/convert_linux.ml
@@ -304,7 +304,12 @@ let rec convert (g : G.guestfs) inspect source output rcaps =
     let uninstaller = "/usr/bin/vmware-uninstall-tools.pl" in
     if g#is_file ~followsymlinks:true uninstaller then (
       try
-        ignore (g#command [| uninstaller |]);
+        if family = `SUSE_family then
+          ignore (g#command [| "/usr/bin/env";
+                               "rootdev=" ^ inspect.i_root;
+                               uninstaller |])
+        else
+          ignore (g#command [| uninstaller |]);
 
         (* Reload Augeas to detect changes made by vbox tools uninst. *)
         Linux.augeas_reload g
-- 
2.13.2




More information about the Libguestfs mailing list