aws / aws/eks-anywhere

Can't build ubuntu image. qemu: Error launching VM: Qemu failed to start.

Open
#5,940 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
2.1k
Forks
328
Avg merge
1d 4h
Merged PRs (30d)
9

Description

**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

Contributor guide

Open the contributing guide

Research direction

Start with the image-builder build command and the Makefile targets at lines 484 and 334 shown in the output. Run the build with PACKER_LOG=1 and review the workarounds in issues 5937 and 5938 to identify why QEMU fails to launch. Done means the Ubuntu baremetal image build completes and produces an artifact.

Written by the indexing model from the issue text.

Assessment

Tech stack
ansible, ubuntu
Domain
build-system, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.