The path needs to be created and authenticated beforehand, using the Validate path API (in the case that the path does not exist, or it's on a network share that requires auth).
This section includes the following topics:
- Input Parameters
- Output Parameters
Input Parameters
The following table provides the parameters and descriptions.
Parameter | Description |
diskFormat | String. Vhd or Vhdx allowed. |
diskLocation path | String disk path location. |
diskLocation credentials | Optional, in case the path is a network share that requires auth. userName - optional parameter to use for shares requiring auth. password - optional parameter to use for shares requiring auth. |
Example
{
"diskFormat": "Vhdx",
"diskLocation": {
"path": "\\\\server1\\share1\\folder1",
"credentials": {
"userName": "user1",
"password": "passwordtext"
}
}
}
Output Parameters
None when successful, validation errors otherwise, for checking the diskLocation.path parameter.
If VHD format, 4k drives cannot be used as virtual disk location (they are only supported for VHDX), error message: "When restoring as VHD type, you cannot set the disk path on a 4k drive: {inputDiskPath}"
Sparse file system not supported for diff disks, error message: "You cannot set the differencing disk path on a sparse file system: {inputDiskPath}"
FAT, FAT32 or exFAT file system for location not supported, error message: "You cannot set the differencing disk path on a FAT, FAT32 or exFAT drive: {inputDiskPath}"
Example POST
POST /v2/accounts/test_acc/computers/0000/restore/diskimage/standard/vm/validate/network
Input Parameters
{
"diskFormat": "Vhdx",
"diskLocation": {
"path": "\\\\server1\\share1\\folder1",
"credentials": {
"userName": "user1",
"password": "passwordtext"
}
}
}
Output Parameters
Response status: 204 No content (for online operation).