How-to boost Microsoft Virtual Server 2005 Guest Performance

One very easy win to gain fairly significant extra performance from your Virtual Server 2005 guest Virtual Machines is to use virtual SCSI disks instead of virtual IDE disks. Of course, a physical fast I/O subsystem on the host is going to make a far bigger difference, but you're probably not likely to be able to do that "on the cheap" (especially in a test/dev situation).

Lets assume you started with a Windows Server 2003 virtual machine, for example, and built it originally using Virtual PC 2004 for example. Virtual PC 2004 does not support virtual SCSI disks or virtual SCSI adapters, so the virtual disk in your machine will be IDE connected. This equally as well applies if you built a VM using default settings under Virtual Server.

  • Go into the Virtual Server administration Console and add the existing virtual machine.
     

  • Select "Edit Configuration" from the Master Status
     

  • Click SCSI Adapters

     

  • Click Add SCSI Adapter and OK to the default settings

     

  • Start your virtual machine and logon. You need to ensure the Virtual SCSI adapter (emulating an Adaptec AIC-7870 PCI SCSI Card) is recognised in your virtual machine. The process will vary from operating system to operating system. (To make this work for me in a Windows 2003 Server SP1 Release Candidate VM, I had to uninstall and reinstall the VM additions). There is further guidance on how to do this in the administrators help file installed locally.

     

  • Edit the boot.ini
    Start/Run/cmd
    c:
    cd \
    attrib -s -h -r boot.ini
    notepad boot.ini

    Look for the line under the [operating systems] section with an IDE ARC Path starting something like multi(0)disk(0) , and create a copy of it. On the newly copied line, change the "multi" to "scsi" and update the comment to identify the SCSI boot option clearly.

    Warning! In case something goes wrong, I very strongly recommend you do not change the default boot option or the existing boot options. Just add an additional line. This will allow you to revert back if something does go wrong.

    Here's an example of my new boot.ini for the Windows Server 2003 (SP1 RC) guest, with the line highlighted in blue being the one I added.

    [boot loader]
    timeout=30
    default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
    [operating systems]
    multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Server 2003, Enterprise" /noexecute=optout /fastdetectscsi(0)disk(0)rdisk(0)partition(1)\WINDOWS="SCSI Windows Server 2003, Enterprise" /noexecute=optout /fastdetect

    Don't forget to reapply the correct attributes to the boot.ini file using "attrib +s +h +r boot.ini"
     

  • Shutdown the guest virtual machine.
     

  • In the Virtual Server Administration, edit the configuration for the guest and edit the hard disks settings

     

  • From the Attachment drop-down, use SCSI 0 ID 0 rather than Primary channel (0)

     

  • Restart your Virtual Machine, and from the boot menu, select the new "SCSI" option.

If everything goes OK, your VM will boot as normal with no impact, except that you'll have better disk I/O performance. If you're happy with the changes, you can re-update boot.ini to remove the old IDE boot option, and change the default option in this file to match. Bear in mind that you will no longer be able to revert this virtual machine to Virtual PC 2004 without backing out these changes.

I know someone will ask how much performance gain you get. There aren't any currently any official statistics I know of, although the Virtual Machine Program Manager, Ben Armstrong has previously stated that the main advantage of using SCSI virtual disks over IDE is that it runs the optimised SCSI driver as part of the VM additions. This in turn avoids a lot of the emulation overhead.