Installing and Using KVM
In order to run KVM, you must have a processor that supports hardware virtualization.
Find out if any of the packages needed to run KVM are already installed by running the following command:
rpm -q virt-viewer qemu-kvm virt-manager python-virtinst
If any of these four packages are not installed, run the following command in root:
yum groupinstall 'Virtualization'
If your system cannot install these packages, your processor most likely does not support hardware virtualization.
There are two ways to install virtual machines on Fedora using KVM:
Building a Virtual Machine Through the Command Line
Download a ISO image of the virtual machine you wish to install OR have a CD-ROM/DVD disk readily available with the guest operating system loaded on it
First create a base image using qemu-img on which to install the guest OS. Do this by running a command similar to the following:
qemu-img create -f [FILE FORMAT] [IMAGE FILE NAME] [FILE SIZE]
- [FILE FORMAT] ---> The most common file format is
qcow2. It will make using the base image easier later. Another common file format is
- [IMAGE FILE NAME] ---> Choose your own file name that reflects the guest operating system (does not need to be specific).
- [FILE SIZE] ---> Choose a file size to your liking that is large enough to run the guest operating system to be installed. (Suffixes for sizes are K, M, G, T, etc.)
Once the base image has been created, you can install a guest operating system in this base image. To do so, run a command similar to the following (WARNING - Only for 64-bit kernels):
qemu-system-x86_64 -hda [BASE IMAGE FILE NAME] -m [MEMORY] -boot d -cdrom [GUEST OS LOCATION]
- [MEMORY] ---> Choose how much memory you wish to designate to the virtual machine
- [GUEST OS LOCATION] ---> If an ISO image, enter the file name of the ISO. If loading the guest OS from disk, enter
This will lead you to install the guest OS on the base image. After completing this process once, you never have to boot this image again.
Building a Virtual Machine Through the GUI Tool
Launch Virtual Machine Manager by either selecting in Applications or running
virt-manager in the command line.
In the VM Manager window, create a new virtual machine by selecting New
Follow the installation steps of creating a new VM. Specify the following:
- Location of the guest operating system file
- Operating system type and version
- Memory and CPU Settings
- Disk Image (either new or existing) and disk image size
Select "Finish," and installation of the VM will begin.