Here’s a not-so-minor aggravation related to VM deployment and a workaround I wanted to share with you as another lesson in the “private cloud in the real world” series. It’s not every day you create a VM templates with multiple logical drives, especially with specific configuration or partitions. Every now and again, when these come up I seen problems with the second VHD containing the application partition (or partitions) coming online in the disconnected state when the VM is deployed from the template. The potential cause of the issue may not be apparent until you get an error message saying:
“the disk is offline because of policy set by an administrator”.
Truth be told, this still doesn’t make the issue obvious. As it turns out this message is related to the default setting in Windows 2008 related to the San Policy.
SAN policy was been introduced in Windows Server 2008 to protect shared disks accessed by multiple servers. The first time the server sees the disk, it will be offline, but after being brought online once, should be online even after reboot.You can change the San Policy setting to OnlineAllsetting to get around this, but it must be very clear that if the disks are shared among servers, this can lead to data corruption. Users are encouraged to use the proper SAN policy to protect data.
However, the VHD file in a highly available VM is nota shared disk in the same fashion, so in this case it should be safe. To avoid the issue newly deployed virtual machines, you’ll need to implement the fix in the VM before you sysprep the OS (create a template). You can check the current setting of the San policy using the DISKPART utility as follows:
SAN Policy : Offline Shared
The fix is to use the DISKPART utility (native to Windows 2008 OS) is to make a SAN policychange within the VM that will become the template. The steps are:
DISKPART> san policy=OnlineAll
DiskPart successfully changed the SAN policy for the current operating system.
That’s all there is to it. You’re now ready to turn this VM into a VM template.
Here are a few additional resources related to the MS Private Cloud and System Center 2012
Orchestrator Jumpstart Series