Cloud: Partitions on non-system VHDs in Hyper-V VMs deployed from template appear as ‘Uninitialized’ [PCITRW]

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:

DISKPART.EXE

DISKPART> san

SAN Policy : Offline Shared

The Fix

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.

Additional Resources

Here are a few additional resources related to the MS Private Cloud and System Center 2012

Orchestrator is AWESOME, but WHERE DO I START? [PCITRW]

OpsMgr: A 5 Step Plan for Developing an Effective LOB Application Monitoring Strategy (PCITRW)

[Series] System Center 2012 and the Private Cloud in the real world

Private Cloud in the real world: 5 lessons from the private cloud fabric

Cloud: A quick note on accurately measuring Hyper-V host performance and utilization

Orchestrator Jumpstart Series

Orchestrator 2012 Jumpstart: Day 1– Runbook Concepts, Components and Databus Rules

Orchestrator Runbook Automation JumpStart: Part 2 – Advanced Features and Functionality

Orchestrator Runbook Automation Jumpstart (Part 3)–Bridging Gaps, Extending Capabilities, Best Practices

One thought on “Cloud: Partitions on non-system VHDs in Hyper-V VMs deployed from template appear as ‘Uninitialized’ [PCITRW]

  1. Pingback: DPM 2012 – Drives Invalid | Microsoft Cloud Blog

Leave a Reply