"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"?
| Cause | Typical Scenario |
|---|---|
| Drive is write-protected | Attempting to format or initialize a write-protected SSD, USB, or SD card |
| Virtual Disk Service not running | The Windows service that manages disk operations is stopped |
| VHD stored on incompatible file system | VHD file on exFAT or FAT32 — cannot be attached (requires NTFS) |
| Compressed or encrypted NTFS file | VHD with NTFS compression or EFS encryption cannot be attached |
| Driver conflict | Third-party disk drivers (e.g., AppleHFS.sys on Boot Camp) conflict with VDS |
| Physical disk damage | Bad sectors prevent write operations from completing |
| NTFS file system corruption | Corrupted 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:
- Restart the PC and retry the disk operation
- For external drives: disconnect and reconnect the USB or SATA cable
- Try a different USB port or cable
- 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:
- Press Win + R → type
services.msc→ press Enter - Find Virtual Disk in the list
- If the Status column is blank (stopped): right-click → Start
- Set Startup type to Automatic
- Click Apply → OK
- 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):
- Open Command Prompt as Administrator (search
cmd, right-click → Run as administrator) - Type
diskpart→ press Enter - Type
list disk→ note the disk number of the problem drive - Type
select disk X(replace X with the disk number) - Type
attributes disk clear readonly→ press Enter - Type
exit - 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.
- Copy the .vhd or .vhdx file to an NTFS-formatted drive (typically your C: drive)
- 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:
- Right-click the VHD file → Properties → Advanced
- Ensure neither Compress contents nor Encrypt contents is checked
- 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.
- Open Device Manager (Win + X → Device Manager)
- Expand Disk drives → right-click the affected disk → Update driver
- Select Search automatically for drivers
- 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:
- Open File Explorer → search for
applehfs.sysin the Windows directory - If found, rename it to
applehfs-old.sys - 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:
- MiniTool Partition Wizard — free version handles most initialization and format operations
- EaseUS Partition Master — includes disk surface scan and error detection
| Fix | Best For | Data Impact |
|---|---|---|
| Restart PC / check connections | External drive loose connection | None |
| Restart Virtual Disk Service | VDS stopped or hung | None |
| Remove write protection (DiskPart) | Read-only protected drives | None |
| Move VHD to NTFS drive | VHD on exFAT/FAT32 | None |
| Update/reinstall drivers | Driver conflict | None |
| DiskPart format | When GUI fails | Erases disk |
| Third-party tool | All other scenarios | Depends |
🗣️ 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.
