Difference between revisions of "Paravirtualized Block Drivers for Windows"

From Proxmox VE
Jump to navigation Jump to search
 
(64 intermediate revisions by 12 users not shown)
Line 1: Line 1:
=Introduction=
+
= Introduction =
In order to improve disk performance, special paravirtualized block drivers can be installed in Windows guests (also network device drivers exist, see [[Paravirtualized_Network_Drivers_for_Windows]]).
+
In order to improve disk performance, special paravirtualized block drivers can be installed in Windows guests.
 +
You have to download and install those drivers in the VM, as Windows does not provides them by default.
  
The KVM project released drivers for Windows Guests (http://www.linux-kvm.org/page/WindowsGuestDrivers/Download_Drivers)
+
{{note|Proxmox recommends using SCSI with ''VirtIO SCSI'' as ''SCSI Controller Type'' for VM disks, to have the most features and best performance.
The drivers could work with a variety of Microsoft recent OSs, 32 and 64 bits.
+
VirtIO block may get deprecated in the future.|reminder}}
  
KVM Guest Support Status can be found here: http://www.linux-kvm.org/page/Guest_Support_Status
+
== Download ==
  
==Download drivers==
+
You can download the latest stable Windows VirtIO drivers from: https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso
Download the latest kvm-driver-disc (ISO) from [http://www.linux-kvm.org/page/WindowsGuestDrivers/Download_Drivers linux-kvm.org] ISO to your Proxmox VE server. Later you will need to make this ISO available as CD device in your guest VM in PVE.
+
Older Windows Versions may sometimes need older VirtIO drivers. See [[Windows VirtIO Drivers]] for more info about the change log, guest OS compatibility and other useful VirtIO guest devices.
  
==Installation==
+
Upload the ISO through the Proxmox VE WebUI:
The target is to make Windows install virtio drivers for all of its disks. There could be more strategies to accomplish this task:
+
Select a Storage which allows ISO images in the PVE WebUI and switch to ''Content'' tab where you can use the "upload" button on the menu bar.  
  
===Adding a temporary drive===
+
You may also copy the ISO manually onto a PVE configured storage.
see (http://www.linux-kvm.com/content/redhat-54-windows-virtio-drivers-part-2-block-drivers)
 
  
The base Windows OS in your guest VM knows nothing about virtio drivers, and for this reason you can't simply stop the VM, change the disk to virtio and reboot. You have to force Windows to install virtio drivers for a virtio disk (provided by PVE), how? Adding a temporary, small, virtio disk to the VM, then booting Windows and make it recognize a new disk, and ask you the drivers (which, at that moment, it doesn't know of.
+
= Installation =
  
* Prerequisite: the Base Windows OS should be already running (IDE drives, usually)
+
The goal to use VirtIO SCSI or Block (SCSI is recommended) to improve the performance and available features of (Windows) VMs.
* Shut down the VM and, from PVE and:
+
The way we do this depends if we want to change an already installed and running Windows VM or if we want to set this up during a Windows installation.
** add a small virtio disk to the VM through PVE web interface
 
** add the ISO just downloaded as a CD device through PVE web interface
 
** Make shure that the primary boot device is still the old (IDE) boot disk, not the new virtio disk, through PVE web interface.
 
* Boot the VM and log in as a local administrator
 
* Window should detect it has a new unknown device and ask you for its drivers:
 
** Select No when the wizard asks you to search for the driver software
 
** Select “install from a list of specific location” .
 
** Select the Browse button and navigate to the driver CD
 
** Select the appropriate folder for your guest architecture. (My test was done with a windows 2003 r2 32 bit guest).
 
* Click Next to begin the install.You will get a prompt warning about the driver not being signed. Go ahead and select “Continue Anyway”.
 
* Finish then driver installation:
 
** you should now be able to enter "disk management", from windows, and initalize and format the temporary virtio disk (this is really not necessary but it will prove you that the driver is installed and running)
 
  
Now, Windows system has the virtio driver installed, and we need to convert all of its previous (IDE) system disks to virtio.
+
== Setup On Running Windows ==
* Shut down the VM and, from PVE and:
 
** remove (from the vm, not from disk) all the (IDE) disk it had previoulsy, and
 
** re-add them, in the same order, as virtio disks
 
** Make shure that the primary boot device is still the old (IDE) boot disk, not the new virtio disk, through PVE web interface.
 
* Boot again the VM and log in as a local administrator
 
* Window should detect it has new unknown devices and ask you for the drivers
 
** You should have the option to use again the ISO mounted in the CD drive
 
** You should also be able to tell windows to use "current" drivers, it now already has.
 
  
===During windows installation===
+
Here we add a temporary disk with the new wanted disk controller to the VM and install the respective drivers.
This may be possible somehow, see:
+
The Windows OS in your VM knows nothing about VirtIO drivers, so you can't simply stop the VM, change the disk to Vrtio-SCSI or VirtIO and reboot.
* http://www.linux-kvm.com/content/block-driver-updates-install-drivers-during-windows-installation
+
You have to force Windows to install VirtIO drivers during it runs. To do this we add a small temporary  SCSI-VirtIO or VirtIO disk to the VM and install its drivers explicitly.
 +
Without adding the Disk the installation of the driver is flawed under Windows, as driver installation of an not plugged in Hardware does not works.
  
 +
=== Tested guest OS ===
  
 +
* Windows 2003 r2 32 bit guest
 +
* Windows 2000 server sp4
 +
* Windows 7 and newer should work
 +
* Windows Server 2008 and newer should work
  
 +
=== Setup Steps ===
 +
 +
* Prerequisite: An installed running Windows OS and the [[#Download|VirtIO driver ISO]]
 +
* insert the VirtIO ISO into the VMs CDROM Drive.
 +
* add a small (1GB) SCSI (with ''Options -> SCSI Controller Typ: VirtIO'') or VirtIO Block disk to the VM, you can use the PVE WebUI.
 +
* The disk should get hot plugged. If not, you need to reboot the VM.
 +
* Window should detect the new disk has a new unknown device and ask you for its drivers. If it doesn't, open the Device Manager, there should be an unknown device
 +
** Right-click this entry and select "Update Driver Software"
 +
** Select No when the wizard asks you to search for the driver software (online)
 +
** Select "Install from a list of specific location"
 +
** Use the Browse button and navigate to the driver CDROM
 +
** Normally selecting the CDROMs top directory (e.g. ''D:'') is enough on newer Windows versions.
 +
** If that doesn't work select the appropriate folder for your guest version/architecture manually (use vioscsi for SCSI and vioblk for VirtIO)
 +
* Click Next to begin the install.You may get a warning about the driver not being signed on older Windows Versions, select “Continue Anyway”.
 +
* Finish then driver installation
 +
 +
You should now be able to enter Windows "Disk Management" and format the temporary SCSI/VirtIO disk (this is not necessary, it just proves that the driver is installed and working).
 +
 +
('''Legacy Note''': Windows 2000 may report each disk 8 times in disk management, just install and use the first of each 8-tuple. In "My computer" you should see each disk only once.)
 +
 +
Windows has now the VirtIO SCSI/Block driver installed, and we need to re attach the VM disks as SCSI or virtio.
 +
* Shut down the VM and remove the temporary Disk (Remove it once to mark it unused and remove the unused to delete it entirely)
 +
* Detach all the disks you want to use as Virtio SCSI/Block, do this by "Removing" the disk. This will '''not''' delete the disk but mark them as "unused disks"
 +
* reattach them by double-clicking the unused disk entries (or use the Edit button) here select SCSI for VirtIO SCSI or VirtIO (SCSI virtio disks (do this by clicking the "Edit" button for each of the "unused" disks that were previously "IDE" disks)
 +
* '''Important''': Fix up the ''Boot Order'' under the VMs ''Option'' tab. Make sure that the primary boot device is still the old boot disk.
 +
* Now you can start the VM again, it should use the new better disk controllers now.
 +
* If the VM does not boots you can detach and re attach the Disks as IDE, ensure that you do not missed a step here and eventually ask the Proxmox VE community for help.
 +
 +
After finishing, through PVE web interface, you can:
 +
* remove the temporary VirtIO disk if you haven't already done this and don't need it anymore
 +
* remove the ISO mounted as CD device
 +
 +
== Setup During Windows Installation ==
 +
 +
Download the VirtIO drivers as described above.
 +
 +
Set the drive type to SCSI (preferred) or VirtIO and the Network also to VirtIO for improved performance.
 +
Add a second IDE CDROM drive, in the first mount the Windows installer ISO and in the second the VirtIO driver ISO.
 +
 +
Startup the VM and the Installation process. When you arrive at the Disk/Partition selection you won't see a Disk because the driver aren't loaded.
 +
Click on the ''Load Driver'' button and then ''Browse''. In the file browser select the second CDROM drive with the VirtIO drivers and navigate to the vioscsi/WINVERSION/amd64 (or x86 if you have a 32 bit system) and click ''OK''. RedHat driver should show up in the ''Driver Installer'' click next to install them. Repeat the process for other VirtIO driver (e.g. network, qxl, ...).
 +
 +
The Disks should now show up and you can continue with the installation process as usual.
 +
 +
 +
=== Old VFD Method ===
 +
 +
'''Note''': This is kept for legacy reasons, newer Windows versions (XP and newer) should use the above menthod.
 +
 +
You can add the block drivers during install by manually adding a virtual floppy drive (vfd) and a second IDE CDROM Drive (for network VirtIO) to the VM for the initial install (thanks to meto & user100 in the forum).
 +
 +
Download the VirtIO drivers as described above, upload VFD (for disks) and the ISO (for network) to PVE.
 +
 +
Use:
 +
qm set <VMID> -args '-fda /where/you/put/the/file/virtio-win-<VERSION>.vfd'
 +
to add the VFD as virtual floppy to the VM.
 +
 +
Now start the VM and open the console. The standard boot sequence for a new KVM seems to be HDD - Floppy - CD, you can change this but it's just as easy to reboot using the Ctrl-Alt-Del button in the console, use F12 to bring up a boot selection window & boot from CD.
 +
 +
Once windows starts to load, press F6 to get it to look for extra drivers to load. It will automatically load the floppy & away you go.
 +
 +
Note that older VirtIO drivers aren't signed by Windows, so you need to tell the system to continue to load the drivers on a warning.
 +
 +
More information on floppy drives can be found here : http://www.linux-kvm.com/content/block-driver-updates-install-drivers-during-windows-installation
 +
 +
And in the forum here : http://forum.proxmox.com/threads/3711-Floppy-support-hack
 +
 +
= See also =
 +
* [[Windows VirtIO Drivers]]
 +
* [[Paravirtualized Network Drivers for Windows]]
 +
* [[Dynamic Memory Management]]
  
 
[[Category: HOWTO]]
 
[[Category: HOWTO]]
 +
[[Category: Qemu/KVM]]

Latest revision as of 08:42, 29 March 2017

Introduction

In order to improve disk performance, special paravirtualized block drivers can be installed in Windows guests. You have to download and install those drivers in the VM, as Windows does not provides them by default.

Yellowpin.svg Note: Proxmox recommends using SCSI with VirtIO SCSI as SCSI Controller Type for VM disks, to have the most features and best performance.

VirtIO block may get deprecated in the future.

Download

You can download the latest stable Windows VirtIO drivers from: https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso Older Windows Versions may sometimes need older VirtIO drivers. See Windows VirtIO Drivers for more info about the change log, guest OS compatibility and other useful VirtIO guest devices.

Upload the ISO through the Proxmox VE WebUI: Select a Storage which allows ISO images in the PVE WebUI and switch to Content tab where you can use the "upload" button on the menu bar.

You may also copy the ISO manually onto a PVE configured storage.

Installation

The goal to use VirtIO SCSI or Block (SCSI is recommended) to improve the performance and available features of (Windows) VMs. The way we do this depends if we want to change an already installed and running Windows VM or if we want to set this up during a Windows installation.

Setup On Running Windows

Here we add a temporary disk with the new wanted disk controller to the VM and install the respective drivers. The Windows OS in your VM knows nothing about VirtIO drivers, so you can't simply stop the VM, change the disk to Vrtio-SCSI or VirtIO and reboot. You have to force Windows to install VirtIO drivers during it runs. To do this we add a small temporary SCSI-VirtIO or VirtIO disk to the VM and install its drivers explicitly. Without adding the Disk the installation of the driver is flawed under Windows, as driver installation of an not plugged in Hardware does not works.

Tested guest OS

  • Windows 2003 r2 32 bit guest
  • Windows 2000 server sp4
  • Windows 7 and newer should work
  • Windows Server 2008 and newer should work

Setup Steps

  • Prerequisite: An installed running Windows OS and the VirtIO driver ISO
  • insert the VirtIO ISO into the VMs CDROM Drive.
  • add a small (1GB) SCSI (with Options -> SCSI Controller Typ: VirtIO) or VirtIO Block disk to the VM, you can use the PVE WebUI.
  • The disk should get hot plugged. If not, you need to reboot the VM.
  • Window should detect the new disk has a new unknown device and ask you for its drivers. If it doesn't, open the Device Manager, there should be an unknown device
    • Right-click this entry and select "Update Driver Software"
    • Select No when the wizard asks you to search for the driver software (online)
    • Select "Install from a list of specific location"
    • Use the Browse button and navigate to the driver CDROM
    • Normally selecting the CDROMs top directory (e.g. D:) is enough on newer Windows versions.
    • If that doesn't work select the appropriate folder for your guest version/architecture manually (use vioscsi for SCSI and vioblk for VirtIO)
  • Click Next to begin the install.You may get a warning about the driver not being signed on older Windows Versions, select “Continue Anyway”.
  • Finish then driver installation

You should now be able to enter Windows "Disk Management" and format the temporary SCSI/VirtIO disk (this is not necessary, it just proves that the driver is installed and working).

(Legacy Note: Windows 2000 may report each disk 8 times in disk management, just install and use the first of each 8-tuple. In "My computer" you should see each disk only once.)

Windows has now the VirtIO SCSI/Block driver installed, and we need to re attach the VM disks as SCSI or virtio.

  • Shut down the VM and remove the temporary Disk (Remove it once to mark it unused and remove the unused to delete it entirely)
  • Detach all the disks you want to use as Virtio SCSI/Block, do this by "Removing" the disk. This will not delete the disk but mark them as "unused disks"
  • reattach them by double-clicking the unused disk entries (or use the Edit button) here select SCSI for VirtIO SCSI or VirtIO (SCSI virtio disks (do this by clicking the "Edit" button for each of the "unused" disks that were previously "IDE" disks)
  • Important: Fix up the Boot Order under the VMs Option tab. Make sure that the primary boot device is still the old boot disk.
  • Now you can start the VM again, it should use the new better disk controllers now.
  • If the VM does not boots you can detach and re attach the Disks as IDE, ensure that you do not missed a step here and eventually ask the Proxmox VE community for help.

After finishing, through PVE web interface, you can:

  • remove the temporary VirtIO disk if you haven't already done this and don't need it anymore
  • remove the ISO mounted as CD device

Setup During Windows Installation

Download the VirtIO drivers as described above.

Set the drive type to SCSI (preferred) or VirtIO and the Network also to VirtIO for improved performance. Add a second IDE CDROM drive, in the first mount the Windows installer ISO and in the second the VirtIO driver ISO.

Startup the VM and the Installation process. When you arrive at the Disk/Partition selection you won't see a Disk because the driver aren't loaded. Click on the Load Driver button and then Browse. In the file browser select the second CDROM drive with the VirtIO drivers and navigate to the vioscsi/WINVERSION/amd64 (or x86 if you have a 32 bit system) and click OK. RedHat driver should show up in the Driver Installer click next to install them. Repeat the process for other VirtIO driver (e.g. network, qxl, ...).

The Disks should now show up and you can continue with the installation process as usual.


Old VFD Method

Note: This is kept for legacy reasons, newer Windows versions (XP and newer) should use the above menthod.

You can add the block drivers during install by manually adding a virtual floppy drive (vfd) and a second IDE CDROM Drive (for network VirtIO) to the VM for the initial install (thanks to meto & user100 in the forum).

Download the VirtIO drivers as described above, upload VFD (for disks) and the ISO (for network) to PVE.

Use:

qm set <VMID> -args '-fda /where/you/put/the/file/virtio-win-<VERSION>.vfd'

to add the VFD as virtual floppy to the VM.

Now start the VM and open the console. The standard boot sequence for a new KVM seems to be HDD - Floppy - CD, you can change this but it's just as easy to reboot using the Ctrl-Alt-Del button in the console, use F12 to bring up a boot selection window & boot from CD.

Once windows starts to load, press F6 to get it to look for extra drivers to load. It will automatically load the floppy & away you go.

Note that older VirtIO drivers aren't signed by Windows, so you need to tell the system to continue to load the drivers on a warning.

More information on floppy drives can be found here : http://www.linux-kvm.com/content/block-driver-updates-install-drivers-during-windows-installation

And in the forum here : http://forum.proxmox.com/threads/3711-Floppy-support-hack

See also