| Previous | Next |
| VDS_E_PARTITION_LDM | VDS_E_ALIGN_IS_ZERO |
VDS_E_ALIGN_NOT_A_POWER_OF_TWO
VDS volume creation validates alignment independently from stripe size and extent size. IVdsPack2::CreateVolume2 documents an optional alignment byte count and lists this HRESULT when the value is not a power of two. Values such as 192 KiB or arbitrary sector counts can be sector-divisible yet still fail this rule.
Why this state matters
Validate the numeric value before the COM call and preserve units. A common bug is multiplying a user-supplied “KB” value by 1000 instead of 1024, or passing an already-byte-scaled value through a second conversion. Use an integer power-of-two test and separately check any sector-size divisibility required by the target partition method.
Diagnostic focus
- Log the raw alignment value in bytes before VDS receives it.
- Validate
x != 0and(x & (x - 1)) == 0for APIs requiring a power-of-two alignment. - Audit decimal/binary unit conversions and duplicate scaling in configuration code.
- Keep power-of-two validation separate from sector-multiple and first-cylinder rules.
Technical references
IVdsPack2::CreateVolume2 · IVdsCreatePartitionEx::CreatePartitionEx · VDS_DISK_PROP · VDS_PARTITION_PROP · MS-VDS error codes
Looking for a different code? Search another status or error code.