Initramfs fails to mount LVM in VMWare VM with >3 GB RAM
#1
Tue, 2018-02-06 12:35
Disassembler
-
- Offline
- 1 month 3 weeks ago
- 2018-02-06
Hi,
I'm trying to get Alpine 3.7 (virthardened) to run in VM on VMWare Workstation 14.1. The Alpine VM is set to boot from LVM but whenever I set more than 3 GB memory, initramfs on first boot after the installation fails with
mount: mounting /dev/vg0/lv_root on /sysroot failed: No such file or directory Mounting root failed. initramfs emergency recovery shell launched. Type 'exit' to continue boot sh: can't access tty: job control turned off
What's even more funny is, that whenever I activate and mount the LVM manually in initramfs shell, the VM eventually starts.
lvm vgchange -ay mount -t ext4 /dev/vg0/lv_root /sysroot mount -t ext4 /dev/sda1 /sysroot/boot exit
Whenever I set the RAM to 3 GB or less, the VM happily boots without any problems. For the test, it's enough to do the most basic installation of Alpine 3.7 with LVM (it's one of the questions in setup-apline
).
This is my /etc/mkinitfs/mkinitfs.conf
:
features="ata base ide scsi usb virtio ext4 lvm"
And these are relevant lines from /boot/extlinux.conf
:
LINUX vmlinuz-virthardened INITRD initramfs-virthardened APPEND root=/dev/vg0/lv_root modules=sd-mod,usb-storage,ext4 pax_nouderef quiet rootfstype=ext4
Any ideas what needs to be adjusted or what can I check in order to provide more details?
After some more tests, it looks like it's related to the compatibility with VMWare and its drivers.
Oracle VirtualBox 5.2.6 - Works without problems
VMWare Workstation 12.5.7 - Works without problems
VMWare Workstation 14.1.1 - Problems as described above. Also the "standard" Alpine 3.7 image fails to boot with the same message, so I can't even try to install it on 14.1.1
I have opened https://bugs.alpinelinux.org/issues/8476 as it seems that it's some driver or compatibility issue.
Found the problem. It's not related to the VMWare version but to the VMWare features enabled on the VM.
Turns out that
mem.hotadd
in vmx definition was the culprit. If it's set to"TRUE"
, VM exhibits the problems I've written above. If it's set to"FALSE"
or not set at all (which defaults to"FALSE"
), the VM then starts normally even with more than 3 GB RAM.