Skip to content

Instantly share code, notes, and snippets.

@Inndy
Last active October 27, 2023 16:54
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Inndy/d0afcc383874d5f18c14456f86afff25 to your computer and use it in GitHub Desktop.
Save Inndy/d0afcc383874d5f18c14456f86afff25 to your computer and use it in GitHub Desktop.

How to install Windows 10 on KVM-based virtualization environment

Instructions

  1. Download virtio-win.iso for KVM drivers
  2. Run qemu manually, don't relay on libvirt
qemu-system-x86_64 --enable-kvm \
  -smp 4 -m 4096 -cpu host -vga qxl \
  -drive file=/path/to/win10_64.iso,index=1,media=cdrom \
  -drive file=/path/to/virtio-win.iso,index=2,media=cdrom \
  -drive file=/path/to/win10.img,if=virtio \
  -net nic,model=virtio,vlan=0 -net user \
  --graphics vnc,listen=127.0.0.1
  1. Install driver from /viostor/w10/amd64 before installation. (You won't see harddrive before this step due to lack of driver)
  2. Finish your Windows installtion process
  3. Let device manager install driver for virtual network interface from virtio drivers automatically.
  4. (Optional) Install /Balloon/w10/amd64/balloon.inf, graphics driver from /qxldod/w10/amd64/qxldod.inf and guest agent from /guest-agent/qemu-ga-x64.msi
  5. Now you can boot this image with other KVM front-end, just remember to set disk type as virtio
  6. (Optional) Set graphics type to qxl and give it at least 64MB of graphics memory
  7. Change KVM clock setting to localtime. ex: <clock offset='localtime'> for libvirt

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment