Boot ARM64 virtual machines on QEMU

Note:
This documentation has moved to a new home! Please update your bookmarks to the new URL for the up-to-date version of this page.

@sally-makin, Jed here. I’m using a System76 Astra (Ampere processor) with Ubuntu 24.04. These steps do not get me any farther than the TianoCore BIOS. The BIOS does not appear to see any bootable filesystem devices.

sudo qemu-system-aarch64 \
 -enable-kvm \
 -m 1024 \
 -cpu host \
 -M virt \
 -nographic \
 -drive if=pflash,format=raw,file=efi.img,readonly=on \
 -drive if=pflash,format=raw,file=varstore.img \
 -drive if=none,format=raw,file=noble-server-cloudimg-amd64.img,id=hd0 \
 -device virtio-blk-device,drive=hd0 \
 -netdev type=bridge,id=net0,br=virbr0 \
 -device virtio-net,netdev=net0

These are the files in the directory:

 $ ls -lh
total 761M
-rw-rw-r-- 1 jreynolds jreynolds  64M Feb  5 11:27 efi.img
-rw-r--r-- 1 jreynolds jreynolds 1.8G Jan 22 01:00 noble-server-cloudimg-amd64.img
-rwxrwxr-x 1 jreynolds jreynolds  463 Feb  5 17:17 run.sh
-rw-rw-r-- 1 jreynolds jreynolds  64M Feb  5 17:02 varstore.img

These are the devices the UEFI shell sees:

Shell> devices
     T   D
     Y C I
     P F A
CTRL E G G #P #D #C  Device Name
==== = = = == == === =========================================================
  15 R - -  0  1   1 VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)
  3C R - -  0  2   0 VenHw(837DCA9E-E874-4D82-B29A-23FE0E23D1E2,003E000A00000000)
  65 R - -  0  1   2 PciRoot(0x0)
  7F D - -  1  0   0 Primary Console Input Device
  80 D - -  1  0   0 Primary Console Output Device
  81 D - -  1  0   0 Primary Standard Error Device
  BA D - -  1  0   0 PciRoot(0x0)/Pci(0x0,0x0)
  BB B - -  1  2   1 Virtio Network Device
  BD B - -  1  5   3 VT-100 Serial Console
  BE B - -  1  8  10 PciRoot(0x0)/Pci(0x1,0x0)/MAC(525400123456,0x1)
  BF D - -  1  0   0 PciRoot(0x0)/Pci(0x1,0x0)/MAC(525400123456,0x1)/VenHw(D79DF6B0-EF44-43BD-9797-43E93BCF5FA8)
  C0 B - -  1  1   1 MNP (MAC=52-54-00-12-34-56, ProtocolType=0x806, VlanId=0)
  C1 B - -  1  1  10 MNP (MAC=52-54-00-12-34-56, ProtocolType=0x800, VlanId=0)
  C2 D - -  1  0   0 PciRoot(0x0)/Pci(0x1,0x0)/MAC(525400123456,0x1)/VenHw(9FB1A1F3-3B71-4324-B39A-745CBB015FFF)
  C3 B - -  1  1   6 IPv4 (SrcIP=0.0.0.0)
  C4 B - -  1  1   1 IPv4 (SrcIP=0.0.0.0)
  C5 B - -  2  1   2 UDPv4 (SrcPort=68, DestPort=67)
  C6 B - -  1  1   1 IPv4 (Not started)
  C7 B - -  2  1   1 UDPv4 (Not started)
  C8 B - -  1  1  10 MNP (MAC=52-54-00-12-34-56, ProtocolType=0x86DD, VlanId=0)
  C9 D - -  1  0   0 PciRoot(0x0)/Pci(0x1,0x0)/MAC(525400123456,0x1)/VenHw(5BEDB5CC-D830-4EB2-8742-2D4CC9B54F2C)
  CA B - -  1  1   5 IPv6(StationAddress=::, DestinationAddress=::)
  CB B - -  1  1   1 IPv6(StationAddress=::, DestinationAddress=::)
  CC B - -  2  1   2 UDPv6 (SrcPort=546, DestPort=0)
  CD B - -  1  1   1 IPv6(Not started)
  CE B - -  2  1   1 UDPv6 (Not started)
  CF B - -  1  1   1 IPv4 (SrcIP=0.0.0.0)
  D0 B - -  1  1   1 IPv6(StationAddress=::, DestinationAddress=::)
  D1 D - -  1  1   0 PXE Controller
  D2 B - -  1  1   1 IPv4 (Not started)
  D3 B - -  2  1   1 UDPv4 (Not started)
  D4 D - -  2  1   0 PXE Controller
  D5 B - -  1  1   1 IPv4 (Not started)
  D6 D - -  2  1   0 PXE Controller
  D7 B - -  1  1   1 IPv4 (Not started)
  D8 D - -  2  1   0 PXE Controller
  D9 D - -  1  1   0 PXE Controller
  DA D - -  1  1   0 PXE Controller
  DB D - -  1  1   0 PciRoot(0x0)/Pci(0x1,0x0)/MAC(525400123456,0x1)/IPv4(0.0.0.0)
  DC D - -  1  1   0 PXE Controller
  DD D - -  1  1   0 PXE Controller
  DE B - -  1  1   1 IPv6(Not started)
  DF D - -  2  1   0 PXE Controller
Shell> - -  1  1   1 IPv6(Not started)
  E1 D - -  2  1   0 PXE Controller
  E2 D - -  1  1   0 PXE Controller
  E3 D - -  1  1   0 PciRoot(0x0)/Pci(0x1,0x0)/MAC(525400123456,0x1)/IPv6(0000:0000:0000:0000:0000:0000:0000:0000)
  E4 D - -  2  1   0 TCPv4 (Not started)
  E5 B - -  1  1   1 IPv4 (Not started)
  E6 D - -  2  1   0 TCPv6(Not started)
  E7 B - -  1  1   1 IPv6(Not started)
  E9 D - -  1  1   0 UEFI Http Boot Controller
  EA D - -  1  0   0 PciRoot(0x0)/Pci(0x1,0x0)/MAC(525400123456,0x1)/IPv4(0.0.0.0)/Uri()
  EB D - -  1  1   0 UEFI Http Boot Controller
  EC D - -  1  1   0 IPv6(Not started)
  ED D - -  1  0   0 PciRoot(0x0)/Pci(0x1,0x0)/MAC(525400123456,0x1)/IPv6(0000:0000:0000:0000:0000:0000:0000:0000)/Uri()
  EE B - -  1  1   1 IPv6(Not started)
  EF D - -  2  1   0 UDPv6 (Not started)
  F0 B - -  1  1   1 IPv4 (Not started)
  F1 D - -  2  1   0 UDPv4 (Not started)

I’m thinking that’s just not enough storage devices.

Hi Jed, thanks for your report. This documentation is no longer maintained on Discourse, so I’ve posted your issue over on our GitHub issues