Virtualization, KVM, VMware & Hyper-V Cheat Sheet
A hypervisor lets one physical server (the Host) run multiple isolated virtual computers (Guests / VMs) at the same time—each with its own CPU, RAM, disk, and OS.
1 Hypervisor Comparison Table
Which hypervisor should you pick? Use this quick matrix to match the platform to your workload and budget.
| Hypervisor | Type | License | Management | Primary Use |
|---|---|---|---|---|
| VMware ESXi | Type 1 | Commercial | Web UI / vCenter | Enterprise data centers, vMotion HA clusters, mission-critical workloads |
| Proxmox VE / KVM | Type 1 | Open Source | Web UI + qm / virsh |
Homelabs, SMBs, cloud providers, KVM VMs + LXC containers |
| Microsoft Hyper-V | Type 1 | Windows / Server | Hyper-V Manager + PowerShell | Windows-heavy enterprise shops, Active Directory, hybrid Azure |
| Oracle VirtualBox | Type 2 | Free (GPLv2) | Desktop GUI + VBoxManage |
Local learning labs on Windows, macOS, or Linux laptops |
| QEMU (with KVM) | Type 1 / 2 | Open Source | CLI / libvirt |
Device emulation, cross-CPU testing (ARM on x86), underlying engine for KVM |
2 Linux KVM: virsh & qemu-img Commands
On Linux, KVM turns the kernel into a Type 1 hypervisor, libvirt manages it, and virsh is your CLI remote control.
VM Lifecycle & Snapshots (virsh)
virsh list --all
--all, powered-off VMs stay hidden. Think of this as ls -a for VMs.
virsh start web-vm
web-vm. Equivalent to pressing the physical power button.
virsh shutdown web-vm
virsh destroy web-vm
shutdown hangs.
virsh snapshot-create-as web-vm pre-update
virsh snapshot-revert web-vm pre-update.
Virtual Disk Management (qemu-img)
qemu-img create -f qcow2 vm-disk.qcow2 40G
qemu-img info vm-disk.qcow2
qemu-img convert -f vmdk -O qcow2 src.vmdk dst.qcow2
3 Windows Hyper-V & Proxmox qm Commands
Both Hyper-V (PowerShell) and Proxmox VE (qm) follow clean, predictable naming patterns so you can automate VM tasks in seconds.
Microsoft Hyper-V (Run PowerShell as Administrator)
Get-VM
Start-VM -Name "Lab-DC01"
Lab-DC01. Supports wildcards like Lab-*.
Stop-VM -Name "Lab-DC01"
-Force to power-off an unresponsive guest, or -TurnOff to cut power instantly.
Checkpoint-VM -Name "Lab-DC01" -SnapshotName "PrePatch"
Restore-VMSnapshot.
New-VHD -Path "D:\VMs\data.vhdx" -SizeBytes 50GB -Dynamic
-Dynamic for thin provisioning or -Fixed for thick provisioning.
Proxmox VE CLI (qm — QEMU/KVM Manager)
qm list
VMID (e.g., 100, 101), Name, Status, RAM, and Boot Disk.
qm start 101
qm shutdown 101
qm stop 101 only as a hard power-off when the guest OS is frozen.
qm snapshot 101 before-upgrade
qm rollback 101 before-upgrade.
Get-VM, Start-VM, Stop-VM). Proxmox always uses qm + action + VMID (qm start 101).
4 Virtual Disk Formats & Provisioning
A virtual disk is just a file (or block volume) on the host that pretends to be a physical hard drive inside the VM.
| Format | Primary Hypervisor | Snapshots | Key Characteristics |
|---|---|---|---|
.qcow2 |
KVM / QEMU / Proxmox | Native | Copy-on-Write, thin provisioning, compression & AES encryption support |
.vmdk |
VMware ESXi / Workstation | Delta files | Industry standard for VMware; widely supported for OVA/OVF appliance imports |
.vhdx |
Microsoft Hyper-V | .avhdx |
Supports up to 64 TB, power-loss corruption protection, replaces legacy .vhd |
.vdi |
Oracle VirtualBox | Differencing | Default VirtualBox format; simple dynamic or fixed-size desktop lab disks |
.raw |
KVM / Xen / ZFS | Storage-level | Zero format overhead (fastest I/O), relies on ZFS/LVM for snapshots |
Thin vs. Thick Provisioning
| Mode | How It Allocates Space | Best For | Watch Out For |
|---|---|---|---|
| Thin (Dynamic) | Allocates blocks only as data is written (e.g., 100 GB virtual disk uses 4 GB at install) | Labs, dev/test, maximizing storage efficiency | Can overcommit host storage and crash VMs if the physical disk hits 100% full |
| Thick (Fixed / Eager Zeroed) | Reserves the entire virtual size upfront on the host drive immediately | Production databases, high-IOPS workloads | Slower to create; reserves space even if the VM only uses 10% of it |
5 The Danger Zone: 3 Production Traps
Virtualization makes it easy to spin up servers—and just as easy to cause subtle outages if you skip these rules.
A snapshot is only a temporary delta chain pointing back to the original disk. If the underlying storage fails or you delete the parent disk, every snapshot is lost. Worse, leaving old snapshots running for weeks degrades I/O performance and can silently fill your datastore. Rule: Snapshot before patching, then delete it within 24–48 hours once verified. Use real backups (Proxmox Backup Server, Veeam, etc.) for disaster recovery.
Assigning 128 GB of vRAM across VMs on a 64 GB host forces the hypervisor into memory ballooning and host swapping—causing every VM to freeze or crawl. Likewise, giving one small VM 16 vCPUs on an 8-core host causes CPU Ready scheduling delays. Rule: Start VMs small (2–4 vCPUs) and never overcommit RAM on production databases.
qemu-guest-agent / VMware Tools / Guest Additions)
Without the guest agent installed inside the VM, the hypervisor cannot cleanly freeze filesystems for consistent backups, trigger graceful shutdowns reliably, report the VM's IP address, or sync time/clipboard smoothly. Rule: Always install qemu-guest-agent (KVM/Proxmox), open-vm-tools (VMware), or Hyper-V Integration Services right after OS install.
sudo apt update && sudo apt install -y qemu-guest-agent && sudo systemctl enable --now qemu-guest-agent