Solved: The Operation Is Not Allowed on a Disk That Contains a Pagefile Volume

Do you want to know how to solve "The operation is not allowed on a disk that contains a pagefile volume"? This article will give you some suggestions.

Dervish

By Dervish / Updated on March 5, 2024

Share this: instagram reddit

Error: The operation is not allowed a disk that contains a pagefile volume

There was one user who decided to use a 3 TB hard drive. At that time, his computer used the Legacy boot. He knew that he had to convert to a GPT disk to fully use 3 TB hard drive. When he used DiskPart.exe to convert MBR to GPT, he received an error message: "Virtual disk service error: The operation is not allowed on a disk that contains a pagefile volume."

The Operation Is Not Allowed on a Disk That Contains a Pagefile Volume

He even disabled page files in Control Panel and deleted the file c:\pagefile.sys in File Explorer to no valid. But still unable to succeed, what is going on?

The truth is that DiskPart.exe can only convert an empty hard disk to GPT or MBR partition style. Therefore, if you ever need to convert a hard drive to MBR or GPT with DiskPart.exe, you need to use the “clean” command to delete all partitions on that disk before converting GPT. 

Tip: Both MBR and GPT are disk partition styles.  MBR is an old partition style that supports partitions up to 2 TB. While GPT is a new partition style, which supports partitions up to 9.4ZB. Therefore, to fully use the hard disk space, you need to set the partition style to GPT.

Why does the error "The operation is not allowed on a disk that contains a pagefile volume“ appear?

Users may encounter the error "Virtual disk service error: The operation is not allowed on a disk that contains a pagefile volume" due to several reasons:

  1. Pagefile Location: The error occurs when users attempt disk operations on a disk that contains the pagefile volume. The pagefile, also known as the paging file or swap file, is a reserved portion of the hard drive used by the operating system for virtual memory management.

  2. System Restrictions: Certain disk operations such as formatting, partitioning, resizing, or converting a disk to dynamic disk format are restricted on disks containing the pagefile volume. This restriction is in place to prevent disruption to the virtual memory management process, which relies on the stability of the pagefile.

  3. Operating System Requirements: Some operating systems have specific requirements regarding disk operations on volumes containing the pagefile. Attempting to perform prohibited operations may result in the error message.

  4. Safety Measures: Disabling or tampering with the pagefile can potentially lead to system performance or instability issues. The error message acts as a safeguard to prevent users from inadvertently causing harm to the system by performing unauthorized disk operations.

  5. Virtual Disk Service Errors: The error message "Virtual disk service error: The operation is not allowed on a disk that contains a pagefile volume" is generated by the Virtual Disk Service (VDS) when it detects an attempt to perform a prohibited operation on a disk with an active pagefile.

Overall, the error typically occurs due to system restrictions aimed at maintaining the stability and integrity of the virtual memory management process.

How to solve "The operation is not allowed on a disk that contains a pagefile volume"

As mentioned, this method will get everything on the disk deleted. So you’d better back the hard drive before applying the following steps. What's more, a Windows installation USB is required.

Next, we take the convert the system disk from MBR to GPT as an example:

1. Restart the computer, enter BIOS to enable UEFI boot mode and exit.

2. Boot your computer from a Windows installation USB.

3. At the screen to select where to install Windows, press Shift + F10 to open a Command Prompt window.

Install Windows

4. Type "diskpart" and press Enter first. Then, type the following commands and press Enter after inputting each command:
● list disk
● select disk X
(X is the number of disk)
● clean
● convert gpt

Convert mbr to gpt Diskpart

5. When finished, type exit to exit the command prompt window. Reinstall Windows on the GPT disk.

Alternative to convert MBR to GPT without data loss

If you seek help from AOMEI Partition Assistant Professional, you just need to change the Legacy mode to UEFI without reinstalling Windows. It allows you to convert a system disk from MBR to GPT without affecting OS. In other words, once the conversion is done, you only need to change BIOS to UEFI boot mode and then boot your Windows 11/10/8/7 without reinstallation. The most exciting thing is that the entire conversion process is very simple and only takes a few steps via some clicks to complete.

In addition to convert MBR/GPT to MBR/GPT, you can also use it to convert primary partition to logical drive, convert dynamic disk to GPT, and more.

Download ProDemo Win 11/10/8.1/8/7/XP
Secure Download

Step 1. Install and run AOMEI Partition Assistant Professional on your PC.  Right-click on the disk that not allowed you to convert because of pagefile volume, and then select the option “Convert to GPT”.

Convert System Disk to GPT

Step 2. Confirm that your motherboard supports EFI/UEFI boot. Then, click "Yes". 

OK

Step 3. Click the option “Apply” to apply this operation.

Apply to GPT System Disk

Conclusion

Situations like “the operation are not allowed on a disk that contains a pagefile volume” will never happen with AOMEI Partition Assistant Professional because the whole process does not interfere with the pagefile and all the data remain intact.

Last but not least, if you plan to convert MBR to GPT in Windows Server, AOMEI Partition Assistant Server is your first choice. It can help you manage and solve various problems on the Server computer flexibly and in time.

FAQs about error: the operation is not allowed on a disk that contains a pagefile volume

1. What does the error message "The operation is not allowed on a disk that contains a pagefile volume" mean?
This error message indicates that the operation you are attempting to perform is not permitted on a disk that hosts the pagefile volume. The pagefile, also known as the paging file or swap file, is a reserved portion of the hard drive used by the operating system for virtual memory management.

2. Why am I encountering this error message?
You may encounter this error message when trying to perform certain disk-related operations, such as formatting, partitioning, or resizing, on a disk that contains the pagefile volume. The system restricts these operations to prevent disruption to the virtual memory management process.

3. What actions trigger the error "The operation is not allowed on a disk that contains a pagefile volume"?
Common actions that can trigger this error include attempting to shrink or extend a volume, converting a disk to dynamic disk format, or changing the drive letter of a volume. These actions directly affect disk structure and may interfere with the functioning of the pagefile.

4. Can I safely disable the pagefile to perform disk operations?
Yes, you can safely disable the pagefile temporarily to perform disk operations. However, keep in mind that disabling the pagefile may affect system performance, especially if your system experiences high memory usage. It's recommended to re-enable the pagefile after completing the disk operation.

5. What precautions should I take before performing disk operations on a volume containing the pagefile?
Before attempting any disk operations on a volume containing the pagefile, it's crucial to back up important data stored on that volume. Additionally, ensure that your system is properly configured to handle virtual memory requirements during the operation.

Dervish
Dervish · Staff Editor
Dervish is an English editor of AOMEI Technology; He is delicated to offering users easy and effecitve solutions for issuses related to disks and partitoins. In his spare time, he enjoy wathcning films, playing footable, traveling and so on.