Posts Tagged ‘Hyper-V’

Set Pagefile to other drive fails – Hyper-V

May 29, 2012

Takeaway

Pagefiles in Hyper-V VMs can only be placed on Virtual IDE disks, not on Virtual SCSI disks.

IDE?  SCSI?

A not-so-well-known “feature” within Hyper-V VM’s is the fact that the disk with the boot/OS parttion in a Hyper-V VM always needs to be connected to a Virtual IDE controller.

This has to do with the fact that the IDE Controller is natively supported in Windows, so no special drivers need to be loaded first.

The virtual SCSI controller however, requires a driver which is provided by the Hyper-V Integration Services. This driver is loaded later in the boot sequence, so the OS partition cannot boot from a SCSI virtual disk.

Pagefile

Another thing that is very hard to find, is that the Pagefile (swapfile) in a Windows VM can ONLY be located on a (virtual)  IDE disk.

Or, to be more precise, the Virtual Disk on which the pagefile is located, needs to be attached to a virtual IDE Controller in the properties of the VM.

Usually, this is not a problem, because by default Windows manages the Pagefile size and location by itself, thereby locating it on the systemdrive, which in Hyper-V will allways be attached to an IDE controller.

The Problem

The problem however, comes when you manually want to configure the pagefile to move it to a different partition/disk.

This might be the case when your systemdrive has filled up to a point where you’re in need of more space on it.

If the partition/disk where you want to move your pagefile to is attached to a Virtual SCSI controller, things get messy.

The Windows OS in the VM will not give you any warnings about this, and just tell you to reboot the VM for the changes to take effect.

However, when you reboot the machine, you will find that the pagefile simply has not been created on the SCSI drive.

If you have also set the pagefile to a very small size on the systemdrive, you might get warnings about an incorrectly set pagefile-size.

Workaround

So, what can you do to move the pagefile to another disk/partition in a Hyper-V VM?

Option 1: Add a new IDE disk for the Pagefile

Shut down the VM.

Create a new virtual disk, attached to a virtual IDE Controller.

Size the disk according to your pagefile needs (IE for an 8 GB pagefile, create a 10 GB disk) . I would advise to use a fixed size disk, not an expanding one.

Boot the VM. Initialze the new disk in Disk Management, and create a partition on it.

Now change the pagefile settings, creating a fixed size pagefile on this new disk. Set the pagefile on your system drive to a small one, like 256 MB.

Option 2: Change the SCSI disk to an IDE disk

Another option is to simply modify your Virtual SCSI disk, to connect it to a Virtual IDE Controller.

With this, you basically turn your virtual SCSI disk into a virtual IDE disk

For this, a reboot is also required.

Performance

But wait, doesn’t a Virtual SCSI disk offer MUCH better performance then a virtual IDE disk?

When you use the Integration Components (like every sane Hyper-V user would) then the answer is No, no and no.

Or, as Technet states:

Although the I/O performance of physical SCSI and IDE devices can differ significantly, this is not true for the virtualized SCSI and IDE devices in Hyper-V. Hyper-V.

IDE and SCSI devices both offer equally fast I/O performance when integration services are installed in the guest operating system.

Further Reading:

Technet: Planning for Disks and Storage in Hyper-V

Ben Armstrong: Why Hyper-V cannot boot off SCSI disks (and why you should not care)

Advertisements

SCVMM 2008 R2 error adding hosts

October 20, 2010

I had a clean install of SCVMM 2008 R2 running as the first VM on a Hyper-V 2008 R2 cluster.
When trying to add the Hyper-V hosts to SCVMM to start managing them, i got an Error (406):

Access has been denied while contacting the server node4.domain.local.

Recommended Action
1. Verify that the specified user account has administrative privileges on node4.domain.local.
2. Verify that DCOM access, launch, and activation permissions are enabled on node4.domain.local for the Administrators group. Use dcomcnfg.exe to modify permissions, and then try the operation again.

Also, SCVMM couldn’t access it’s own library (access denied), which actually was on the same server. Weird.
After trying every possibility concerning user rights and access rights, i decided to reinstall the whole box.
After that, the problem returned. Darn.
Then i remembered that i had manually added a proxy server to the winhttp service, for accessing the microsoft update site.
This because the Microsoft Update Service did not pick up the IE Proxy settings.
The command i used to set it up was:
netsh winhttp set proxy (ip address of proxyserver):(portnumber) bypass-list:""
This way, it would not use the proxy for all local network traffic.
Such as traffic from SCVMM to itself, or to the nodes.
After removing the proxy with “netsh winhttp reset proxy” , i was finally able to successfully add hosts to SCVMM, and the SCVMM server was able to connect to its own library again.
Apparently the “local” bit didn’t really do what it was supposed to….