ganeti / instance-debootstrap

Debootstrap instance OS (migrated from http://git.ganeti.org/?p=instance-debootstrap.git;a=summary)
GNU General Public License v2.0
4 stars 13 forks source link

No support for GRUB2 #9

Open jpds opened 4 years ago

jpds commented 4 years ago

There appears to be no support for GRUB2 in this package. Whenever I spin up a buster based VM, the VNC console shows that it never finds up and the VM just sits there using 100% cycle trying to boot.

saschalucas commented 4 years ago

that's true. the example hooks are from pre grub2 era. the original instance-debootstrap use case was to use the host's kernel/initrd. however this has its own disadvantages (different host/guest OS, no other kernel modules inside the guest, even reduced functionality like ACPI power button not working, if host-initrd does not includ modules evdev+button, no stateless initrd -> contains host information like resume device, LVM-setup, dm-crypt etc.). probably this case should be obsoleted?

for a quick workaround i attach an yet unpublished example grub2 hook here. I use it with special named variants, i.e.: buster-guest_kernel (where guest_kernel indicates that the instance has its own kernel and therefore its own bootloader). the variant config (/etc/ganeti/instance-debootstrap/variants/buster-guest_kernel.conf) looks this way:

MIRROR="http://ftp.tu-chemnitz.de/debian/"
ARCH="amd64"
SUITE="buster"
EXTRA_PKGS="dbus,openssh-server,linux-image-amd64,grub-pc"
COMPONENTS="main,contrib,non-free"
jpds commented 4 years ago

@saschalucas Thank you very much for that hook script, I've copied your variant config over and tried to run a machine with:

sudo gnt-instance add       --node test-node       --disk-template plain       --os-size 4GiB       --os-type debootstrap+buster-guest_kernel       --hypervisor-parameters kvm:initrd_path=,kernel_path=       --net 0:ip=172.xx.xx.21       --no-ip-check --no-name-check      test1

The machine gets installed and watching htop, I can see it generate an initramfs but then it immediately goes into 100% CPU usage as before. Is there an option I have forgotten to provide?