Red Hat Enterprise Linux 8 Essentials Book now available.
Purchase a copy of Red Hat Enterprise Linux 8 (RHEL 8) Essentials in eBook ($24.99) or Print ($36.99) format
Red Hat Enterprise Linux 8 Essentials Print and eBook (ePub/PDF/Kindle) editions contain 31 chapters and over 250 pages
6.3. Creating guests with virt-manager
virt-manager, also known as Virtual Machine Manager, is a graphical tool for creating and managing virtualized guests.
Procedure 6.1. Creating a virtualized guest with virt-manager
virt-manager. Launch the application from the menu and submenu. Alternatively, run the
virt-manager command as root.
Optional: Open a remote hypervisor
Select the hypervisor and press the Connect button to connect to the remote hypervisor.
Create a new guest
Figure 6.1. Virtual Machine Manager window
New VM wizard
The wizard breaks down the guest creation process into five steps:
Naming the guest and choosing the installation type
Locating and configuring the installation media
Configuring memory and CPU options
Configuring the guest's storage
Configuring networking, hypervisor type, architecture, and other hardware settings
virt-manager can access the installation media (whether locally or over the network).
Specify name and installation type
The guest creation process starts with the selection of a name and installation type. Virtual machine names can have underscores (
_), periods (
.), and hyphens (
Type in a virtual machine name and choose an installation type:
- Local install media (ISO image or CDROM)
This method uses a CD-ROM, DVD, or image of an installation disk (e.g.
- Network Install (HTTP, FTP, or NFS)
Network installing involves the use of a mirrored Red Hat Enterprise Linux or Fedora installation tree to install a guest. The installation tree must be accessible through either HTTP, FTP, or NFS.
- Network Boot (PXE)
This method uses a Preboot eXecution Environment (PXE) server to install the guest. Setting up a PXE server is covered in the Deployment Guide
. To install via network boot, the guest must have a routable IP address or shared network device. For information on the required networking configuration for PXE installation, refer to Chapter 10, Network Configuration
- Import existing disk image
This method allows you to create a new guest and import a disk image (containing a pre-installed, bootable operating system) to it.
Click Forward to continue.
Next, configure the and of the installation. Except for network booting, this step also requires further configuration (depending on your chosen installation method). When using local install media or importing an existing disk image, you need to specify the location of the installation media or disk image.
Figure 6.3. Local install media (configuration)
Figure 6.4. Import existing disk image (configuration)
It is recommend that you use the default directory for virtual machine images,
. If you are using a different location, make sure it is added to your SELinux policy and relabeled before you continue with the installation. Refer to Section 16.2, “SELinux and virtualization”
for details on how to do this.
When performing a network install, you need to specify the URL of the installation tree. You can also specify the URL of any kickstart files you want to use, along with any kernel options you want to pass during installation.
Figure 6.5. Network Install (configuration)
Click Forward to continue.
Configure CPU and memory
The next step involves configuring the number of CPUs and amount of memory to allocate to the virtual machine. The wizard shows the number of CPUs and amount of memory you can allocate; configure these settings and click Forward.
Figure 6.6. Configuring CPU and Memory
Assign a physical storage device (Block device) or a file-based image (File). File-based images should be stored in
/var/lib/libvirt/images/ to satisfy default SELinux permissions.
Figure 6.7. Configuring virtual storage
If you chose to import an existing disk image during the first step,
virt-manager will skip this step.
Assign sufficient space for your virtualized guest and any applications the guest requires, then click Forward to continue.
Verify the settings of the virtual machine and click Finish when you are satisfied; doing so will create the guest with default networking settings, virtualization type, and architecture.
Figure 6.8. Verifying the configuration
If you prefer to further configure the virtual machine's hardware first, check the box first before clicking Finish
. Doing so will open another wizard Figure 6.9, “Virtual hardware configuration”
that will allow you to add, remove, and configure the virtual machine's hardware settings.
Figure 6.9. Virtual hardware configuration
After configuring the virtual machine's hardware, click Apply.
virt-manager will then create the guest with your specified hardware settings.