From 2d25872df3619a3077006ad0f91c029602db6780 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Mon, 15 May 2017 14:41:03 +0200 Subject: [PATCH] v2v: linux: pass the root device when using SUSE's mkinitrd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mkinitrd in SLE guests < 12 tries to get the root device by scanning the fstab: this will fail, since v2v already remapped the devices from hd*/sd* to vd* in the guest (including in its fstab). Since we know what is the root device in the appliance, pass it to mkinitrd directly, so it does not have to do guesswork. Thanks to: Cédric Bosdonnat, for reporting the issue, and testing the fix. --- v2v/convert_linux.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/v2v/convert_linux.ml b/v2v/convert_linux.ml index a1088b3d9..f8dfa00d7 100644 --- a/v2v/convert_linux.ml +++ b/v2v/convert_linux.ml @@ -517,7 +517,8 @@ let rec convert (g : G.guestfs) inspect source output rcaps = g#command [| "/sbin/mkinitrd"; "-m"; String.concat " " modules; "-i"; initrd; - "-k"; kernel.ki_vmlinuz |] + "-k"; kernel.ki_vmlinuz; + "-d"; inspect.i_root |] ) ) else if family = `Debian_family then (