If you’ve been using Red Hat Enterprise Linux (RHEL) for very long, you’ve likely created and used KVM virtual machines at some point. In RHEL 7, the primary graphical user interface tool that is used for this is virt-manager. With RHEL 8, now in beta, you’ll be able to do this from your browser.
One of the features included with RHEL 8 Beta is the ability to manage virtual machines from the Web Console (also known as Cockpit), and the announcement that virt-manager has been deprecated. The Web Console is intended to become its replacement in a subsequent release. It is recommended that you use the Web Console as your virtual machine graphical management tool.
However, virt-manager is still included in RHEL 8, and some functionality may only be available from virt-manager or from the command line.
If you’re not familiar with the Web Console, it is a web based management tool that allows you to complete many common RHEL tasks from a web browser. Want to see it in action? I’ve created a video that provides an overview of Web Console and its functionality.
The advantage of managing virtual machines from the Web Console is that you can access it from anywhere in the world you have a web browser and access to port 9090 on the RHEL 8 system. So if your workstation at your desk runs a different operating system, you can still use a web browser on it to connect to the RHEL Web Console and manage the virtual machines running on the RHEL system.
You can even manage virtual machines from a mobile device using a mobile web browser. For more information on using the Web Console from a mobile device, see "Managing RHEL 8 Beta from your Mobile Device with the Web Console."
The Web Console is installed by default on most RHEL 8 installations, unless you do a minimal installation. However, the Web Console is not started by default, so the first step is to enable it with this command:
# systemctl enable --now cockpit.socket
We then need to install some additional packages, starting with the cockpit-machines package, which enables managing virtual machines from the Web Console:
# yum install cockpit-machines
The virt-viewer package can optionally be installed if you want the ability to open a graphical console in the desktop viewer from the RHEL 8 system itself (for example, if you are at the RHEL 8 system console, login, and open a web browser and access the Web Console locally).
# yum install virt-viewer
The next step is to open a web browser (either from a remote host, or from the RHEL 8 system console), and go to the RHEL 8 systems hostname or IP address, followed by
:9090 to specify port 9090, for example:
Log in to the Web Console with the root account, or with another RHEL account. If using another account which has sudo access setup, you can check the "Reuse my password for privileged tasks" box in order to have the Web Console use sudo for privileged tasks.
Once logged in, click on the Virtual Machines option in the menu on the left. If you don’t see this option listed in the menu, verify that you installed the cockpit-machines package as previously covered.
To create a new virtual machine, click on the Create VM button. In this example, we have downloaded a Fedora 29 ISO image to /iso/Fedora-Workstation-Live-x86_64-29-1.2.iso, and will create a new VM with it as an installation source, as shown:
Once we click Create, the VM is automatically started since we checked Immediately Start VM, and we are taken to the console of the newly created virtual machine:
While the system is booting up, we will take a look at the other tabs available.
From the Overview tab we can see basic information about the virtual machine, such as the memory, vCPUs, boot order, etc:
From the Usage tab, we can see information regarding memory and vCPU usage:
Under the Disks tab, we can see the virtual disks that are allocated to the virtual machine, and have the ability to add additional disks:
On the Networks tab, the virtual network interface devices assigned to the virtual machine are listed, and we can edit or unplug them.
Finally on the Consoles tab, we have the ability to access a console on the VM, using the web-based Graphics Console (VNC), the Graphics Console in Desktop Viewer (which uses virt-viewer), or the Serial Console.
On the upper right side of the virtual machine menu, there is the option to restart, shut down, or delete the virtual machine.
The virtual machine capabilities in the RHEL 8 Web Console can help make management of virtual machines easier, especially when you are managing a remote server through a web browser. To see a video demonstration of managing virtual machines from the Web Console in RHEL 8, view this video.