After completing this section, you should be able to install a virtual machine on your Red Hat Enterprise Linux server using Cockpit.
Virtualization is a feature that allows a single physical machine to be divided into multiple virtual machines (VM), each of which can run an independent operating system.
Red Hat Enterprise Linux 8 supports KVM (Kernel-based Virtual Machine), a full virtualization solution built into the standard Linux kernel. KVM can run multiple Windows and Linux guest operating systems.
In Red Hat Enterprise Linux, manage KVM with the virsh command or with Cockpit's Virtual Machines tool.
KVM virtual machine technology is available across all Red Hat products, from standalone physical instances of Red Hat Enterprise Linux to the Red Hat OpenStack Platform:
Physical hardware systems run Red Hat Enterprise Linux to provide KVM virtualization. Red Hat Enterprise Linux is typically a thick host, a system that supports VMs while also providing other local and network services, applications, and management functions.
Red Hat Virtualization (RHV) provides a centralized web interface that allows administrators to manage an entire virtual infrastructure. It includes advanced features such as KVM migration, redundancy, and high availability. A Red Hat Virtualization Hypervisor is a tuned version of Red Hat Enterprise Linux dedicated to the singular purpose of provisioning and supporting VMs.
Red Hat OpenStack Platform (RHOSP) provides the foundation to create, deploy, and scale a public or a private cloud.
Red Hat supports virtual machines running these operating systems:
Red Hat Enterprise Linux 6 and later
Microsoft Windows 10 and later
Microsoft Windows Server 2016 and later
Administrators can configure a Red Hat Enterprise Linux system as a virtualization host, appropriate for development, testing, training, or when needing to work in multiple operating systems at the same time.
Installing the Virtualization Tools
Install the virt Yum module to prepare a system to become a virtualization host.
[root@host ~]#yum module list virtName Stream Profiles Summary virt rhel [d][e] common [d] Virtualization module Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled[root@host ~]#yum module install virt...output omitted...
Verifying the System Requirements
KVM requires either an Intel processor with the Intel VT-x and Intel 64 extensions for x86-based systems or an AMD processor with the AMD-V and the AMD64 extensions. To verify your hardware and check the system requirements, use the virt-host-validate command.
[root@host ~]#virt-host-validateQEMU: Checking for hardware virtualization : PASS QEMU: Checking if device /dev/kvm exists : PASS QEMU: Checking if device /dev/kvm is accessible : PASS QEMU: Checking if device /dev/vhost-net exists : PASS QEMU: Checking if device /dev/net/tun exists : PASS QEMU: Checking for cgroup 'memory' controller support : PASS QEMU: Checking for cgroup 'memory' controller mount-point : PASS QEMU: Checking for cgroup 'cpu' controller support : PASS QEMU: Checking for cgroup 'cpu' controller mount-point : PASS QEMU: Checking for cgroup 'cpuacct' controller support : PASS QEMU: Checking for cgroup 'cpuacct' controller mount-point : PASS QEMU: Checking for cgroup 'cpuset' controller support : PASS QEMU: Checking for cgroup 'cpuset' controller mount-point : PASS QEMU: Checking for cgroup 'devices' controller support : PASS QEMU: Checking for cgroup 'devices' controller mount-point : PASS QEMU: Checking for cgroup 'blkio' controller support : PASS QEMU: Checking for cgroup 'blkio' controller mount-point : PASS QEMU: Checking for device assignment IOMMU support : PASS
The system must pass all of the validation items in order to be able to be a KVM host.
The virt Yum module provides the virsh command to manage your virtual machines. The Cockpit tool provides a web console interface for KVM management and virtual machine creation.
Install the cockpit-machines package to add the menu to Cockpit.
[root@host ~]#yum install cockpit-machines
If Cockpit is not already running, start and enable it.
[root@host ~]#systemctl enable --now cockpit.socket
To create a new virtual machine with Cockpit, access the menu in the Cockpit web interface. From there, click and enter the VM configuration in the Create New Virtual Machine window.
Name sets a domain name for the virtual machine configuration. This name is unrelated to the network host name you give the system in the installed VM.
Installation Source Type is the method for retrieving the installation ISO file. Choices include the local file system, or an HTTPS, FTP, or NFS URL.
Installation Source provides the path to the installation source.
OS Vendor and Operating System indicates the virtual machine's operating system. The virtualization layer presents hardware emulation compatible with the operating system chosen.
Memory is the amount of RAM to make available to the new VM.
Storage Size is the disk size to give the new VM. Associate additional disks with the VM after installation.
Immediately Start VM indicates whether the VM should immediately start after you click .
Click to create the VM and to start the operating system installation. Cockpit displays the VM console from which you can install the system.
For more information, refer to the Configuring and managing virtualization guide at https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/configuring_and_managing_virtualization/index