Fedora uses the libvirt family of tools as its virtualization solution.

Enabling hardware virtualization support

This section covers setting up libvirt on your system. After setting up libvirt, you can create virtualized guest operating systems, also known as virtual machines.

System requirements

To run virtualization on Fedora, you need:

  • At least 600MB of hard disk storage per guest. A minimal command-line Fedora system requires 600MB of storage. Standard Fedora desktop guests require at least 3GB of space.

  • At least 256MB of RAM per guest, plus 256MB for the base operating system. At least 756MB is recommended for each guest of a modern operating system. A good way to estimate this is to think about how much memory is required for the operating system normally, and allocate that amount to the virtualized guest.

KVM requires a CPU with virtualization extensions, found on most consumer CPUs. These extensions are called Intel VT or AMD-V. To check whether you have CPU support, run the following command:

$ egrep '^flags.*(vmx|svm)' /proc/cpuinfo

If this command results in nothing printed, your system does not support the relevant virtualization extensions. You can still use QEMU/KVM, but the emulator will fall back to software virtualization, which is much slower.

Installing virtualization software

When installing Fedora, you can install the virtualization packages by selecting Virtualization in the Base Group in the installer. See Installing Using Anaconda.

For existing Fedora installations, you can install the virtualization tools via the command line using the Virtualization Package Group. To view the packages, run:

$ dnf groupinfo virtualization

Group: Virtualization
Group-Id: virtualization
Description: These packages provide a virtualization environment.

Mandatory Packages:

Default Packages:

Optional Packages:
  1. Run the following command to install the mandatory and default packages in the virtualization group:

    # dnf install @virtualization

    Alternatively, to install the mandatory, default, and optional packages, run:

    # dnf group install with-optional virtualization
  2. After the packages install, start the libvirtd service:

    # systemctl start libvirtd

    To start the service on boot, run:

    # systemctl enable libvirtd
  3. To verify that the KVM kernel modules are properly loaded:

    $ lsmod | grep kvm
    kvm_amd                55563  0
    kvm                   419458  1 kvm_amd

    If this command lists kvm_intel or kvm_amd, KVM is properly configured.

Networking Support

By default, libvirt will create a private network for your guests on the host machine. This private network will use a 192.168.x.x subnet and not be reachable directly from the network the host machine is on. However, virtual guests can use the host machine as a gateway and can connect out via it. If you need to provide services on your guests that are reachable via other machines on your host network you can use iptables DNAT rules to forward in specific ports, or you can set up a bridged environment.

See the libvirt networking setup page for more information on how to setup a bridged network.

Creating virtual machines

The installation of Fedora guests using Anaconda is supported. The installation can be started on the command-line using the virt-install program or in the user interface program virt-manager.

Creating a guest with virt-install

virt-install is a command-line based tool for creating virtualized guests. Refer to http://virt-tools.org/learning/install-with-command-line/ for understanding how to use this tool. Execute virt-install --help for command line help.

virt-install can use kickstart files, for example, virt-install -x ks=kickstart-file-name.ks.

If graphics were enabled, a VNC window will open and present the graphical installer. If graphics were not enabled, a text installer will appear. Proceed with the Fedora installation.

Creating a guest with virt-manager

  1. Start Virtual Machine Manager by navigating to menu:Applications[System Tools], or by running the following command:

    # virt-manager
  2. Open a connection to a hypervisor by navigating to menu:File[Add connection].

  3. Choose qemu for KVM, or Xen for Xen.

  4. Choose local or select a method to connect to a remote hypervisor.

  5. After a connection is opened, click the new icon next to the hypervisor, or right-click on the active hypervisor and select New.

  6. Configure the virtual machine following the steps in the New VM wizard.

  7. Click Finish at the end of the wizard to provision the guest operating system. After a few moments a VNC window will appear. Proceed with the Fedora installation.

Managing virtual machines

When the installation of the guest operating system is complete, it can be managed using the virt-manager program or via command line using virsh.

Managing guests with virt-manager

  1. Start the Virtual Machine Manager by navigating to menu:[Applications]System Tools, or run:

    # virt-manager

    If you are not root, you will be prompted to enter the root password. Choose Run unprivileged to operate in read-only non-root mode.

  2. Choose the host you wish to manage and click Connect in the Open Connection dialog window.

  3. The list of virtual machines is displayed in the main window. Guests that are running will display a ">" icon. Guests that are not running will be greyed out.

  4. To manage a particular guest, double click on it, or right click and select Open.

  5. A new window for the guest will open that will allow you to use its console, see information about its virtual hardware and start, stop, and pause it.

For further information about virt-manager, see http://virt-manager.et.redhat.com/.

Bugs in the virt-manager tool should be reported in Bugzilla against the virt-manager component.

Managing guests with virsh

The virsh command-line utility allows you to manage virtual machines on the command line. The virsh utility is built around the libvirt management API:

  • virsh has a stable set of commands whose syntax and semantics are preserved across updates to the underlying virtualization platform.

  • virsh can be used as an unprivileged user for read-only operations (e.g. listing domains, listing domain statistics).

  • virsh can manage domains running under Xen, QEMU/KVM, ESX, or other back-ends with no perceptible difference to the user.

To start a virtual machine:

# virsh create <name of virtual machine>

To list the virtual machines currently running:

# virsh list

To list all virtual machines, running or not:

# virsh list --all

To gracefully power off a guest:

# virsh shutdown <virtual machine (name | id | uuid)>

To non gracefully power off a guest:

# virsh destroy <virtual machine (name | id | uuid)>

To save a snapshot of the machine to a file:

# virsh save <virtual machine (name | id | uuid)> <filename>

To restore a previously saved snapshot:

# virsh restore <filename>

To export the configuration file of a virtual machine:

# virsh dumpxml <virtual machine (name | id | uuid)

For a complete list of commands available for use with virsh:

# virsh help

Or consult the manual page: man virsh.

Bugs in the virsh tool should be reported in Bugzilla against the libvirt component.

Remote management

The following remote management options are available:

  • If using non-root users via SSH, see the setup instructions in http://wiki.libvirt.org/page/SSHSetup

  • If using root for access via SSH, then create SSH keys for root, and use ssh-agent and ssh-add before launching virt-manager.

  • To use TLS, set up a local certificate authority and issue x509 certs to all servers and clients. For information on configuring this option, see http://wiki.libvirt.org/page/TLSSetup.

Other virtualization options

QEMU/KVM without libvirt

QEMU/KVM can be invoked directly without libvirt, however you cannot to use tools such as virt-manager, virt-install, or virsh. Plain QEMU (without KVM) can also virtualize other processor architectures like ARM or PowerPC.


Fedora can run as a Xen guest operating system and also be used as a Xen host (with the latter being true from Fedora 16; for using an earlier version of Fedora as a Xen host, check out the experimental repo available at http://myoung.fedorapeople.org/dom0). For a guide on how to install and setup a Fedora Xen host, see Fedora Host Installation page on the Xen Project wiki.


OpenStack consists of a number of services for running infrastructure as a service (IaaS) clouds. They are the Object Store (Swift), Compute (Nova), and Image (Glance) services.


OpenNebula is an open source toolkit for data center virtualization.


The oVirt project is an open virtualization project providing a end-to-end, server virtualization management system with advanced capabilities for hosts and guests, including high availability, live migration, storage management, system scheduler, and more.

Troubleshooting and known issues

For a list of known unresolved issues, as well as troubleshooting tips, see FIXME How to debug virtualization problems