v2v: linux: pass the root device when using SUSE's mkinitrd

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.
This commit is contained in:
Pino Toscano
2017-05-15 14:41:03 +02:00
parent 00bf11cba8
commit 2d25872df3

View File

@@ -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 (