Volumes attached to a running Windows guest becomes offline after reboot. The following warning is observed in the Windows disk management utility.
"The disk is offline because of policy set by an administrator"
- Platform9 Managed OpenStack - All versions.
SAN policy has been introduced in Windows to protect shared disks accessed by multiple servers. By default, Windows machines will have the SAN policy set to be "Offline Shared", thus irrespective of the libvirt/qemu or hardware version you may see this issue.
- Open a command prompt from within the virtual machine.
- Run the diskpart utility by running the command:
- To display the SAN policy, run the command:
SAN Policy: Offline Shared
- 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.
- To get summary information about each disk, run the command:
Disk Status Size Free Dyn Gpt
--------------- ------------------ ----------- ----------
Disk 0 Online 40 GB 0 B
*Disk 1 Offline 60 GB 1024 KB
- Select Disk 1 (currently offline disk) with the command:
diskpart>select disk 1
Disk 1 is now the selected disk
- Clear the read-only attribute for Disk 1 with the command:
diskpart>attributes disk clear readonly
disk attributes cleared successfully
current read-only state: no
boot disk: no
pagefile disk: no
hibernation file disk: no
crashdump disk: no
clustered disk: no
- Bring Disk 1 online with the command:
diskpart successfully onlined the selected disk