Improve performance of windows guests
Disk optimization
flexVDI supports two types of virtual disk drives: ide and virtio.
The guest creation wizard defaults to ide disks for windows guests, because virtio drivers are not included in windows installers, and standard windows installation on virtio drives will fail. But disk performance is improved using the virtio driver. Linux, FreeBSD, and other OS installers include virtio drivers, and can be installed as virtio from the begining without any specific action.
Once a windows guest machine has been installed with ide disks, you can upgrade it to the faster virtio performing the following steps:
Create a virtio disk
You need to create a temporary disk image of type virtio. In this way, the virtio driver will be actually installed.
- Shutdown the windows guest.
- Open flexvdi dashboard, click on "modify" over the guest, and add a new disk image. Use a size of 5 MB to make the operation fast. Mark the newly created drive as "virtio", instead of the default "ide" in the table of disks. Click "Finish" in the last step. This virtual disk will only be briefly needed during installation to make windows install virtio driver. Do not change the type of the other disks yet.
- Now the virtual machine has a new virtio drive, but windows still can´t access it.
Install virtio disk driver and other device drivers
- First you have to make sure that your machine has a virtual CD drive. Go to flexVDI Dashboard, find the guest you are working on and click on the storage tab. Under "Media images" you will see a list of the "virtual CD drives" that the machine contains. If there isn't any entry, you will have to stop the machine before changing its hardware. Once it is stopped, click on "Add Image", and Save your changes.
- Start the guest again.
- In flexVDI Dashboard, find the guest you are working on and click on the storage tab. Under "Media images" you will see a list of the "virtual DVD drives" that the machine contains. Under "Media Images", you can change the "virtual CD" without stopping the virtual machine. Select the value "Internal MS" in the Media storage drop down, and "guest-tools" in the "File" input. Then click on the button "Change media". This will insert a virtual CD in the guest.
- Now open Windows Explorer in the guest. Open the disk labeled "flexVDI Guest Toolsv3.x.x Setup ", and double click on flexvdi-guest-tools-3.x.x".
- If you agree to the license terms, click "Agree" and proceed with the installation. The first screen lets you choose the components to install. During the installation you will be prompted to confirm the installation of several drivers.
- Now open MS-Windows disk management (In windows 10, right click on "This PC", then click on "manage", and then "disk management"). The temporary disk should appear here.
Modify the virtual machine to use only virtio disks
- Stop the guest.
- Go to flexVDI dashboard, and modify the guest. In the disks table, set all disks (usually only one) as "virtio". Now that windows has installed the driver, it will be able to boot from a virtio drive. You can remove the temporary disk you created, as it is no longer needed.
Start the guest again
And that is all. The guest will use virtio disks and you will experience the improved performance.
General guest optimization
In order to optimize the performance of your guests, you can tune the configuration of your guest OS:
- Disable animations and other gui effects to improve visual experience.
- Disable unused windows services, in particular indexing service.
- Disable the usage of pagefiles
- Disable full disk scans of antivirus software, if any.
- Disable software updates (windows updates and others) for volatile guests.
- To give the best possible user experience, the software has to be updated in the template (once per flexVDI platform), and not on every guest, while the users are logged in, and usually at the same time. After installing updates to .Net in the template, it is recommended to leave the computer running for some time (5-25 minutes) until it finishes background processing before converting it to template. You can read more on this here.
You can find more general advice on optimizing guests, and also windows guest optimization tools searching for "optimize your_os_version_goes_here guest performance".
MS Resource Monitor is a good tool to study and optimice the guests resource usage (CPU, disk, network) specially before converting them to flexVDI templates.