Installing Win10 with Virtio
On 2016/01/22 at 16:34
Here, I will record the steps of how I created a win10 virtual machine via QEMU/KVM command line with virtio drivers installed.
First, I created a disk image of qcow2 format and downloaded the virtio image from fedora's website.
# Create iso image
> $ qemu-img create -f qcow2 win10.img 30G
Formatting 'win10.img', fmt=qcow2 size=32212254720 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16
# download latest virtio iso image
>$ wget https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/virtio-win.iso
Then, started the VM and began the installation process. Here, I specified the disk interface to be virtio.
qemu-system-x86_64 --enable-kvm \
-smp 4 -m 4096 -cpu host -vga qxl \
-drive file=./Sync/iso_images/win10.iso,index=1,media=cdrom \
-drive file=./Sync/iso_images/virtio-win.iso,index=2,media=cdrom \
-drive file=./win10.img,if=virtio \
-net nic,model=virtio,vlan=0 -net user
Windows 10 does not have virtio driver builtin, so we have to install the virtio driver from the virtio-win.iso first.
There are a lot of pv drivers contain inside the virtio-win.iso.
- NetKVM/: Virtio Network driver
- viostor/: Virtio Block driver
- vioscsi/: Virtio SCSI driver
- viorng/: Virtio RNG driver
- vioser/: Virtio serial driver
- Balloon/: Virtio Memory Balloon driver
- qxl/: QXL graphics driver for Windows 7 and earlier. (build virtio-win-0.1.103-1 and later)
- qxldod/: QXL graphics driver for Windows 8 and later. (build virtio-win-0.1.103-2 and later)
- pvpanic/: QEMU pvpanic device driver (build virtio-win-0.1.103-2 and later)
- guest-agent/: QEMU Guest Agent 32bit and 64bit MSI installers
- qemupciserial/: QEMU PCI serial device driver
- *.vfd: VFD floppy images for using during install of Windows XP
So here I selected the Virtio Block driver for win10.
Then, after the installation process completed. I have to installed the virtio driver for network and qxl vga driver.
Finally, the VM is ready to used :).