From Fedora Project Wiki
(Create page)
 
(Location takes ../os/ not ../iso/ url)
 
(17 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
= Installing Fedora aarch64 with QEMU and libvirt =
 
= Installing Fedora aarch64 with QEMU and libvirt =
 +
 +
These steps will work on both x86 and aarch64 hardware. If running on actual aarch64 hardware, the virt-install commands should automatically request KVM for maximum performance.
  
 
== Get the necessary bits ==
 
== Get the necessary bits ==
  
* Grab the latest qemu-system-aarch64
+
* Fedora 22 host or later is required
** Minimum required version: [http://koji.fedoraproject.org/koji/buildinfo?buildID=593646 qemu-2.2.0-0.1.rc1.fc22]
+
* Grab the latest qemu-system-aarch64, libvirt, and virt-manager
** Also available in [[Virtualization_Preview_Repository|fedora-virt-preview]] for F21
+
* Grab UEFI builds for QEMU and AARCH64: <code>sudo dnf install edk2-aarch64</code> (fedora 23 & newer)
* Grab the latest libvirt
+
** Note: These bits are not part of fedora 22 and older due to licensing issues. See [[Using_UEFI_with_QEMU#EDK2_Licensing_Issues]] for more info.
** Minimum required version: [http://koji.fedoraproject.org/koji/buildinfo?buildID=594825 libvirt-1.2.10-3.fc22]
 
** Also available in [[Virtualization_Preview_Repository|fedora-virt-preview]] for F21
 
** Make sure to restart libvirtd after update
 
* Grab virt-manager from git
 
** <code>git clone git://git.fedorahosted.org/virt-manager.git</code>
 
** To use virt-install from git, just do: <code>cd virt-manager; ./virt-install ...</code>
 
* Grab UEFI builds for QEMU and AARCH64
 
** Note: These bits are not part of fedora due to licensing issues. See [[Testing_secureboot_with_KVM#EDK2_Licensing_Issues]] for more info.
 
 
** Install Gerd's nightly firmware repo, as described here: https://www.kraxel.org/repos/
 
** Install Gerd's nightly firmware repo, as described here: https://www.kraxel.org/repos/
** Install the relevant bits: <code>sudo yum install edk2.git-aarch64</code>
+
** Install the relevant bits: <code>sudo dnf install edk2.git-aarch64</code>
** As of 2014-11-21, we need to add one small bit after first install: <code>sudo dd if=/dev/zero of=/usr/share/edk2.git/aarch64/QEMU_EFI_VARS.fd bs=1M count=64</code>
 
 
 
== Importing F21 aarch64 disk image ==
 
 
 
* Grab the disk image
 
** Landing page is here: https://fedoraproject.org/wiki/Architectures/AArch64/FoundationModelQuickStart
 
** Latest bits end up here: https://dmarlin.fedorapeople.org/fedora-arm/aarch64/
 
** This example uses: https://dmarlin.fedorapeople.org/fedora-arm/aarch64/F21-20141017-foundation-v8-RC1.tar.xz
 
** Extract the image, move it to /var/lib/libvirt/images
 
* From virt-manager.git checkout, run:
 
  sudo ./virt-install \
 
    --name f21-aarch64-import --ram 2048 --arch aarch64 \
 
    --boot loader_ro=yes,loader_type=pflash,loader=/usr/share/edk2.git/aarch64/QEMU_EFI-pflash.img,nvram_template=/usr/share/edk2.git/aarch64/QEMU_EFI_VARS.fd \
 
    --os-variant fedora21 --import \
 
    --disk /var/lib/libvirt/images/F21-20141017-foundation-v8.img
 
* The guest should start booting. Log in with user=root, password=fedora
 
* Note: Networking doesn't work automatically for this image, you'll need to change the config inside the VM to use DHCP
 
  
== Installing F21 aarch64 from URL ==
+
== Installing F23 aarch64 from URL ==
  
{{admon/warning | This currently doesn't work | There's a backtrace from python-blivet when transitioning to anaconda. Bug forthcoming...}}
+
* This example uses the F23 aarch64 install tree. The virt-install command is:
  
* This example uses the F21 aarch64 beta install tree: http://dl.fedoraproject.org/pub/fedora-secondary/releases/test/21_Beta/Server/aarch64/os/
 
* From the virt-manager.git checkout, run:
 
 
   sudo ./virt-install \
 
   sudo ./virt-install \
     --name f21-aarch64-urlinst --ram 2048 --arch aarch64 \
+
     --name f23-aarch64-urlinst --ram 2048 --arch aarch64 \
     --boot loader_ro=yes,loader_type=pflash,loader=/usr/share/edk2.git/aarch64/QEMU_EFI-pflash.img,nvram_template=/usr/share/edk2.git/aarch64/QEMU_EFI_VARS.fd \
+
     --boot uefi --disk size=8 \
    --disk size=8 \
+
     --location https://dl.fedoraproject.org/pub/fedora-secondary/releases/23/Server/aarch64/os/
     --location http://dl.fedoraproject.org/pub/fedora-secondary/releases/test/21_Beta/Server/aarch64/os/
 
  
== Installing F21 aarch64 from CDROM ==
+
== Installing F23 aarch64 from CDROM ==
 
 
{{admon/warning | This currently doesn't work | The CDROM doesn't automatically boot. May be able to make it work by messing with UEFI boot settings. Could be related to bug 1163481}}
 
  
 
* Grab the ISO:
 
* Grab the ISO:
** This example uses the F21 aarch64 beta DVD: https://dl.fedoraproject.org/pub/fedora-secondary/releases/test/21_Beta/Server/aarch64/iso/Fedora-Server-DVD-aarch64-21_Beta.iso
+
** This example uses the F23 aarch64 install DVD: https://dl.fedoraproject.org/pub/fedora-secondary/releases/23/Server/aarch64/iso/Fedora-Server-DVD-aarch64-23.iso
 
** Move it to /var/lib/libvirt/images
 
** Move it to /var/lib/libvirt/images
 
** From the virt-manager.git checkout, run:
 
** From the virt-manager.git checkout, run:
 +
 
   sudo ./virt-install \
 
   sudo ./virt-install \
     --name f21-aarch64-cdrom --ram 2048 --arch aarch64 \
+
     --name f23-aarch64-cdrom --ram 2048 --arch aarch64 \
     --boot loader_ro=yes,loader_type=pflash,loader=/usr/share/edk2.git/aarch64/QEMU_EFI-pflash.img,nvram_template=/usr/share/edk2.git/aarch64/QEMU_EFI_VARS.fd \
+
     --boot uefi --disk size=8 --os-variant fedora22 \
    --disk size=8 --os-variant fedora21 \
+
     --cdrom /var/lib/libvirt/images/Fedora-Server-DVD-aarch64-23.iso
     --cdrom /var/lib/libvirt/images/Fedora-Server-DVD-aarch64-21_Beta.iso
 
  
  
 
[[Category:AArch64]]
 
[[Category:AArch64]]

Latest revision as of 15:42, 2 February 2017

Installing Fedora aarch64 with QEMU and libvirt

These steps will work on both x86 and aarch64 hardware. If running on actual aarch64 hardware, the virt-install commands should automatically request KVM for maximum performance.

Get the necessary bits

  • Fedora 22 host or later is required
  • Grab the latest qemu-system-aarch64, libvirt, and virt-manager
  • Grab UEFI builds for QEMU and AARCH64: sudo dnf install edk2-aarch64 (fedora 23 & newer)

Installing F23 aarch64 from URL

  • This example uses the F23 aarch64 install tree. The virt-install command is:
 sudo ./virt-install \
   --name f23-aarch64-urlinst --ram 2048 --arch aarch64 \
   --boot uefi --disk size=8 \
   --location https://dl.fedoraproject.org/pub/fedora-secondary/releases/23/Server/aarch64/os/

Installing F23 aarch64 from CDROM

 sudo ./virt-install \
   --name f23-aarch64-cdrom --ram 2048 --arch aarch64 \
   --boot uefi --disk size=8 --os-variant fedora22 \
   --cdrom /var/lib/libvirt/images/Fedora-Server-DVD-aarch64-23.iso