John Howard - Senior Program Manager in the Hyper-V team at Microsoft

Senior Program Manager, Hyper-V team, Windows Core Operating System Division.

Blogs

How-to boost Microsoft Virtual Server 2005 Guest Performance

  • Comments 8
  • Likes

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 /fastdetect
    scsi(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.

Comments
  • I folowed directions and did the Add/Remove 'Virtual Additions' as well but - Whenever I try to boot via the scsi(0) entry I get an error:
    "Windows could not start because of a computer disk hardware configuration problem. Could not read from the selected boot disk. Check boot path and disk hardware."

    But I can still reset, pick to boot via the multi(0) entry and 2003 boots fine and in Device Manager, under 'Disk drives' the disk shows up as a 'MS Virtual SCSI Disk Drive'

    I have triple checked boot.ini and only changed multi(0) to scsi(0).

    Is it working as under a SCSI Adapter without using the new boot.ini entry?

    Any ideas?

  • Adam

    It sounds like the .vhd file isn't attached to the first SCSI adapter as the first SCSI disk as you can still boot from "IDE". Are you saying that when you can still select the previous option (ie IDE) from the boot list and it works without changing anything in the Virtual Server configuration website itself? This would not be expected if the disk were attached to the SCSI adapter - I'll have to try, but I didn't believe the same disk could be attached to two adapters (ie IDE and the SCSI) at the same time?

    Can you confirm which bus the disk is attached to, and if it is SCSI, post up or email me your boot.ini file. Maybe also useful would be a screen-shot of your VM configuration in the web admin site, and the two XML sections from the .vmc file: <ide_adapter> and <scsi_adapter>

    Just one other thought, if you watch the BIOS startup in your VM, do you see a disk attached under ID0, LUN0 in the Adapter 3.10 BIOS?

    Hope this helps.
    Regards,
    John.

  • I too tried to do this, and got the EXACT same results as Adam Hill. Here are the 2 XML section from the .vmc As for the screen shot, it's posted here:http://masoj.vekis.com/images/screenshot.jpg


    <ide_adapter>
    <ide_controller id="1">
    <location id="0">
    <drive_type type="integer">2</drive_type>
    <pathname>

    <absolute type="string">C:\Program Files\Microsoft Virtual Server\Virtual Machine Additions\VMAdditions.iso</absolute>

    <relative type="string">..\..\Program Files\Microsoft Virtual Server\Virtual Machine Additions\VMAdditions.iso</relative>

    </pathname>
    </location>
    </ide_controller>
    </ide_adapter>

    <scsi_adapter>
    <controller_count type="integer">1</controller_count>
    <scsi_controller id="0">
    <adapter_scsi_id type="integer">7</adapter_scsi_id>
    <adapter_shared type="boolean">false</adapter_shared>
    <id type="integer">1</id>
    <location id="0">
    <drive_type type="integer">1</drive_type>
    <pathname>
    <absolute type="string">C:\Virtual_Machines\CIT\CIT.vhd</absolute>
    <relative type="string">.\CIT.vhd</relative>
    </pathname>
    <undo_pathname>
    <absolute type="string">C:\Virtual_Machines\CIT\VirtualPCUndo_CIT_1_0_0_21293702102005.vud</absolute>
    <relative type="string">.\VirtualPCUndo_CIT_1_0_0_21293702102005.vud</relative>
    </undo_pathname>
    </location>
    </scsi_controller>
    <scsi_controller id="1">
    <adapter_scsi_id type="integer">7</adapter_scsi_id>
    <adapter_shared type="boolean">false</adapter_shared>
    </scsi_controller>
    <scsi_controller id="2">
    <adapter_scsi_id type="integer">7</adapter_scsi_id>
    <adapter_shared type="boolean">false</adapter_shared>
    </scsi_controller>
    <scsi_controller id="3">
    <adapter_scsi_id type="integer">7</adapter_scsi_id>
    <adapter_shared type="boolean">false</adapter_shared>
    </scsi_controller>
    </scsi_adapter>


  • OH yeah I forgot, I also see a disk connected under ID0, LUN0 during the bios post also.

  • Aaron

    I should have posted the results of an email chain between myself and Adam back to this thread. If there is more than one SCSI adapter installed in the guest configuration, you need to keep with the multi configuration. For a single scsi adapter, boot.ini needs the scsi boot option. I'm taking this up with the product group as I'm sure this isn't right!.....

    Even though your screenshot showed VS thinking there is only one adapter, the VMC file shows four controllers. If you take a copy of the VMC file (just in case) and delete out the bits I've pasted below, stick to the scsi option in boot.ini, it _should_ work. Strange also that two people have managed to get "ghost" scsi controllers in their VMC files - obviously something to watch out for.
    Cheers,
    John.


    <scsi_controller id="1">
    <adapter_scsi_id type="integer">7</adapter_scsi_id>
    <adapter_shared type="boolean">false</adapter_shared>
    </scsi_controller>
    <scsi_controller id="2">
    <adapter_scsi_id type="integer">7</adapter_scsi_id>
    <adapter_shared type="boolean">false</adapter_shared>
    </scsi_controller>
    <scsi_controller id="3">
    <adapter_scsi_id type="integer">7</adapter_scsi_id>
    <adapter_shared type="boolean">false</adapter_shared>
    </scsi_controller>

  • I've added a SCSI Controller and installed the drivers of Microsoft Virtual Server Additions (on a Windows 2000 virtual machine) - it might perform better than the adaptec driver. Then I've booted with the original boot.ini and the disks attached to scsi 0 and scsi 1 - it worked with multi(0)disk(0)rdisk(0)partition(1)\winnt ...

    Max

  • I have exactly the same problem as Adam (at least the simptom is the same), but I don't have any extra scsi controller in the config file. I can also boot fine if I select the non SCSI option in the boot menu.

    My configuration looks exactly as in the picture posted by Aaron and here it is the config file:
    <ide_adapter>
    <ide_controller id="1">
    <location id="0">
    <drive_type type="integer">2</drive_type>
    <pathname>
    <absolute type="string" />
    <relative type="string" />
    </pathname>
    </location>
    </ide_controller>
    </ide_adapter>
    <scsi_adapter>
    <controller_count type="integer">1</controller_count>
    <scsi_controller id="0">
    <id type="integer">1</id>
    <location id="0">
    <drive_type type="integer">1</drive_type>
    <pathname>
    <absolute type="string">E:\vpc_images\VPCINSTALL\x.vhd</absolute>
    <relative type="string">.\x.vhd</relative>
    </pathname>
    <undo_pathname>
    <absolute type="string">E:\vpc_images\VPCINSTALL\x_1_0_0_03082803012005.vud</absolute>
    <relative type="string">.\x_1_0_0_03082803012005.vud</relative>
    </undo_pathname>
    </location>
    <adapter_scsi_id type="integer">7</adapter_scsi_id>
    </scsi_controller>
    </scsi_adapter>

    Any ideeas?

  • PingBack from http://www.keyongtech.com/2367541-suggestions-for-migrating-off-of