Logo
  • Ubuntu
  • CentOS
  • Debian
  • Fedora
  • RedHat

Managing KVM Virtual Machines with Cockpit Web Console in Linux - DesignLinux

Jan 05 2021
designlinux 0 Comments

Cockpit is a free and open-source front-end tool that provides administrative access to Linux systems. It allows system administrators to monitor, manage, and troubleshoot Linux servers. It provides an intuitive web interface that easy to navigate and keep track of the salient system features and resources.

There’s a whole lot of things you can do with the Cockpit. You can monitor system metrics such as CPU and memory utilization, view system logs, configure networking, check the status of running service, manage user accounts and so much more.

In this guide, we will focus on how you can manage KVM virtual machines with the Cockpit web console in Linux.

Requirements

Before we proceed further, ensure that you have installed the KVM virtualization platform on your Linux system. We have a detailed guide on how to install KVM on CentOS 8 and how to install KVM on Ubuntu 20.04.

Step 1: Install the Cockpit Web Console in Linux

The first task will be to install Cockpit on a Linux server. We will demonstrate how to do so on Debian and Ubuntu systems. We already have an article on how to install Cockpit on CentOS 8 and RHEL 8.

To get started, update your system package lists.

$ sudo apt update

Afterward, install the cockpit console by invoking the command:

$ sudo apt install cockpit

Along with the cockpit, you need to install the cockpit-machines package to help you manage virtual machines.

$ sudo apt install cockpit-machines

Once successfully installed, start Cockpit using the command:

$ sudo systemctl start cockpit

To verify its status, run:

$ sudo systemctl status cockpit

The output below confirms that the cockpit GUI frontend is running as expected.

Check Cockpit Web Status in Ubuntu
Check Cockpit Web Status in Ubuntu

Step 2: Accessing Cockpit Web Console

By default, cockpit listens on TCP port 9090, You can confirm this using the netstat command as shown.

$ sudo netstat -pnltu | grep 9090
Check Cockpit Web Port in Ubuntu
Check Cockpit Web Port in Ubuntu

If you accessing Cockpit remotely and your server is behind the UFW firewall, you need to allow port 9090 on the firewall. To achieve this, run the command:

$ sudo ufw allow 9090/tcp
$ sudo ufw reload

To access the Cockpit interface, open your browser and browse the following address:

https://server-ip:9090

At the login page, provide your user credentials and click the ‘Log In‘ button.

Cockpit Web Console Login
Cockpit Web Console Login

Step 3: Create and Manage KVM Virtual Machines in Cockpit Web Console

To start creating and managing a virtual machine, locate and click the ‘Virtual Machines’ option as shown.

Select Virtual Machines
Select Virtual Machines

On the ‘Virtual Machines’ page, click on the ‘Create New VM’ button.

Create New KVM VM in Cockpit
Create New KVM VM in Cockpit

Be sure to fill out all the details required as shown.

Add New KVM VM Details
Add New KVM VM Details

A detailed explanation of the above options used:

  • Name: This refers to an arbitrary name given to the virtual machine, for example, Fedora-VM.
  • Installation Source type: This can either be a Filesystem or a URL.
  • Installation Source: This is the path of the ISO image to be used during the installation of the Virtual machines.
  • OS vendor – The company/entity that develops and maintains the OS.
  • Operating System – The OS to be installed. Select your OS from the dropdown menu.
  • Memory – The RAM size is either Megabytes or Gigabytes.
  • Storage size – This is the hard disk capacity for the guest OS.
  • Immediately Start VM – If you want to immediately launch the VM upon creation, then simply check the checkbox option. For now, we will leave it unchecked and simply create the VM by clicking the ‘Create’ button.

Once done, your VM will be listed as shown.

New Fedora KVM VM
New Fedora KVM VM

Click on the newly created VM to get an overview of it as shown. To launch the virtual machine, simply click on the ‘Install’ button. This takes you to a black console that shows you the VM booting and will provide the first installation step with various options as shown.

