Guides tagged “libvirt”
Step-by-step MdmHost guides about libvirt, sorted A-Z.
24 guides · page 1 of 2
Back up running KVM VMs with virsh and a simple script
Back up live KVM virtual machines without downtime using external snapshots and blockcommit, save the XML definition, compress and copy off-host, schedule with cron and restore.
Create a KVM virtual machine with virt-install
Use virt-install to create a KVM virtual machine from the command line: choose CPU, RAM and disk, attach an ISO or cloud image, connect a bridge and finish the install over VNC or serial console.
Create isolated and routed networks in libvirt
Define libvirt virtual networks beyond the default NAT: isolated networks for private VM traffic, routed networks for extra public subnets, DHCP ranges and static leases, and how to attach VMs.
Install and use the QEMU guest agent on KVM VMs
Install qemu-guest-agent on Linux and Windows VMs, add the virtio-serial channel on the host, and use it for clean shutdowns, IP reporting, filesystem freeze for backups and password resets.
Install KVM on AlmaLinux or Rocky Linux
Install KVM on AlmaLinux or Rocky Linux 8/9: check virtualization support, install the virtualization host packages, start libvirt's modular daemons, create a bridge with nmcli and use Cockpit.
Install KVM on Ubuntu Server with libvirt and virt-manager
Install KVM on Ubuntu step by step: check VT-x/AMD-V support, install QEMU, libvirt and tools, add your user to the right groups, create a network bridge and verify the setup.
KVM and libvirt common errors and how to fix them
Fix the most common KVM and libvirt errors: /dev/kvm missing, permission denied on images, network default not active, domain already exists, failed to connect to the hypervisor and more.
KVM CPU models explained: host-passthrough, host-model and named models
Choose the right CPU model for KVM VMs: host-passthrough for maximum features, host-model for balance, named or x86-64-v levels for migration across mixed hardware, and how to check what a guest sees.
KVM disk performance: cache modes, io modes and iothreads
Tune KVM virtual disk performance: compare cache=none, writeback and writethrough, io=native, threads and io_uring, add iothreads, enable discard, and measure results with fio.
KVM live migration with virsh: move running VMs between hosts
Move a running KVM virtual machine to another host with virsh migrate: shared vs local storage, CPU compatibility, network and SSH requirements, and how to verify and troubleshoot.
KVM snapshots with virsh: create, revert and delete
Create, list, revert and delete KVM VM snapshots with virsh, understand internal vs external snapshots, add the guest agent for consistency, and why snapshots are not backups.
libvirt storage pools explained: dir, logical, netfs, ZFS and RBD
An overview of libvirt storage pool types for KVM: directory, LVM logical, NFS netfs, iSCSI, ZFS and Ceph RBD, with commands to define, list and manage pools and volumes.
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.
Monitor KVM hosts and VMs with Prometheus and Grafana
Collect metrics from KVM hypervisors with node_exporter and a libvirt exporter, scrape them with Prometheus, build Grafana dashboards for host and per-VM CPU, memory, disk and network, and add alerts.
NUMA and virtual machines: keep large VMs fast
What NUMA is on multi-socket servers, why large VMs slow down when they span NUMA nodes, how to inspect topology with numactl and lscpu, and how to align vCPUs and memory with libvirt.
Port forwarding to KVM VMs on libvirt's NAT network
Expose services in KVM VMs behind libvirt's default NAT network: give VMs fixed DHCP addresses, add iptables or nftables DNAT rules, make them persistent with a libvirt hook and test.
Set up NFS shared storage for KVM hosts
Export an NFS share from a storage server, mount it on KVM hosts, add it as a libvirt storage pool for VM disks, ISOs and backups, and tune it for live migration and reliability.
Share host folders with KVM VMs using virtiofs
Use virtiofs to share a host directory with KVM guests at near-local speed: requirements, enabling shared memory, adding a filesystem device in libvirt, mounting in Linux and Windows, and security notes.
USB passthrough to KVM VMs with libvirt
Pass a USB device such as a licence dongle, Zigbee stick or UPS to a KVM virtual machine: find vendor and product IDs, attach by ID or port with virsh, hotplug, and fix common permission issues.
Use Ceph RBD block storage with libvirt and KVM
Connect KVM hosts to an existing Ceph cluster: create an RBD pool and client key, store the secret in libvirt, define an RBD storage pool, create VM disks and live migrate without copying data.
Browse by topic
- Getting startedYour first hour with a new server: access, logins and basics.83 guides
- cPanelFiles, databases, email, domains and every cPanel tool, step by step.67 guides
- WHM & resellingWHM, packages, reseller accounts, WHMReseller and running a hosting brand.53 guides
- WordPressInstall, secure, speed up, migrate and fix WordPress sites.49 guides
- Email & webmailMailboxes, webmail, forwarders, spam filters and email delivery.67 guides
- DomainsRegistering, transferring and managing domains and nameservers.27 guides
- SSL certificatesFree AutoSSL, Let's Encrypt, paid certificates and HTTPS.41 guides
- CloudLinuxCloudLinux setup and use: LVE limits, CloudLinux Manager, CageFS and PHP/Node.js selectors.31 guides
- LiteSpeedLiteSpeed Web Server, LSCache and the LiteSpeed Cache plugin: install, settings and tuning.35 guides
- Imunify360Malware scanning, firewall and proactive defence with Imunify360.24 guides
- SoftaculousInstall, update, clone and back up apps with Softaculous.24 guides
- WP SquaredcPanel's WordPress platform: sites, plugins, staging and backups.9 guides
- SitePadBuild and publish websites with the SitePad builder.9 guides
- SitejetDesign, edit and publish sites with the Sitejet builder.9 guides
- WHMResellerAlpha and master resellers with WHMReseller: install, setup and use.12 guides
- VirtFusionInstall, set up and manage VirtFusion: hypervisors, packages, servers and WHMCS integration.28 guides
- VirtualizorManage your VPS with Virtualizor: power, OS reinstall, VNC, IPs and backups.44 guides
- PleskWebsites, email, databases and settings in the Plesk panel.53 guides
- DirectAdminUsers, domains, email and reseller tools in DirectAdmin.41 guides
- WHMCSBilling, automation, products and client management with WHMCS.52 guides
- Control panelscPanel & WHM, Plesk, DirectAdmin and other panels on your VPS.107 guides
- SecurityKeys, passwords, firewalls and keeping a server patched.138 guides
- Networking & DNSIP addresses, reverse DNS, ports and traffic.72 guides
- Websites & appsWeb servers, WordPress, PHP, Node.js, SSL and app hosting.83 guides
- DatabasesMySQL, MariaDB, PostgreSQL, Redis and MongoDB on a VPS.80 guides
- Billing & accountInvoices, renewals, the client area and your account.9 guides
- TroubleshootingWhen something is not working: checks and fixes.127 guides
- Linux VPSSSH, packages, services and everyday Linux administration.265 guides
- Windows VPS & RDPRemote Desktop, Windows Server settings and Admin RDP tips.73 guides
- Docker & DevOpsContainers, Git deploys, automation, monitoring and backups.82 guides
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.
