Unable to initialize a second virtual disk on VMs running Windows 2008 or newer.
search cancel

Unable to initialize a second virtual disk on VMs running Windows 2008 or newer.

book

Article ID: 341581

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms:
  • After adding virtual disk on Windows 7, Windows Server 2008 R2, Windows Server 2012 R2, Windows Server 2012, Windows 8, Windows 10, or newer you cannot bring disk online.
  • The virtual machine is configured with Virtual Hardware version 7 or newer.
  • You see this error within Windows under Disk Management:

    The disk is offline because of policy set by an administrator


Environment

VMware vSphere ESXi 6.0
VMware vSphere ESXi 5.1
VMware vSphere ESXi 5.0
VMware vSphere ESXi 5.5

Cause

SAN policy has been introduced in Windows Server 2008 to protect shared disks accessed by multiple servers. The first time the VM sees the disk, it'll be offline, but after being brought online once it should be online even after a reboot.

By default Windows machines will have the SAN policy set to be "Offline Shared", thus irrespective of the ESXi or hardware version you may see this issue.

Resolution

To resolve this issue:
  1. Open a command prompt from within the virtual machine.
  2. To run the Diskpart utility, run the command:

    diskpart.exe
     
  3. To display the SAN policy, run the command:

    diskpart> san

    SAN Policy: Offline Shared
     
  4. Change the SAN policy to be online with the command:

    diskpart> san policy=OnlineAll

    Diskpart successfully changed the SAN policy for the current operating system.
     
  5. To get a summary information about each disk, run the command:

    diskpart>list disk

    Disk Status Size Free Dyn Gpt
    --------------- ------------------ ----------- ----------

    Disk 0 Online 40 GB 0 B
    *Disk 1 Offline 60 GB 1024 KB

     
  6. Select Disk 1 (currently offline disk) with the command:

    diskpart>select disk 1

    Disk 1 is now the selected disk


    Note: From this point, all diskpart commands apply to this disk.
     
  7. Clear the read-only attribute for the Disk 1 with the command:

    diskpart>attributes disk clear readonly

    disk attributes cleared successfully


    To check that the read-only attribute has been cleared, run the command:

    diskpart>attributes disk

    current read-only state: no
    boot disk: no
    pagefile disk: no
    hibernation file disk: no
    crashdump disk: no
    clustered disk: no

     
  8. Bring Disk 1 online with the command:

    diskpart>online disk

    diskpart successfully onlined the selected disk


    The disk should now be able to be assigned a drive letter and be mounted.


Additional Information

Windows 2008 または Windows 2008 R2 内で 2 番目の仮想ディスクを初期化できない
在 Windows 2008 或 Windows 2008 R2 内无法初始化第二个虚拟磁盘