Home windows computer solutions Virtual Disk Manager Incorrect Function: 7 Fixes for Windows 2026

Virtual Disk Manager 'Incorrect Function' Error — 7 Fixes That Work in 2026

Ethan CarterEthan Carter
|Last Updated: March 14, 2026

The 'Virtual Disk Manager: Incorrect function' error appears when Windows Disk Management or DiskPart cannot perform a disk operation — typically initialization, formatting, or attaching a VHD.
Common causes include write protection, file system incompatibility, and driver conflicts.
Ritridata can recover data from affected drives before you attempt destructive fixes.

"Virtual Disk Manager: Incorrect function" is a Windows Disk Management error that appears when you try to initialize, format, or attach a disk or VHD (Virtual Hard Disk) and the operation fails. It is not a single-cause error — the same message can result from write protection, driver issues, a stopped service, or file system incompatibility.


Part 1. What Causes "Virtual Disk Manager: Incorrect Function"?

CauseTypical Scenario
Drive is write-protectedAttempting to format or initialize a write-protected SSD, USB, or SD card
Virtual Disk Service not runningThe Windows service that manages disk operations is stopped
VHD stored on incompatible file systemVHD file on exFAT or FAT32 — cannot be attached (requires NTFS)
Compressed or encrypted NTFS fileVHD with NTFS compression or EFS encryption cannot be attached
Driver conflictThird-party disk drivers (e.g., AppleHFS.sys on Boot Camp) conflict with VDS
Physical disk damageBad sectors prevent write operations from completing
NTFS file system corruptionCorrupted volume prevents disk operations

💡 Tip: Before trying any fix, note whether the error occurs when: (a) trying to initialize/format a physical disk, (b) trying to attach/create a VHD file, or (c) running DiskPart commands. Each scenario has different primary causes and the most effective fix differs accordingly.


Part 2. Fix 1 — Restart Your PC and Check Physical Connections

Start with the simplest fix:

  1. Restart the PC and retry the disk operation
  2. For external drives: disconnect and reconnect the USB or SATA cable
  3. Try a different USB port or cable
  4. If an external drive: ensure it has adequate power (use a powered USB hub if needed)

Many "incorrect function" errors on external drives are caused by loose connections that the OS misinterprets as an unsupported operation.


Part 3. Fix 2 — Restart the Virtual Disk Service

The Windows Virtual Disk Service (VDS) manages communication between disk management applications and storage hardware. If VDS is stopped or hung, all disk operations return the incorrect function error.

Steps:

  1. Press Win + R → type services.msc → press Enter
  2. Find Virtual Disk in the list
  3. If the Status column is blank (stopped): right-click → Start
  4. Set Startup type to Automatic
  5. Click ApplyOK
  6. Retry the disk operation in Disk Management

⚠️ Important: If the Virtual Disk service keeps stopping automatically, it may be crashing due to a driver conflict or a hanging disk operation from a previous session. Check the Windows Event Viewer (search for "Event Viewer" → Windows Logs → System) for error entries from "vds" or "Virtual Disk" immediately before the service crash.


Part 4. Fix 3 — Remove Write Protection

A write-protected disk cannot be initialized, formatted, or have data written to it. The incorrect function error often indicates write protection when the operation involves a physical disk.

Using DiskPart (most reliable):

  1. Open Command Prompt as Administrator (search cmd, right-click → Run as administrator)
  2. Type diskpart → press Enter
  3. Type list disk → note the disk number of the problem drive
  4. Type select disk X (replace X with the disk number)
  5. Type attributes disk clear readonly → press Enter
  6. Type exit
  7. Retry the disk operation in Disk Management

💡 Tip: After removing write protection with DiskPart, close Disk Management completely and reopen it before retrying the initialization or format. Disk Management sometimes caches the old disk state and shows the same error until refreshed.


Part 5. Fix 4 — Move the VHD File to an NTFS Drive

If the error occurs specifically when trying to attach a VHD file, the file may be stored on an exFAT or FAT32 volume. Windows Disk Management cannot attach VHD files from non-NTFS volumes.

  1. Copy the .vhd or .vhdx file to an NTFS-formatted drive (typically your C: drive)
  2. Try attaching it from the new NTFS location via Disk Management → Action → Attach VHD

💡 Tip: If you're unsure whether your VHD target location is NTFS or not, open File Explorer, right-click the drive → Properties → General tab, and check the "File system" field. Only drives showing NTFS are compatible with VHD attach operations in Disk Management.

