| Previous | Next |
| VDS_E_VD_DISK_IS_MERGING | VDS_E_VD_DISK_ALREADY_OPEN |
VDS_E_VD_IS_ATTACHED
Attachment makes a virtual disk appear to Windows as a disk device. This HRESULT marks an operation whose preconditions require that device exposure to be removed first. Merge and expand are explicitly documented as detached-only operations in the VDS virtual-disk API, so an attached VHD is not merely busy; it is in the wrong topology state for those methods.
Why this state matters
Detaching is a separate state transition. VDS moves through VDS_VST_DETACH_PENDING until the operating-system disk object is removed. A caller should not assume that starting detach instantly satisfies the detached precondition. Wait for the transition and then reopen the virtual disk as required for the next operation.
Diagnostic focus
- Identify the exact rejected method and verify whether its documentation requires a detached virtual disk.
- If detach is appropriate, wait until the VDS state leaves ATTACHED/DETACH_PENDING and the disk device is removed.
- Coordinate with applications and volumes using the surfaced disk before detaching it; do not force a topology change solely to clear the HRESULT.
- Reopen the virtual disk with the access rights required by merge or expand after the detached state is confirmed.
Technical references
IVdsOpenVDisk::Attach · IVdsOpenVDisk::Detach · IVdsOpenVDisk::Expand · IVdsOpenVDisk::Merge · MS-VDS virtual disk state transitions
Looking for a different code? Search another status or error code.
