Can't build ubuntu image. qemu: Error launching VM: Qemu failed to start.
What happened:
I can't build ubuntu image for baremetal following instructions
What you expected to happen:
To get ubuntu images I can then use on Intel NUCs, (bottlerocket didn't work)
How to reproduce it (as minimally and precisely as possible):
Follow instructions from
You will hit some issues
- with ansible checks use workaround https://github.com/aws/eks-anywhere/issues/5937
- with qemu missing use workaround https://github.com/aws/eks-anywhere/issues/5938
Run
image-builder build --os ubuntu --hypervisor baremetal --release-channel 1-26
output
==> qemu: Trying http://cdimage.ubuntu.com/ubuntu-legacy-server/releases/20.04/release/ubuntu-20.04.1-legacy-server-amd64.iso
==> qemu: Trying http://cdimage.ubuntu.com/ubuntu-legacy-server/releases/20.04/release/ubuntu-20.04.1-legacy-server-amd64.iso?checksum=sha256%3Af11bda2f2caed8f420802b59f382c25160b114ccc665dbac9c5046e7fceaced2
qemu: ubuntu-20.04.1-legacy-server-amd64.iso 816.00 MiB / 816.00 MiB [==================================================================================================] 100.00% 28s
==> qemu: http://cdimage.ubuntu.com/ubuntu-legacy-server/releases/20.04/release/ubuntu-20.04.1-legacy-server-amd64.iso?checksum=sha256%3Af11bda2f2caed8f420802b59f382c25160b114ccc665dbac9c5046e7fceaced2 => /home/image-builder/.cache/packer/48e4ec4daa32571605576c5566f486133ecc271f.iso
==> qemu: Starting HTTP server on port 8556
==> qemu: Found port for communicator (SSH, WinRM, etc): 3742.
==> qemu: Looking for available port between 5900 and 6000 on 127.0.0.1
==> qemu: Starting VM, booting from CD-ROM
qemu: The VM will be run headless, without a GUI. If you want to
qemu: view the screen of the VM, connect via VNC without a password to
qemu: vnc://127.0.0.1:5922
==> qemu: Error launching VM: Qemu failed to start. Please run with PACKER_LOG=1 to get more info.
==> qemu: Deleting output directory...
Build 'qemu' errored after 31 seconds 895 milliseconds: Build was halted.
==> Wait completed after 31 seconds 896 milliseconds
==> Some builds didn't complete successfully and had errors:
--> qemu: Build was halted.
==> Builds finished but no artifacts were created.
make[1]: *** [Makefile:484: build-raw-ubuntu-2004-efi] Error 1
make[1]: Leaving directory '/home/image-builder/eks-anywhere-build-tooling/projects/kubernetes-sigs/image-builder/image-builder/images/capi'
make: *** [Makefile:334: local-build-raw-ubuntu-2004-efi] Error 2
make: Leaving directory '/home/image-builder/eks-anywhere-build-tooling/projects/kubernetes-sigs/image-builder'
2023/05/30 11:40:42 Error executing image-builder for raw hypervisor: failed to run command: exit status 2
Environment
- Intel NUC (Intel Core i3)
- Ubuntu Desktop 22.10 amd64
Hey @csantanapr, could you share the full logs from running this command?
I also have similar issues. Building on Rocky 9.4.
Also due to the fact that bottlerocket has been removed from baremetal leaves me with no more options to test eks-anywhere.
Changing release-channels didn't help. Nor did changing ubuntu versions.
I originally suspected that maybe it's due to how RHEL obscures away qemu-kvm, and I was forced to link it as
qemu-system-x86_64 for the builder to work might have been the issue.
But csantanapr seems to have the same issue on ubuntu, so I'm more skeptical on that front.
Next week I will try on another distro.