Also check whether NTFS compression or EFS encryption is enabled on the VHD file:

  1. Right-click the VHD file → PropertiesAdvanced
  2. Ensure neither Compress contents nor Encrypt contents is checked
  3. If either is checked, disable it before trying to attach

Part 6. Fix 5 — Update or Reinstall Disk Drivers

Outdated or conflicting disk drivers cause the Virtual Disk Service to fail operations.

  1. Open Device Manager (Win + X → Device Manager)
  2. Expand Disk drives → right-click the affected disk → Update driver
  3. Select Search automatically for drivers
  4. Also check under Storage controllers for updates to the disk controller driver

Known driver conflict — AppleHFS.sys (Boot Camp users): Some Windows systems running on Apple hardware via Boot Camp have an applehfs.sys driver that conflicts with VDS. To resolve:

  1. Open File Explorer → search for applehfs.sys in the Windows directory
  2. If found, rename it to applehfs-old.sys
  3. Restart and test

Part 7. Fix 6 — Use DiskPart Instead of Disk Management

The Windows Disk Management GUI sometimes fails at operations that DiskPart handles successfully, because DiskPart communicates more directly with the storage hardware.

Format a disk with DiskPart:

diskpart
list disk
select disk X
clean
create partition primary
format fs=ntfs quick
assign
exit

Replace X with your disk number. This erases all data on the disk. Only use after recovering any important data.


Part 8. Fix 7 — Use a Third-Party Partition Tool

If DiskPart also returns errors, a third-party partition manager may have better success:

FixBest ForData Impact
Restart PC / check connectionsExternal drive loose connectionNone
Restart Virtual Disk ServiceVDS stopped or hungNone
Remove write protection (DiskPart)Read-only protected drivesNone
Move VHD to NTFS driveVHD on exFAT/FAT32None
Update/reinstall driversDriver conflictNone
DiskPart formatWhen GUI failsErases disk
Third-party toolAll other scenariosDepends

🗣️ Microsoft Q&A user: "New SSD showed 'incorrect function' when I tried to initialize it. Turned out it was write-protected out of the box. Running 'attributes disk clear readonly' in DiskPart fixed it immediately — Disk Management worked fine after that."

🗣️ BleepingComputer Forum user: "After installing Ventoy, every disk operation in Disk Management returned 'incorrect function.' Uninstalling Ventoy and restarting the Virtual Disk Service resolved it completely. Ventoy modifies disk drivers and something got stuck."


Part 9. Recover Data Before Formatting with Ritridata

Before attempting any fix that involves formatting or DiskPart's clean command, recover your data first. Ritridata can scan an inaccessible or RAW drive and recover files even when Windows Disk Management cannot perform operations on it.

Step 1 — Select the affected drive in Ritridata

Step 2 — Run a safe scan to find recoverable files before any formatting

Step 3 — Preview and recover files to a different drive


FAQ

Q: What does "Virtual Disk Manager: Incorrect function" mean? It means the Windows Virtual Disk Service rejected a disk operation because it encountered a condition it cannot handle — such as a write-protected disk, incompatible file system, a stopped service, or a driver conflict. The error is vague by design; the root cause must be diagnosed case by case.

Q: How do I fix "incorrect function" when initializing a new disk? Start with write protection removal via DiskPart (attributes disk clear readonly). If that doesn't work, update the disk driver in Device Manager, and ensure the Virtual Disk Service is running in services.msc.

Q: Can this error occur on a brand new disk? Yes. Some SSDs and USB drives come with write protection enabled at the firmware level, which causes this error when you try to initialize or format them in Disk Management. DiskPart's attributes disk clear readonly typically resolves this.

Q: Is the "incorrect function" error the same as a failing drive? Not necessarily. A failing drive with bad sectors can cause this error, but it can also occur on perfectly healthy drives due to software or driver issues. Check the drive's SMART status with a tool like CrystalDiskInfo to see if hardware failure is involved.

Q: What if DiskPart also gives "incorrect function"? This indicates a deeper driver or hardware issue. Try a different USB port or SATA port, update the storage controller driver, and consider testing the drive in another computer. If the error persists across systems, the drive itself may be defective.

Q: Can a VHD file cause this error even on an NTFS drive? Yes. If the VHD file has NTFS compression or EFS (Encrypted File System) encryption enabled at the file level, Windows cannot attach it. Right-click the VHD file → Properties → Advanced and ensure neither "Compress contents" nor "Encrypt contents" is checked.


References