Follow ZDNET: Add us as a preferred source on Google.
ZDNET’s key takeaways
- Cockpit offers an easy way to manage virtual machines.
- Once installed, this method is easy and versatile.
- Cockpit is free to use.
I recently wrote about my migration away from VirtualBox to KVM/Virt-Machine for my virtual machine needs. I’ve found those tools to be far superior (albeit with a bit more of a learning curve) than VirtualBox.
Since then, however, I’ve found another method of working with KVM (the Linux kernel virtual machine technology), one that not only allows me to create and manage virtual machines on my local computer, but also from any machine on my LAN.
That tool is Cockpit, which makes managing your Linux machines considerably easier.
Also: The best Linux distributions for beginners: Expert tested and reviewed
Cockpit can be installed on just about any Linux distribution and has a virtual machines plugin you can add into the mix. With this plugin, you can:
- Create new virtual machines
- Import virtual machines
- Start virtual machines
- View virtual machines
- Insert disks into a virtual machine
- Add network interfaces to a virtual machine
- And much more
The Cockpit/Virtual Machines combination is very powerful and quite useful.
Let me show you how to install and use it.
Installing Cockpit
What you’ll need: I’m going to install and run Cockpit on my main Pop!_OS installation. You can install Cockpit on other distros with your default package manager (such as dnf and pacman). Besides the Linux distro, you’ll also need a user with sudo privileges.
Let’s make this happen.
Install Cockpit with the following command:
sudo apt-get install cockpit -y
Next, install the virtual machines plugin with the command:
sudo apt-get install cockpit-machines -y
You could also install both of those packages with the single command:
sudo apt-get install cockpit cockpit-machines -y
You’re now ready to rock.
Using Cockpit for virtual machines
After installing Cockpit, you access it from within your web browser by pointing it to http://IP:9090 (where IP is the IP address of the machine running Cockpit). Since it wasn’t installed with an SSL certificate, you’ll need to accept the “risk” and continue. How this works will depend on the web browser you use.
Also: 5 of my favorite Linux distros ready to use out of the box – no setup required
Regardless of what browser you use, you’ll have to okay accessing the insecure site.
Jack Wallen/ZDNET
For example, if you’re using Chrome, you could click Advanced and then “Proceed to IP (unsafe)” where IP is the IP address.
You’ll then be presented with the Cockpit login screen, where you can type your Linux username and password to access the system.
Login with your standard user.
Jack Wallen/ZDNET
If you’re presented with a button labeled “Turn on administrative access,” click that and, when prompted, type your username/password again.
Also: My 11 favorite Linux distributions of all time, ranked
In the left sidebar, you should see an entry labeled “Virtual machines.” Click that, and you’re ready to manage your VMs.
As you can see, I already have some virtual machines created.
Jack Wallen/ZDNET
One of the best things about managing your VMs this way is that you can opt to have Cockpit download the necessary ISO for the machine. To do that, click Create VM. In the resulting window, give the VM a unique name, leave “Installation type” set to “Download an OS.”
I would suggest going with the local ISO option for reliability.
Jack Wallen/ZDNET
From the “Operating system” drop-down, select the Linux distribution you want to use. The only caveat to this method is that some of the distribution releases are out of date. If you don’t find the version (or distro) that you want, select Local Install Media from the “Installation type” drop-down, and then you can locate your ISO image from the “Operating system” drop-down.
Configure the rest of your VM (storage, storage limit, and memory) and then click “Create and run” at the bottom of the pop-up. I did run into issues with the download option, where it was unable to locate the ISO image. Because of that, I always download the ISO manually.
Also: 5 reasons to switch to an immutable Linux distro today – and which to try first
You can then select to view the running VM by way of the Desktop viewer, VNC console, or the Serial console. The VNC console runs the VM from within the browser, and the Desktop viewer downloads a file, which, once you click on it, will open the desktop viewer. No matter which viewer you choose, you can then walk through the process of installing the OS.
Once the installation is finished, reboot, and you’re ready to start working with your virtual machine. You can do this from within Cockpit or even go back to your desktop and run it from within Virt-Manager if you like.
(Except for the headline, this story has not been edited by PostX News and is published from a syndicated feed.)