Hello,
I am building Ubuntu Server images with packer and qemu.
Everything works fine when done in local: build is OK, I can mount and run the built image.
Next step was to automatize the build from a GitLab CI/CD.
I use the hashicorp/docker in which I added “qemu qemu-img qemu-system-x86_64”.
I exposed all ports range needed by packer (VNC + ssh).
When I run the CI/CD, packer is able to run the boot commands.
I have been able to redirect some logs from qemu by using “-serial stdio” and I’m sure that qemu is starting well and i can see the echo of boot command from grub shell prompt.
However, last command is a boot command that run the linux kernel.
After running this command, packer is stuck waiting for ssh and I have no more logs from qemu.
I already tried to increase the ssh timeout but still the same.
I suppose something goes wrong when starting kernel.
But how to debug when you dont have any clues as I’m not able to grab the kernel logs ?