Best 2 Ways to Fix Virtual Disk Service Error Clean Is Not Allowed

There are targeted solutions for users who encounter virtual disk service error clean is not allowed while using diskpart command to clean a disk. With knowing the reasons, you can effectively fix it.

Posted by @Cherry November 12, 2025 Updated By @Cherry May 20, 2025

User case: Virtual disk service error clean is not allowed

 

I have a Windows 8.1 Lenovo Yoga 13 with 128GB hard drive, and I bought an identical 128GB SSD from eBay, which comes with a Windows 8.1 installed and all the partitions. But I want to use it as my secondary storage device and delete everything on the new SSD. But I can’t delete the partition on the new SSD via Disk Management. Then I used diskpart clean command to clean the new SSD drive, I get an error message: virtual disk service error: clean is not allowed on the disk containing the current boot, system, pagefile, crashdump or hibernation volume. I’m not using it as my system disk, why I can’t clean it at all? Can anyone help? Thanks.

- Question from Microsoft Community

When trying to wipe a disk using the DiskPart "clean" command, you might see an error message that says: "Virtual Disk Service error: Clean is not allowed on the disk containing the current boot, system, pagefile, crashdump or hibernation volume." This can be confusing—especially if you think the disk is not being used by your system. So, why does this happen?

Why clean is not allowed on the disk error occurs?

Usually, you’ll see this error when using the DiskPart clean command on a system disk. In this section, we’ll look at the common reasons why this error occurs and why Windows blocks certain disks from being cleaned. Knowing these causes can help you fix the issue safely and avoid losing important data. To make it easier to understand, the table below lists the possible causes:

Reason Explanation
System or Boot Volume The disk you are trying to clean might still contain system or boot files. Windows protects this disk to prevent the system from becoming unbootable.
Pagefile, Crashdump, or Hibernation Files If the disk has these active system files, DiskPart will block the clean command to avoid losing important data.
Wrong Disk Identified as System Even if you didn’t install Windows on the new SSD, it may still have system partitions from the previous owner. Windows might mistakenly see it as a system disk.
Disk Management Limitations The Delete Volume option is greyed out in Disk Management if the system detects that the disk contains protected or active system data.

Thus, how to clean the system disk with the right way and get rid of the virtual disk service error clean is not allowed issue? The following content will clear your doubts.

How to fix diskpart virtual disk service error clean is not allowed in Windows PC?

Actually, there is a solution to solve this “clean is not allowed on the disk containing the current boot…” problem: delete partitions on system disk under WinPE environment. To achieve that, you can try the following two methods. Choose one based on your needs.

Way 1. Using Windows installation disc to clean

If you have the Windows installation disc, you can follow these steps to solve “clean is not allowed on the disk” issue in Windows 7/8/10/11:

Step 1. Insert the Windows installation disc, then boot from it.

Step 2. Click Repair your computer> Troubleshoot >Advanced Options > Command Prompt.

Step 3. Then input the diskpart commands to clean hard disk:

🔶 diskpart
🔶 list disk
🔶 select disk [disknumber]
🔶 clean

Then you could create a new partition on the drive to solve this problem. If the solution is not working for you, you could try the way 2.

Way 2. Force clean the boot disk with a partition manager

If you don’t have a Windows installation disc, the “virtual disk service error clean is not allowed” problem can be solved by third party partition manager like AOMEI Partition Assistant. It is highly recommended by Windows users due to its friendly interface and comprehensive functions. To solve “the clean is not allowed” problem, you could use it to create bootable media, then delete all partitions on the system disk.

Before cleaning the system disk:
1. Install AOMEI Partition Assistant Pro; and the Demo Version is available for free download and a trial.
2. Prepare an empty USB flash drive at least 13GB.
3. If necessary, you can back up system in advance.

🌟Stage 1. Create Bootable Media

Free Download Win 11/10/8.1/8/7
Secure Download

Step 1. Insert the USB drive and make sure it can be dete cted. Launch the software, click “Tools” in the top toolbar, and choose “Make Bootable Media”.

Step 2. Click Next.

Step 3. Tick USB Boot Device to create bootable USB drive.

Step 4. Press Proceed.

🌟Stage 2. Delete all partitions on system disk

After creating bootable media, boot computer from the bootable USB stick, then you will see AOMEI Partition Assistant on the desktop. Perform this program and delete all partitions on system disk with these steps:

Step 1. Click the system disk and choose Delete all Partitions under Disk Operations column.

Step 2. Choose a proper deletion method, hit OK.

Step 3. Press Apply to confirm to fix the clean is not allowed on the system disk.

Afterwards, create a new partition on the hard drive as the secondary storage device, the virtual disk service error clean is not allowed problem should be solved.

Final Words

Briefly, AOMEI Partition Assistant is a versatile partition management tool. Besides forcing deleting system partition/disk, it is also able to solve the volume is too big for FAT32 issue, convert disk between MBR and GPT without deleting paritions, etc. There are 2 similar errors you could solve use this software: format is not allowed on system partition; delete is not allowed on the current boot, system, pagefile, crashdump, or hibernation volume. If you are running Windows Server 2025, 2019, 2016, 2012, please try AOMEI Partition Assistant Server.