1

Issue Summary

I'm running Windows 11, and installed QEMU with the Scoop package manager.

scoop install qemu

After that, I tried launching a QEMU virtual machine, using the ARM 64-bit CPU architecture. I want to boot the VM from an ISO with Ubuntu 22.04 LTS ARM 64-bit.

qemu-system-aarch64 -cpu cortex-a15 -m 4096 -machine virt -drive if=virtio,format=raw,file=ubuntu-22.04.1-live-server-arm64.iso -boot d
  • Using ARM Cortex A15 CPU emulation
  • Gave the VM 4 GB memory
  • Using the generic virt machine type
  • Mount ISO file with virtio driver
  • Instructed VM to boot from CD-ROM using -boot d

Expected Result

QEMU virtual machine launches from the Ubuntu Server ISO.

Actual Result

The QEMU monitor window appears, but does not actually boot the ISO.

enter image description here

2 Answers 2

0

Method 1 (Succeeded)

1. Get EFI file.

I got it from my WSL Ubuntu.

sudo apt-get install qemu-efi
cp /usr/share/qemu-efi-aarch64/QEMU_EFI.fd  ./

2. Download img.

Download QEMU img instead of installing from the ISO file.

Download link: https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-arm64.img

Home page: https://cloud-images.ubuntu.com

3. Boot.

Better make a copy of the img for backup before booting:

cp ubuntu-22.04-server-cloudimg-arm64.img ubuntu-arm.img

Boot:

qemu-system-aarch64 -M virt -cpu cortex-a72 -nographic \
    -net nic -net user \
    -bios QEMU_EFI.fd -hda ubuntu-arm.img

If everything works fine, you will see the boot messages and eventually enter the login screen.

Method 2 (Failed)

I tried to install the ISO file with the EFI file, it booted and showed the initial installation screen, but it didn't work in the end. A few minutes after I pressed Enter, it prompted me with Failed to start Snap Daemon, maybe because it failed to connect to the network.

qemu-img create -f qcow2 ubuntu-arm.img 16G

qemu-system-aarch64 -M virt -cpu cortex-a72 -nographic \
    -net nic -net user \
    -bios QEMU_EFI.fd -hda ubuntu-arm.img \
    -cdrom ubuntu-22.04.2-live-server-arm64.iso -boot d
0

I succeeded on ubuntu22.04, maybe it can give you some reference.

(The qemu program has been installed)

  1. Create a qcow2 file: qemu-img create -f qcow2 ubuntu22-server-arm64.img 50G.

  2. Execute the following command:

    sudo /usr/local/bin/qemu-system-aarch64 -nographic \
    -m 8G -cpu cortex-a72 \
    -machine virt -smp 4 \
    -bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd \
    -device virtio-gpu-pci \
    -netdev user,id=net0 -device virtio-net-device,netdev=net0 \
    -device nec-usb-xhci,id=xhci,addr=0x1b \
    -device usb-tablet,id=tablet,bus=xhci.0,port=1 \
    -device usb-kbd,id=keyboard,bus=xhci.0,port=2 \
    -hda ubuntu22-server-arm64.img \
    -drive file=ubuntu-22.04.2-live-server-arm64.iso,if=none,id=cdrom,cache=writeback \
    -device virtio-blk,drive=cdrom,bootindex=0 \
    -vnc 0.0.0.0:60
    
  3. Access 127.0.0.1:5960 through VNCViewer, and some information prompts will also appear on the command line. After waiting for a period of time, the command line will display the following error messages. Ignore them and continue to wait for a while, then the installation interface will appear in the VNC window.

    [ TIME ] Timed out waiting for device /dev/ttyAMA0.
    [DEPEND] Dependency failed for Subi…ler for Ubuntu Server ttyAMA0.
    [FAILED] Failed to start Snap Daemon.
    
  4. After setting the mirror address, the installation may crash and automatically restart. Ignore the error messages and continue to wait.

  5. In the prompt box that pops up on the reinstallation interface, select "Select continue to try the installation again" and continue with the installation.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .