Windows Guide · DISKPART Troubleshooting

Virtual Disk Service Error in DISKPART: Causes and Working Fixes

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.

⏱ 8 min read 🪟 Windows 10 🪟 Windows 11 ⚙️ DISKPART ⚠️ Backup recommended

What Does “Virtual Disk Service Error” Mean in DISKPART?

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.

🚨
Important Commands such as 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.

Common DISKPART Virtual Disk Service Error Messages

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

Before Fixing a DISKPART Virtual Disk Service Error: Safety Checklist

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.

ℹ️
Tip If you only need to assign a drive letter or format a normal partition, try Disk Management first: press Win + X and select Disk Management. Use DISKPART when the graphical tool cannot complete the job.

Quick DISKPART Diagnostics: Confirm the Selected Disk, Volume, and Attributes

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.

Check Whether the Disk or Volume Is Read-Only

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.

Check the Partition Style: MBR or GPT

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.

Most Common Causes of Virtual Disk Service Errors in DISKPART

1. DISKPART Was Not Started as Administrator

Viewing disks may work in a normal terminal, but changing partitions usually requires elevated permissions.

2. The Disk or Volume Is Read-Only

A software attribute, registry policy, SD card lock, USB controller issue, or failing drive can make the media write protected.

3. You Selected the Current System Disk

Windows blocks destructive operations on the active boot, system, pagefile, hibernation, and crashdump volumes while the OS is running.

4. The Partition Is Protected

EFI System, Recovery, OEM, and Microsoft Reserved partitions are intentionally protected from normal deletion.

5. The Required Free Space Is Not Adjacent

DISKPART can extend a volume only when usable unallocated space is available in the correct position.

6. The Disk Layout Is Damaged or Unsupported

Corrupted partition tables, failing hardware, dynamic disks, removable media quirks, or unsupported sector layouts can cause repeated errors.

Fix “Virtual Disk Service Error: Access Is Denied” in DISKPART

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.

Step 1: Run Windows Terminal or Command Prompt as Administrator

  1. Right-click the Start button.
  2. Select Terminal (Admin), Windows PowerShell (Admin), or Command Prompt (Admin).
  3. Accept the UAC prompt.
  4. Run diskpart again.

Step 2: Close Programs That May Be Using the Volume

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.

Step 3: Take the Volume Offline and Online 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
⚠️
⚠️
Do not do this to the Windows system disk Taking the wrong disk offline can interrupt running programs or make volumes disappear from File Explorer. Use this only on a data disk that you have positively identified.

Fix “The Media Is Write Protected” or Read-Only Disk Errors in DISKPART

If DISKPART reports that the media is write protected, clear the disk and volume read-only attributes first.

Clear Read-Only Attribute from the Disk

diskpart
list disk
select disk N
attributes disk clear readonly

Clear Read-Only Attribute from the Volume

list volume
select volume N
attributes volume clear readonly

Check Registry Write-Protection Policy for USB Drives

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.

Other Things to Check

Fix “Clean Is Not Allowed on the Disk Containing the Current Boot, System, Pagefile, Crashdump or Hibernation Volume”

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.

Typical message: Virtual Disk Service error: Clean is not allowed on the disk containing the current boot, system, pagefile, crashdump or hibernation volume.

Correct Solution: Boot from Windows Installation Media or Recovery Environment

  1. Create a Windows installation USB or recovery drive.
  2. Boot the computer from that USB drive.
  3. On the setup screen, press Shift + F10 to open Command Prompt.
  4. Run DISKPART from there.
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.

🚨
Data loss warning The clean command removes partition information from the selected disk. After running it, Windows will treat the disk as unallocated until new partitions are created.

Fix “Cannot Delete a Protected Partition Without the Force Protected Parameter Set”

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.

Delete a Protected Partition with Override

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

When Not to Delete Protected Partitions

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.

Fix “There Is Not Enough Usable Free Space for This Operation” in 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.

For Extending a Partition, Free Space Must Be Adjacent

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

Use Disk Management to Inspect the Layout

  1. Press Win + X.
  2. Open Disk Management.
  3. Check whether unallocated space is immediately to the right of the volume you want to expand.

Possible Solutions

Fix DISKPART MBR/GPT Conversion Errors: “The Specified Disk Is Not Convertible”

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.

Convert an Empty Disk with DISKPART

diskpart
list disk
select disk N
clean
convert gpt

Or, for legacy BIOS systems:

diskpart
list disk
select disk N
clean
convert mbr

Convert a Windows System Disk Without Wiping It

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 limitation 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.

Fix “Virtual Disk Service Is Not Running” or Storage Management Service Problems

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.

Start the Virtual Disk Service from Services

  1. Press Win + R.
  2. Type services.msc and press Enter.
  3. Find Virtual Disk.
  4. Open it and set Startup type to Manual or Automatic.
  5. Click Start, then try DISKPART again.

Start the Service from Command Prompt

sc config vds start= demand
net start vds

Repair Windows System Files

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.

Use Disk Management or PowerShell When DISKPART Fails

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.

Open Disk Management

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.

Use PowerShell Storage Cmdlets

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

Frequently Asked Questions About Virtual Disk Service Errors in DISKPART

Q Is a Virtual Disk Service error a sign of a broken hard drive or SSD?
Not always. Most Virtual Disk Service errors are caused by permissions, disk attributes, protected partitions, or layout limitations. However, if the same disk repeatedly becomes read-only, disappears, reports I/O errors, or fails on another computer, check its SMART health and replace it if necessary.
Q Can I fix the error without losing data?
It depends on the cause. Clearing read-only attributes, starting the Virtual Disk service, assigning a drive letter, or running DISKPART as administrator usually does not erase data. Commands like clean, format, and delete partition override can cause data loss.
Q Why does DISKPART fail when Disk Management also fails?
Both tools use Windows storage components, so they can fail for the same underlying reason: write protection, unsupported layout, lack of adjacent free space, service problems, or hardware errors. DISKPART often gives a more specific command-line error, while Disk Management shows the layout more clearly.
Q What is the safest way to clean a Windows system disk?
Boot from a Windows installation USB, press Shift + F10, run DISKPART, verify the disk with list disk and detail disk, then run clean. Do not run clean on the active Windows disk from inside the same running Windows installation.
Q Should I use 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.
Q Why does delete partition override still fail?
The partition may be on the active system disk, the disk may be read-only, the storage service may be stuck, or the drive may have hardware-level write protection. First clear read-only attributes, verify you selected the correct disk, and try from Windows Recovery Environment if the partition belongs to the boot disk.
Summary Most Virtual Disk Service errors in DISKPART are fixed by using an elevated console, clearing read-only attributes, selecting the correct disk, booting from installation media for system-disk operations, or correcting the partition layout. The key rule is simple: identify the exact disk first, then choose the fix that matches the exact error message.