New Fedora VM Booting
New Fedora VM Booting

As the virtual machine boots, let’s briefly have a look at other tabs options. The ‘Overview‘ tab provides basic information about the VM such as Memory size, and no. of vCPUs.

Virtual Machine Overview
Virtual Machine Overview

The ‘Usage’ section offers information about Memory and vCPU usage.

Virtual Machine Usage
Virtual Machine Usage

To view information about the virtual hard disk and the path of the ISO image used to create it, click on the ‘Disks’ tab.

Virtual Machines Disks
Virtual Machines Disks

The ‘Networks’ tab gives insights into the virtual network interfaces attached to the virtual machine.

Virtual Machine Networks
Virtual Machine Networks

Lastly, the console section gives you access to a VM using the Graphics console – thanks to the virt-viewer – or the serial console.

Virtual Machine Web Console
Virtual Machine Web Console

Additionally, you can Restart, Shutdown, or even Delete the virtual machine once done. You can find these options in the far right corner as shown.

Manage Virtual Machines
Manage Virtual Machines
Closing Thoughts

That basically sums up the management of KVM virtual machines using the Cockpit web interface. The cockpit console provides a seamless experience in the management of virtual machines by offering an intuitive and easy-to-use web interface.

Source: redhat.com

Related

Tags: CentOS Tips, Debian Tips, KVM Tips, RHEL Tips, Ubuntu Tips

Bash: Write to File

Prev Post

How to Install Apache Kafka in CentOS/RHEL 7

Next Post
Archives
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • July 2022
  • June 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
Categories
  • AlmaLinux
  • Android
  • Ansible
  • Apache
  • Arch Linux
  • AWS
  • Backups
  • Bash Shell
  • Bodhi Linux
  • CentOS
  • CentOS Stream
  • Chef
  • Cloud Software
  • CMS
  • Commandline Tools
  • Control Panels
  • CouchDB
  • Data Recovery Tools
  • Databases
  • Debian
  • Deepin Linux
  • Desktops
  • Development Tools
  • Docker
  • Download Managers
  • Drupal
  • Editors
  • Elementary OS
  • Encryption Tools
  • Fedora
  • Firewalls
  • FreeBSD
  • FTP
  • GIMP
  • Git
  • Hadoop
  • HAProxy
  • Java
  • Jenkins
  • Joomla
  • Kali Linux
  • KDE
  • Kubernetes
  • KVM
  • Laravel
  • Let's Encrypt
  • LFCA
  • Linux Certifications
  • Linux Commands
  • Linux Desktop
  • Linux Distros
  • Linux IDE
  • Linux Mint
  • Linux Talks
  • Lubuntu
  • LXC
  • Mail Server
  • Manjaro
  • MariaDB
  • MongoDB
  • Monitoring Tools
  • MySQL
  • Network
  • Networking Commands
  • NFS
  • Nginx
  • Nodejs
  • NTP
  • Open Source
  • OpenSUSE
  • Oracle Linux
  • Package Managers
  • Pentoo
  • PHP
  • Podman
  • Postfix Mail Server
  • PostgreSQL
  • Python
  • Questions
  • RedHat
  • Redis Server
  • Rocky Linux
  • Security
  • Shell Scripting
  • SQLite
  • SSH
  • Storage
  • Suse
  • Terminals
  • Text Editors
  • Top Tools
  • Torrent Clients
  • Tutorial
  • Ubuntu
  • Udemy Courses
  • Uncategorized
  • VirtualBox
  • Virtualization
  • VMware
  • VPN
  • VSCode Editor
  • Web Browsers
  • Web Design
  • Web Hosting
  • Web Servers
  • Webmin
  • Windows
  • Windows Subsystem
  • WordPress
  • Zabbix
  • Zentyal
  • Zorin OS
Visits
  • 0
  • 365
  • 649,080

DesignLinux.com © All rights reserved

Go to mobile version