Closed Emanuele94 closed 1 year ago
@Emanuele94 In most cases when you see the installation again, the user-data
was not successfully executed. Can you run qemu in graphics mode to see the logs from cloud-init
?
check if cloud-init user-data
file is valid (maybe new cloud-init
updates might render it buggy)
make validate-cloudinit
if possible set the headless
value in the Packer template to false
and try booting the image on a local device with qemu and kvm.
I would still recommend adding the boot sequence into the late-commands
because that is what has worked for me
late-commands:
- "sudo apt update && sudo apt install -y efibootmgr"
- "sudo efibootmgr"
- "sudo efibootmgr -o 0007,0001,0000,0002,0003,0004,0005,0006"
efibootmgr
sequenceif you are able to crash the cloud-init
installation try getting some information from efibootmgr and determine where the image should be in the sequence and place the image disk first
Hi, thanks for the response. unfortunately i cannot use headless false. Though, i'm trying to set the efibootmgr, fist by checking efibootmgr -v once i get the vm working. The cloud-init validate works fine, i get no errors.
Thanks again man! i've solved by checking manually efibootmgr -v and than changing as you suggested the order in cloud-init user-data efibootmgr -o
Hi, thanks for this, it's very usefull. I'm facing and issue were after cloud init autoinstall, the vm reboots but i can see that the disk is not being unmounted and when it starts it launches installation once again. Have you got any ideas about this? I'm trying to work with qemuargs at the moment to set boot order.