System administrators and virtualization enthusiasts often look for flexible ways to manage virtual machines (VMs) with libvirt, KVM, and QEMU. While virt-manager is a popular graphical interface, some users require alternative tools for different workflows, remote management, or lighter system resources. Selecting the right application can streamline VM deployment, monitoring, and maintenance, especially in environments where virt-manager is not ideal or available.
Using Cockpit for Web-Based VM Management
Step 1: Install Cockpit and the Cockpit Machines module by running the following commands on your Linux system. Cockpit provides a web-based interface for managing servers and VMs, making it accessible from any browser.
sudo apt install cockpit cockpit-machines
Step 2: Enable and start the Cockpit service to allow access via the browser. This step ensures that Cockpit is running and listening for incoming connections.
sudo systemctl enable --now cockpit.socket
Step 3: Open your browser and navigate to https://localhost:9090
or replace localhost
with your server's IP address. Log in using your system credentials.
Step 4: Click on the "Virtual Machines" section in the Cockpit dashboard. Here, you can create, start, stop, and configure VMs. The interface offers an intuitive way to manage VM hardware, storage, and network settings without needing a local GUI session.
Cockpit is particularly effective for remote server management and works well on headless systems, reducing the need for a full desktop environment.
Managing VMs with GNOME Boxes
Step 1: Install GNOME Boxes using your package manager. GNOME Boxes is designed for simplicity and provides a streamlined experience for creating and running VMs on desktop systems.
sudo apt install gnome-boxes
Step 2: Launch GNOME Boxes from your applications menu. The interface guides you through creating a new virtual machine, selecting installation media, and configuring resources like CPU and memory.
Step 3: Use the graphical interface to start, pause, and delete VMs. Boxes is ideal for users who want a minimal, user-friendly approach to desktop virtualization without advanced configuration options.
GNOME Boxes is best suited for personal or light development use, and may lack some of the advanced features found in virt-manager or Cockpit.
Command-Line Management with Virsh
Step 1: Open a terminal and ensure that virsh
is installed. Virsh is a command-line tool for managing VMs via libvirt, offering precise control for scripting and automation.
sudo apt install libvirt-clients
Step 2: List all available VMs with the command below. This provides a quick overview of VM states and IDs.
virsh list --all
Step 3: Start, stop, or manage VMs using specific virsh
commands. For example, to start a VM named testvm
:
virsh start testvm
Step 4: Use virsh help
to explore additional commands for snapshot management, network configuration, and storage pools.
Virsh is powerful for advanced users comfortable with the terminal, and excels in environments where automation and scripting are priorities.
Exploring Other Alternatives
Several other tools can help manage libvirt/KVM/QEMU VMs, each with unique strengths:
- Kimchi: A lightweight web-based management tool for KVM, suitable for small deployments.
- oVirt: An enterprise-grade virtualization management platform, ideal for large-scale environments.
- aqemu: A Qt-based graphical front-end for QEMU, offering a classic desktop GUI.
- virt-viewer: A minimal tool for accessing VM consoles, useful for remote or headless systems.
These alternatives cater to different needs, from simple desktop virtualization to complex data center management.
Choosing the right application for managing libvirt/KVM/QEMU virtual machines depends on your workflow, system resources, and desired features. Switching between these tools can optimize your virtualization setup for speed, simplicity, or advanced control.
Member discussion