Disk is offline because of a policy set by an administrator

After P2V: disk error “the disk is offline because of a policy set by an Administrator”

After a P2V from a Windows 2008 Enterprise server to a VM with Virtual Hardware 7, I get the following error in disk Management : the disk is offline because of a policy set by an Administrator.

clip_image001

I’d look in to the policies, the user and server had no policies set on them. So what now….

I found out that the default SAN Policy for Windows Server 2008 Enterprise is set to “Offline Shared”

How to check:

From command line
DISKPART.exe
DISKPART> san
SAN Policy : Offline Shared

Once you checked the applied policy you can set the disk online, as follow:

DISKPART> san policy=onlineall
Diskpart successfully changed the SAN policy for the current operating system

DISKPART>list disk

Disk ### Status Size Free Dyn Gpt
Disk 0 Online 30 GB
Disk 1 Offline 50 GB
Disk 2 Offline 80 GB
Disk 3 Offline 250 GB
Disk 4 Offline 50 GB

In my case, disk 1 till 4 was offline so I had to repeat the following steps several times.

Select a offline disk

DISKPART> select disk 1
Disk 1 is now the selected disk

DISKPART>attributes disk clear readonly
Disk attributes cleared successfully.

And to check if all the settings are now correct, type “attributes disk”.
This will give an output something like this:

Current Read-only State : No
Read-only : No
Boot Disk : No
Pagefile Disk : No
Hibernation File Disk : No
Crashdump Disk : No
Clustered Disk : No

Now type “online disk” to bring the disk online.

If Clustered disk is set to YES. You have to stop the nodes. After that you are allowed to do the action above.