Setting up a Virtual Machine
Enable UEFI support for KVM virtual machines
Fedora IoT requires UEFI, take a look at this wiki page on how to make it available for your VM: https://docs.fedoraproject.org/en-US/quick-docs/uefi-with-qemu/
Once everything’s set, make sure you enable UEFI for the new VM:
-
If using virt-install, add the
--boot uefi
flag -
If using Virtual Machine Manager, check
Customize configuration before install
before finishing the initial setup → Overview → Firmware: UEFI → Begin Installation -
If using plain
qemu-kvm
make sure to point the-bios
flag to the OVMF binary
Setup with QEMU/KVM Tools
The images generated are compressed raw disk images. They can be utilized both on physical devices and used as disks on a virtualization platform. The images work without change on QEMU/KVM.
On QEMU/KVM the tools that can be used to run the image in a VM include Virtual Machine Manager or virsh
command line utility. These tools are available in most Linux distributions.
Decompress the image as below and then choose an option to import virtual machine.
$ xz -d Fedora-IoT-[version].raw.xz
If using iso image, choose the option to create virtual machine and follow the installation steps. |
When asked for an installation source or storage location, point to the downloaded disk image.
When your image begins booting, continue with the Zezere instructions.
To learn more about the libvirt family of tools used in Fedora, visit the Getting started with virtualization section of the Fedora Documentation.
QEMU (on Linux hosts only) also supports user mode emulation. In this mode, QEMU can launch Linux processes compiled for one CPU on another CPU. Learn more in the How to use QEMU section of the Fedora Documentation.
Setup with virt-install
For fast iterations on the raw image, you can use virt-install
:
$ xz -d Fedora-IoT-[version].raw.xz $ qemu-img convert -f raw Fedora-IoT-[version].raw -O qcow2 Fedora-IoT-[version].qcow2 $ virt-install --name FedoraIoT --memory 2048 --vcpus 2 --boot uefi \ --disk /path/to/Fedora-IoT-[version].qcow2 \ --import --os-variant fedora[version]
Setup with GNOME Boxes
While GNOME Boxes is based on libvirt
, it does not support all of the features and it does not recognize the raw image format. The images we produce need to be converted to to a QCOW2 format. This can be done with the qemu-img
command found in the qemu-img
package.
Decompress and convert the image as below and then create a new virtual machine.
$ xz -d Fedora-IoT-[version].raw.xz $ qemu-img convert -f raw Fedora-IoT-[version].raw -O qcow2 Fedora-IoT-[version].qcow2
When asked for an installation source or storage location, point the tool at the existing disk image.
When your image begins booting, continue with the Zezere instructions.
Alternately, you can install a new box from the ISO image.
When installing from the ISO image, after selecting the ISO from your filesystem, you’ll see that the Operating System has not been found.
To continue with the installation, type 'Fedora' in the 'Search for an operating system…' box and select the 'Fedora' option.
Once the Fedora Operating System option has been selected, an option to select the Firmware type will appear, select 'UEFI' and continue with the Virtual Machine creation.
More information on using GNOME Boxes can be found in the GNOME HELP pages.
Setup with VirtualBox
The images we produce need to be converted to be used with VirtualBox. This can be done with the qemu-img
command found in the qemu-img
package.
Decompress and convert the image as below and then create a new virtual machine.
$ xz -d Fedora-IoT-[version].raw.xz $ qemu-img convert -f raw Fedora-IoT-[version].raw -O vdi Fedora-IoT-[version].vdi
When asked for an installation source or storage location, point the tool at the existing disk image.
When your image begins booting, continue with the Zezere instructions.
More information for using Virtual Box can be found at VirtualBox.org
Want to help? Learn how to contribute to Fedora Docs ›