Open majek opened 5 years ago
Hmm. This really ought to work without ACPI and BLK_DEV_INITRD. I'll add INOTIFY for now.
ACPI is indeed not needed (apart from the described halt problem), BLK_DEV_INITRD is needed though. Without it:
~/src/virtme$ sudo ./virtme-run --rw --pwd --kimg ../linux/arch/x86/boot/bzImage --memory 1G --force-initramfs
List of all partitions:
No filesystem could mount root, tried:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
CPU: 0 PID: 1 Comm: swapper Not tainted 5.10.3+ #164
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014
Call Trace:
panic+0xe5/0x267
? printk+0x47/0x49
mount_block_root+0x2e0/0x2e0
? rest_init+0x7e/0x7e
prepare_namespace+0x12c/0x15b
? rest_init+0x7e/0x7e
kernel_init+0x9/0xef
ret_from_fork+0x1f/0x30
Kernel Offset: disabled
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---
@arighi what do you think about it? Can we add BLK_DEV_INITRD on your fork?
@marcosps applied https://github.com/arighi/virtme/commit/0bc524e68221bf727b788a677d4c7637a8bf817f
I added it to the optional configs (optionals are only available in my fork - these are configs that you can override passing a custom config snippet via virtme-configkernel --custom FILE
).
I think it should be optional because we may want to disable it when we are 100% sure to use a initramfs-less boot. By default it'll be enabled so we won't break virtme-run --force-initramfs
.
@arighi thanks! @majek since @arighi is maintaining a fork of virtme and applying other pending fixes, maybe you should take a look or even start using it. I believe that we'll at least check new issues being opened for the project :)
I'm quite sure virtme requires at least
CONFIG_BLK_DEV_INITRD Needed for the initrd to work at all. Otherwise only non-initrd stuff works. (shell)
CONFIG_INOTIFY_USER Needed for proper udev /dev/virtio-port mounting. Without this you'll see error:
virtme-init: cannot find script I/O port; make sure virtio-serial is available
CONFIG_ACPI Needed for shutdown to actually close the vm. otherwise it hangs on message
reboot: System halted
On top of the already documented ones. This should probably be added to virtme/configkernel.
I did: