The error mainly occurs in two scenarios. The first is to restore a guest virtual machine from a snapshot, and the second when there are the same disk identifiers when connecting an additional disk to the system. In this article we will share how you can resolve the error Disk is offline due to administrator-defined policy.
Disk is offline due to administrator-defined policy
You will need administrator privileges to correct this error. The second tip uses the Diskpart tool, which should be used with extreme caution. I strongly suggest that you contact a technician to help you if it is too complicated for you.
1) Restoring the guest virtual machine from a snapshot
When you restore a guest virtual machine using a backup snapshot, the restored guest operating system (in the virtual machine) does not automatically mount the attached drives. Although the disks are visible using the utilities, they display an error message The disk is offline due to the policy defined by the administrator. This is happening due to a problem in the Windows SAN or Storage Area Network policy. According to Microsoft, they are disabled by default to avoid data corruption. Here's how to activate the SAN policy online.
san (policy={onlineAll | offlineAll | offlineShared}) (noerr)
In the virtual machine, open the command prompt or PowerShell with administrator privileges.
Launch the diskpart tool using the following command.
C:> diskpart
Type SAN to check the status of the policy. It must be shared offline in our scenario.
DISKPART> SAN SAN Policy : Offline Shared
Change the policy to OnlineAll:
DISKPART> SAN POLICY=OnlineAll
Then, when you restore the snapshot, the disk automatically goes online.
Related: Boot device not found in Windows 10.
2) Disk identifier problem
Assuming that you have a large number of disks connected to the server and that one or two of them are offline. Disk management and the diskpart utility also fail to help; it is because of the same disk identifiers. Each disc has a unique identifier. If they are the same, one of them will be disabled and will appear as offline with the warning message The disk is offline due to the policy set by an administrator. It is also called the disk signature collision.
However, if you check the logs, you should identify a message similar to Disk N has the same disk identifiers as one or more disks connected to the system. This is a typical case of duplicate discs. Use the Diskpart tool to find it:
- Open diskpart from the command prompt
- List disc
- Select disk 1
- Uniqueid disc
Note the identifier. Check that they are the same for other readers. If there is a disc with a duplicate ID, you need to change the signature using Uniqueid command.
uniqueid disk (id={| }) (noerr)
- To change the signature, think of a unique number.
- In the Diskpart prompt, type uniqueid disk ID = (NEW SIGNATURE) "with the square brackets
- Press Enter and it will define a new identifier. Generally generating a GUID makes more sense
uniqueid disk id=baf784e7-6bbd-4cfb-aaac-e86c96e166ee
Once applied, the computer should automatically identify the disc.
I hope these two tips were able to resolve the error.