How to boot a Fedora 21 aarch64 UEFI guest on x86_64

You can use virt-builder to make Fedora 21 aarch64 guests easily:

$ virt-builder --arch aarch64 fedora-21

but unless you have real aarch64 hardware, how do you boot them?

Well the latest qemu supports working system emulation for 64 bit ARM. So assuming you (a) have compiled a very new qemu-system-aarch64 (I recommend qemu from git), and (b) you have the AAVMF (UEFI for aarch64) firmware, then:

$ qemu-system-aarch64 \
    -nodefconfig -nodefaults -display none \
    -M virt -cpu cortex-a57 -machine accel=tcg -m 2048 \
    -drive if=pflash,format=raw,file=AAVMF_CODE.fd,readonly \
    -drive if=pflash,format=raw,file=vars.fd \
    -drive file=fedora-21.img,format=raw,if=none,id=hd0 \
    -device virtio-blk-device,drive=hd0 \
    -netdev user,id=usernet \
    -device virtio-net-device,netdev=usernet \
    -serial stdio

And that will boot the aarch64 guest.

Edit: If using Gerd’s AAVMF repo, replace AAVMF_CODE.fd with /usr/share/edk2.git/aarch64/QEMU_EFI-pflash.raw

4 Comments

Filed under Uncategorized

4 responses to “How to boot a Fedora 21 aarch64 UEFI guest on x86_64

  1. Using Gerd’s repo on AArch64 Fedora-21 guest running on Fedora Rawhide AArch64 host, the below is the result:

    $ sudo wget https://www.kraxel.org/repos/firmware.repo
    $ sudo dnf install edk2.git-ovmf-x64
    Using metadata from Tue Mar  3 16:03:06 2015
    Error: nothing provides ipxe.git-combined needed by edk2.git-ovmf-x64-0-20150303.b898.g48b3ff0.noarch
    
  2. s/edk2.git-arm/edk2.git-aarch64

  3. Pingback: Fedora 22 aarch64 virt-builder image | Richard WM Jones

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s