Windows 10.qcow2 [better]
$ qemu-img create -f qcow2 /var/lib/libvirt/images/win10.qcow2 80G
Virtual QCOW2 disks should never be defragmented. Turn off scheduled optimization via the "Defragment and Optimize Drives" utility. 3. Enable TRIM/Discard Support
echo "Booting Windows 10..."
Enable discard='unmap' in your hypervisor storage settings. This allows Windows to pass defragmentation/TRIM commands back to the host, shrinking the QCOW2 file dynamically when files are deleted inside the VM. Windows 10.qcow2
Verdict: Use qcow2 for labs, snapshots, and development. Use raw for production high-IOPS databases on Linux.
QEMU 4.0+ supports discard (trim):
After creation, you can set the proper permissions: $ qemu-img create -f qcow2 /var/lib/libvirt/images/win10
This allows multiple VMs to share a clean Windows 10 install.
Because the file is self-contained, you don't need to reinstall Windows.
Over time, your Windows 10.qcow2 file grows. Even if you delete files inside Windows, the image file on your Linux host stays large. To reclaim space: Enable TRIM/Discard Support echo "Booting Windows 10
Optimize-Volume -DriveLetter C -ReTrim
Match the virtual CPU (vCPU) layout to your physical hardware. Ensure you use the host CPU pass-through configuration ( -cpu host ) so Windows can utilize hardware-level instruction sets like AVX and AES-NI. 2. Disk IO Performance
The biggest bottleneck for Windows VMs is often disk I/O. By default, many hypervisors emulate IDE or SATA controllers, which are slow. virtio-scsi