Linux VPS

Manage a remote KVM host with virt-manager or Cockpit

Manage VMs on a headless KVM server from your desktop: connect virt-manager over SSH, or install Cockpit with the machines plugin for a browser-based UI, and secure both.

BeginnerKVM hosts2 min read

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 libvirt group, or root.
  • For virt-manager: a Linux desktop (or WSL with a GUI on Windows).

Option 1: virt-manager over SSH

  1. Install it on your desktop: sudo apt install virt-manager (Debian/Ubuntu) or sudo dnf install virt-manager.
  2. Open virt-manager → File → Add Connection.
  3. Hypervisor QEMU/KVM, tick Connect to remote host over SSH, enter the username and hostname, tick Autoconnect.
  4. 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 --all

No extra ports are needed: consoles are tunnelled through SSH.

Option 2: Cockpit web console

On the KVM host:

sudo apt install -y cockpit cockpit-machines
sudo systemctl enable --now cockpit.socket

On 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-managerCockpit
Runs onYour desktopThe server, used in a browser
Feature depthVery detailed hardware editingCommon tasks, simpler
Extra server portsNone (SSH only)9090
Also managesVMs onlyWhole 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 libvirt group.
  • Cockpit shows no Virtual machines tab: install cockpit-machines and 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.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.