Diskpart is a powerful command-line tool developed by Microsoft that lets users manage hard drives on a Windows computer. By using the Diskpart utility, you can create partitions on a hard drive, delete partitions from a hard drive, format a particular partition on a hard drive, etc. While deleting a particular partition from a hard drive on a Windows computer by using the Diskpart utility, some users have received an error. When they give the delete partition override command after selecting a particular partition on a hard drive, the Diskpart shows the following error message:
Virtual Disk Service error:
Delete is not allowed on the current boot, system, pagefile, crashdump or hibernation volume.
The above error message prevents users from deleting a particular partition on their hard drives. If you receive the same error message, the suggestions provided in this article may help you fix the problem.
Delete is not allowed on the current boot, system, pagefile, crashdump or hibernation volume.
This Diskpart virtual disk service error usually occurs when you install Windows OS on another disk, say an SSD, and then try to disk partitions from the old hard disk. Try the following solutions to get rid of this error:
- Move the System Reserved partition to another drive
- Launch the Command Prompt from the Windows Recovery Environment
- Change the boot order
- Disable the paging file
- Remove all the unwanted partitions and unplug your HDD
Let’s see all these fixes in detail.
1] Move the System Reserved partition to another drive
A System Reserved partition contains the system files that are required at the time Windows boots. Sometimes while installing Windows on an SSD, a system reserved partition is not created by Windows because it already exists on an HDD. In this case, Windows uses the System Reserved partition on the HDD to boot. If you are unable to delete the System Reserved partition from your old hard drive by using the Diskpart utility because of this error, this might be the case with you.
Because Windows is using the System Reserved partition on HDD to boot, you cannot delete it and if you try to do so, you will get an error. To confirm this, open the Disk Management and check if a System Reserved partition is created on your SSD. If not, copy the same from your HDD to your SSD.
To copy the System Reserved partition from your HDD to your SSD. For this, you can use any third-party tool, like AOMEI Backupper. Before proceeding, we suggest you create a system repair disc so that you will be able to troubleshoot if any problem occurs after copying the System Reserved partition from HDD to SSD. Now, you should not get the error while deleting the System Reserved partition from your old hard drive.
2] Launch the Command Prompt from the Windows Recovery Environment
If the above solution did not fix your problem, launch the Command Prompt from Windows Recovery Environment and then try deleting the hard drive partition. Check if you receive the same error message this time. To enter the Windows Recovery Environment, press and hold the Shift key and then restart your computer.
3] Change the boot order
Some users have cloned Windows operating system from their hard drive to a new SSD. After that, when they ran the delete partition override command in Diskpart to delete a partition on SSD, they receive the “Delete is not allowed…” error message. If this is the case with you, change the boot order in BIOS and see if it fixes the problem.
4] Disable the paging file
Some users have found the paging file the culprit of the problem. According to them, the paging file was configured on another drive than the C drive. When they disabled the paging file, the issue was fixed. You can also try this. Disable the paging file and see if it helps. The steps to do this are as written below. Before you proceed, we suggest you create a System Restore Point.
- Click on Windows Search and type Advanced System Settings.
- Select View Advanced System Settings from the search results.
- The System Properties window will appear.
- Under the Advanced tab, click on the Settings button in the Performance section.
- When the Performance Options window opens up, select the Advanced tab and click the Change button under the Virtual memory section.
- Deselect the Automatically manage paging file size for all drives checkbox.
- If the paging file is configured on another drive partition, you will be able to see its size next to that drive partition name.
- Select the drive partition and click on the No paging file radio button.
- Click Set.
- Click OK.
Now, you should be able to delete the partition using the Diskpart utility. After deleting the partition, you can enable the paging file again.
5] Remove all the unwanted partitions and unplug your HDD
If you are unable to delete the partitions from a new hard disk, say an SSD, or from the old hard disk, say an HDD after a fresh install of Windows on the new SSD, try this. Reinstall Windows on your SSD again but this time, remove all the unwanted partitions during the Windows installation when Windows shows you the partitions and the drives. Once you are done, exit the installer and unplug or disconnect all the drives except the one on which you are installing the Windows operating system. Now, turn on your system with the bootable installer and complete the installation process. Once the installation process gets completed, you can plug your HDD again into your system.
Read: Diskpart has encountered an error, The media is write protected.
How do you fix the operation is not allowed on a disk that contains a pagefile volume?
While converting a hard drive to MBR or GPT by using the Diskpart utility, you may receive the following error message:
Virtual disk service error:
The operation is not allowed on a disk that contains a pagefile volume.
This error usually occurs if your hard drive is not empty. Therefore, before you start converting the hard drive, it is necessary to delete all the partitions from that drive. You can use the clean command to delete all the partitions from that hard drive or you can delete the same via Disk Management.
If after deleting all the partitions, the issue still persists, create a Windows bootable USB Flash Drive. Now, boot from that USB and press Shift + F10 when the first screen comes up. This will take you to the administrator Command Prompt outside Windows. Now, run the Diskpart commands there.
Read: Diskpart Virtual Disk Service Error, The volume size is too big
Can I restart the Virtual Disk Service?
Virtual Disk Service (VDS) is a service on Windows computers that performs queries and configuration operations at the request of users and applications. If Virtual Disk Service is not running on your system, you can start it via the Services Management window. The steps for the same are explained below:
- Press the Win + R keys to launch the Run command box.
- Type services.msc in the Run command box and click OK. This will open the Services Management window.
- In the Services Management window, locate the Virtual Disk service.
- Right-click on it and select Start.
If you want the VDS to start automatically, double-click on it to open its properties. Under the General tab, select Automatic in the Startup type drop-down and click OK.
Related:
- Diskpart Virtual Disk Service error. The operation timed out
- Diskpart Virtual Disk Service Error, The volume size is too big
- Diskpart Virtual Disk Service error, There is not enough usable space
- Diskpart Virtual Disk Service error, The operation is not supported by the object
- Diskpart Virtual Disk Service error, The specified disk is not convertible
- Diskpart Virtual Disk Service error, The file system is incompatible
How do I fix Diskpart failed to clear disk attributes?
If Diskpart is giving you the Diskpart failed to clear disk attributes error, there might be some bad sectors on your hard drive or your hard drive might be write-protected. To fix this problem, run the CHKDSK scan. The CHKDSK utility will repair the bad sectors on your hard disk. If the CHKDSK scan does not help, remove the write protection from your hard drive and then check if the issue is fixed.
Hope this helps.
Read next: Diskpart has encountered an error, The parameter is incorrect.