What is Virtio?
Under Kernel-based Virtual Machine (KVM) infrastructure, “Virtio” was selected to be the primary platform for I/O virtualization. “Virtio” can be seen as an abstraction driver and provides a common API. Through this API, Network, Block and Balloon devices can be supported for KVM.
Virtualization Station is based on a Kernel-based Virtual Machine (KVM) to run virtual machines (VM). Therefore, you can set up a Virtio controller for the hard-disk to obtain a higher disk I/O performance instead of using the IDE or SATA controller.
If your VM has already been installed and you want to change the HDD controller to Virtio, you cannot directly change it in the VM Settings because of the VM's OS capabilities and the lack of drivers. Therefore, using a new HDD to install the driver will allow you to change the original HDD controller. Please follow the below steps to set up a Virtio controller.
Click “Create VM”, and you can choose to create a template or click “Create Custom VM” to create a VM.
Click “Create” to a medium VM.
Next, you can configure settings including the type & version of the operating system, the location of the CD image, the folder the VM will be located and the network interface. (Note: select Windows 7 as an example.)
Click “Virtual Machine Settings” and then click “Hard Disk”.
Click on the “Controller” drop-down-list and then select “Virtual Disk Controller (VM Driver Requirement)”
Click “Virtual Machine Settings” again and then click “Add Device”. (Note: due to VM driver requirement, it is necessary to add a new CD-ROM to mount a VM driver for creating VM.)
Select “CD /DVD ROM” from the Device Type drop-down-list and choose the Controller: “IDE” and “SCSI”. Click “Add”.
Click “Install VM Driver”
The VM Driver will be inserted into the added virtual CD/DVD ROM automatically.
Click "Virtual machine Settings" again and go to "Boot Options". Disable "Select All Boot Devices" and select the first boot device as CDROM2. Click "Apply" and then go back to the VM information page.
Click “Install now”.
Check “I accept the license terms” and then click “Next”.
Choose “Custom (advanced)”.
Click “Load Driver”.
Click “CD Driver (D:) CDROM”, click “+” to expand WIN7 and select “X86” folder. Click “OK”.
Select “Red Hat VirtIO SCSI controller (D:WIN7X86VIOSTOR.INF)” and then click “Next”.
You will see a new virtual hard-disk on the list and click “Next”. A VirtIO disk will be used in this VM.
Select the VM you want to change to the Virtio controller, go to the VM information page and click [Virtual Machine Settings].
Some operating systems may not be compatible with the Virtio controller. To get around this, you have to create a new HDD device to install the driver rather than directly changing the controller. Please click [Add Device].
Select “VIRTIO” as the Controller then click [Add].
The new HDD will be shown under “Hard Disk”.
Go back to the VM information page and click [Insert VM Driver] . After clicking, the VM Driver will be inserted into the added virtual CD/DVD ROM.
After adding the new HDD to the VM, we need to install the driver. The following example uses Windows 7 to demonstrate how to install the driver.
Start the VM, open the Start menu, right-click on "Computer" and select “Properties”.
Click “Device Manager”.
Right-click on the “SCSI Controller” and select “Update Driver Software…”.
Select “Browse my computer for driver software”.
Click [Browse…] and go to the CD/ DVD ROM. Select “WIN7” > “X86” and click [OK]. Click [Next] (if your system is 32 bit, use the “X86” folder. If it is 64 bit, use “AMD64”.)
Click [Close] to exit the installation.
After installing the Virtio driver, please turn off the VM and you can now change the controller of the original HDD to “Virtual Disk Controller” in the Virtual Machine Settings.