Use this when building a new VM from scratch.
Create VM
Creating a VM means choosing host or cluster and storage, guest OS type, firmware (UEFI/BIOS), vCPU, memory, disks, controller and NIC types, then installing the OS from ISO or deploying from a template or image.
1. Start from a template where possible.
2. Choose firmware (UEFI), machine type and PV devices.
3. Place disks on the right storage.
4. Connect NIC to the right network/VLAN.
5. Record owner and purpose.
definition → disks allocated → NIC attached → first boot
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Common mistakes Narrow the fault
- Oversizing vCPUs and memory at creation.
- Emulated disk/NIC types left as default.
- No guest agent installed, so backups and shutdowns are not clean.
- VM placed on local storage when HA or migration is needed.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Use paravirtual disk and network devices.
- Right-size CPU and memory from requirements.
virt-install --name test --memory 2048 --vcpus 2 --disk size=20 --cdrom <iso> --os-variant <os>— create a libvirt VMqm create <vmid> --name test --memory 2048 --net0 virtio,bridge=vmbr0— create a Proxmox VMNew-VM -Name test -Generation 2 -MemoryStartupBytes 2GB -NewVHDPath C:\VMs\test.vhdx -NewVHDSizeBytes 20GB— create a Hyper-V VM
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
Creating a VM well means choosing settings that are hard to change later:
| Setting | Recommendation |
|---|---|
| Firmware | UEFI (+ Secure Boot, vTPM for Windows 11/Server 2025) |
| Machine/generation | q35 / Gen 2 / latest hardware version supported by the cluster |
| Disk controller | Paravirtual (VirtIO SCSI, PVSCSI, Hyper-V SCSI) |
| NIC | VirtIO, VMXNET3, synthetic |
| CPU type | Cluster-compatible model, not raw host unless no migration needed |
| Disk | Thin unless reasons; discard/TRIM on |
qm create 120 --name app01 --memory 8192 --cores 4 --cpu x86-64-v3 --machine q35 --bios ovmf --efidisk0 local-zfs:1 --scsihw virtio-scsi-single --scsi0 local-zfs:64,discard=on,iothread=1 --net0 virtio,bridge=vmbr0,tag=20 --agent 1
Commands
| Platform | Create |
|---|---|
| KVM | virt-install --name vm01 --memory 4096 --vcpus 2 --disk size=40 --os-variant debian12 --cdrom debian.iso |
| Proxmox | qm create 101 --name vm01 --memory 4096 --cores 2 --scsihw virtio-scsi-single --net0 virtio,bridge=vmbr0 |
| Hyper-V | New-VM -Name vm01 -Generation 2 -MemoryStartupBytes 4GB -SwitchName External |
ReferenceConfiguration & state1 section · depth on demand
Creating a VM (examples)
# Proxmox
qm create 120 --name web01 --memory 4096 --cores 2 --net0 virtio,bridge=vmbr0 \
--scsihw virtio-scsi-single --scsi0 local-lvm:32 --ostype l26 --bios ovmf --efidisk0 local-lvm:1
# KVM / libvirt
virt-install --name web01 --memory 4096 --vcpus 2 --disk size=32 --os-variant rhel9.4 \
--cdrom rhel.iso --network bridge=br0
# Hyper-V
New-VM -Name web01 -Generation 2 -MemoryStartupBytes 4GB -NewVHDPath D:\VMs\web01.vhdx -NewVHDSizeBytes 32GB -SwitchName External
Documented example, not captured output. Prefer templates/cloud images for repeatable builds.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Virtual Machine Lifecycle → Create VM. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://libvirt.org/docs.html · confidence 94%