You do not need a desktop on your KVM server to get a graphical interface. You can manage KVM remotely with virt-manager on your own computer over SSH, or with Cockpit, a lightweight web console. Both talk to libvirt on the host.
Before you start
- A KVM host with libvirt; see install KVM on Ubuntu.
- SSH key login to the host with a user in the
libvirtgroup, or root. - For virt-manager: a Linux desktop (or WSL with a GUI on Windows).
Option 1: virt-manager over SSH
- Install it on your desktop:
sudo apt install virt-manager(Debian/Ubuntu) orsudo dnf install virt-manager. - Open virt-manager → File → Add Connection.
- Hypervisor QEMU/KVM, tick Connect to remote host over SSH, enter the username and hostname, tick Autoconnect.
- Click Connect. Your VMs appear, and you can open graphical consoles, change hardware and create VMs.
Command-line equivalent for a quick check:
virsh -c qemu+ssh://admin@kvm1.example.com/system list --allNo extra ports are needed: consoles are tunnelled through SSH.
Option 2: Cockpit web console
On the KVM host:
sudo apt install -y cockpit cockpit-machinessudo systemctl enable --now cockpit.socketOn AlmaLinux/Rocky use dnf. Open https://server-ip:9090 and log in with a system user that has sudo. Under Virtual machines you can create VMs from ISOs or cloud images, open a VNC or serial console, attach disks and networks, and manage storage pools.
Secure remote management
- Use SSH keys and disable password login; see SSH lockdown checklist.
- Do not expose Cockpit's port 9090 to the whole internet. Allow only your IP, or reach it through a VPN or SSH tunnel:
ssh -L 9090:localhost:9090 admin@kvm1.example.com. - Replace Cockpit's self-signed certificate with a real one if you use it often.
- Never open libvirt's TCP port (16509) without TLS.
virt-manager vs Cockpit
| virt-manager | Cockpit | |
|---|---|---|
| Runs on | Your desktop | The server, used in a browser |
| Feature depth | Very detailed hardware editing | Common tasks, simpler |
| Extra server ports | None (SSH only) | 9090 |
| Also manages | VMs only | Whole server: logs, services, updates |
Troubleshooting
- virt-manager asks for a password repeatedly: set up SSH keys and an agent.
- "authentication unavailable": the remote user is not in the
libvirtgroup. - Cockpit shows no Virtual machines tab: install
cockpit-machinesand reload the page.
Frequently asked questions
Can I use virt-manager from Windows?
Not natively. Use WSL with GUI support, or use Cockpit in a browser.
Is Cockpit safe on a public server?
It uses system logins over HTTPS, but limit access by IP and use strong authentication.
Should I use Proxmox instead?
For a dedicated virtualization host, Proxmox VE gives a richer web UI; see install Proxmox VE.
