A practical guide to the most common Virtual Disk Service errors in DISKPART on Windows 10 and Windows 11 — including read-only disks, protected partitions, conversion failures, non-adjacent free space, and service problems.
Virtual Disk Service error is a generic DISKPART message that appears when Windows cannot complete a disk, partition, or volume operation through the storage management layer. The operation may be blocked by permissions, a read-only attribute, a protected partition type, missing adjacent free space, a damaged partition table, or the fact that you are trying to modify the disk Windows is currently using.
DISKPART is powerful because it can initialize disks, clean partition tables, create volumes, assign drive letters, convert MBR/GPT layouts, and modify attributes. The same power also makes its errors strict: if the selected disk or volume does not meet the exact requirement for a command, DISKPART stops and returns a Virtual Disk Service error instead of guessing what you meant.
clean, delete partition override, format, and convert can destroy partition information or erase data. Back up important files before running destructive commands, and always verify the selected disk with list disk and detail disk.
| Error message | Typical meaning | Best first fix |
|---|---|---|
| Access is denied | Insufficient elevation, locked volume, or policy restriction | Run Terminal/CMD as administrator and close apps using the drive |
| The media is write protected | Disk, volume, USB drive, or SD card is read-only | Clear read-only attributes and check physical lock switch |
| Clean is not allowed on the disk containing the current boot, system, pagefile, crashdump or hibernation volume | You selected the active Windows disk | Boot from Windows installation USB or WinRE |
| Cannot delete a protected partition without the force protected parameter set | Recovery, EFI, OEM, or reserved partition is protected | Use the correct target disk and only then delete partition override |
| There is not enough usable free space for this operation | Free space is missing, not adjacent, or blocked by partition layout | Check layout in Disk Management; create adjacent unallocated space |
| The specified disk is not convertible | Disk layout or current state prevents MBR/GPT conversion | Back up data, clean the disk, then convert — or use MBR2GPT when appropriate |
Many DISKPART errors are easy to fix, but the wrong command on the wrong disk can wipe the operating system or another drive. Use this checklist before changing partitions.
clean or format.list disk, select disk N, and detail disk.Start with a non-destructive inspection. The commands below do not erase anything; they show which disk and volume you are working with.
diskpart
list disk
select disk N
detail disk
list volume
list partition
Replace N with the correct disk number from list disk. Verify the size, status, and model before continuing.
attributes disk
list volume
select volume N
attributes volume
If Current Read-only State or Read-only is set to Yes, the error is probably caused by write protection. See the read-only section below.
list disk
In the Gpt column, an asterisk means the disk uses GPT. No asterisk usually means MBR. This matters for conversion, EFI partitions, and boot compatibility.
Viewing disks may work in a normal terminal, but changing partitions usually requires elevated permissions.
A software attribute, registry policy, SD card lock, USB controller issue, or failing drive can make the media write protected.
Windows blocks destructive operations on the active boot, system, pagefile, hibernation, and crashdump volumes while the OS is running.
EFI System, Recovery, OEM, and Microsoft Reserved partitions are intentionally protected from normal deletion.
DISKPART can extend a volume only when usable unallocated space is available in the correct position.
Corrupted partition tables, failing hardware, dynamic disks, removable media quirks, or unsupported sector layouts can cause repeated errors.
The Access is denied error usually means DISKPART cannot write to the disk because the console is not elevated, another process is using the volume, or a policy blocks the operation.
diskpart again.Close File Explorer windows, backup tools, antivirus scans, virtual machine software, and any program that may be accessing the target drive. If the drive is external, safely eject it, reconnect it, and try again.
For non-system data disks, toggling the disk offline and online may release stale locks.
diskpart
list disk
select disk N
offline disk
online disk
If DISKPART reports that the media is write protected, clear the disk and volume read-only attributes first.
diskpart
list disk
select disk N
attributes disk clear readonly
list volume
select volume N
attributes volume clear readonly
If the problem affects USB drives, a Windows policy may be blocking writes to removable storage.
regedit
Open this key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies
If you see WriteProtect, set it to 0. If the StorageDevicePolicies key does not exist, this policy is probably not configured.
This DISKPART error appears when you run clean on the disk that contains the currently running Windows installation or critical system files. Windows blocks the command to prevent the operating system from erasing itself while it is running.
diskpart
list disk
select disk N
detail disk
clean
Because Windows is no longer running from the target disk, DISKPART can clean it. This is commonly used before a clean Windows installation.
clean command removes partition information from the selected disk. After running it, Windows will treat the disk as unallocated until new partitions are created.
This error usually appears when you try to delete an EFI System partition, Recovery partition, OEM partition, or another partition that Windows protects by design. It is common when repurposing an old Windows system drive as a data drive.
Use this only when you are absolutely sure the partition is on the correct disk and is no longer needed.
diskpart
list disk
select disk N
list partition
select partition N
delete partition override
If your goal is to reuse the whole disk and there is no data to keep, it is usually cleaner to remove all partitions at once:
diskpart
list disk
select disk N
clean
convert gpt
After that, create a new partition in Disk Management or with DISKPART.
This message often appears during extend, create partition, or conversion operations. The most common reason is that the free space exists somewhere on the disk, but not in the location DISKPART needs.
To extend a basic volume, unallocated space normally needs to be directly after the target partition. If a Recovery partition or another volume sits between them, DISKPART cannot extend the volume into that space.
diskpart
list volume
select volume N
extend
extend again as administrator.chkdsk and check the drive health.DISKPART can convert an empty disk between MBR and GPT. It normally cannot convert a disk that still contains partitions. If you run convert gpt or convert mbr on a populated disk, you may get a Virtual Disk Service error.
diskpart
list disk
select disk N
clean
convert gpt
Or, for legacy BIOS systems:
diskpart
list disk
select disk N
clean
convert mbr
If you need to convert a Windows 10 or Windows 11 system disk from MBR to GPT without deleting data, use mbr2gpt.exe instead of DISKPART. The computer must support UEFI boot mode.
mbr2gpt /validate /allowFullOS
mbr2gpt /convert /allowFullOS
After conversion, enter BIOS/UEFI setup and switch boot mode from Legacy/CSM to UEFI. If you skip this step, Windows may not boot.
mbr2gpt is intended for Windows system disks that meet Microsoft’s conversion requirements. It is not a universal partition converter for every external or data disk.
DISKPART relies on Windows storage services. If the service is disabled, stuck, or blocked by a damaged Windows installation, disk operations may fail before they even reach the selected drive.
services.msc and press Enter.sc config vds start= demand
net start vds
If storage tools keep failing, repair the Windows component store and system files:
DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannow
Restart the computer after the scan completes and test DISKPART again.
DISKPART is not the only Windows storage tool. Depending on the task, Disk Management or PowerShell may provide a clearer error message or a safer workflow.
diskmgmt.msc
Disk Management is useful for visually checking whether a partition is healthy, unallocated space is adjacent, or a Recovery partition is blocking an extension.
Open PowerShell as administrator and inspect disks with:
Get-Disk
Get-Partition
Get-Volume
To clear read-only status from a disk:
Set-Disk -Number N -IsReadOnly $false
To initialize a new disk as GPT:
Initialize-Disk -Number N -PartitionStyle GPT
| Task | Best tool | Why |
|---|---|---|
| See partition layout visually | Disk Management | Fast overview of unallocated space, EFI, Recovery, and data partitions |
| Wipe a disk before reinstalling Windows | DISKPART from installation USB | Works outside the running Windows system |
| Script storage actions | PowerShell | Modern cmdlets, object output, better automation |
| Convert system disk MBR to GPT | MBR2GPT | Designed for in-place conversion of Windows boot disks |
| Move partitions | Third-party partition manager | Windows built-in tools cannot move partitions directly |
clean, format, and delete partition override can cause data loss.
list disk and detail disk, then run clean. Do not run clean on the active Windows disk from inside the same running Windows installation.
clean or clean all?
▼
clean removes partition information quickly. clean all writes zeros to the entire disk and takes much longer. Use clean for normal repartitioning. Use clean all only when you intentionally want a full overwrite, and avoid it on SSDs unless there is a specific reason.
delete partition override still fail?
▼