This section includes the following topics:
- Input Parameters
- Output Parameters
Input Parameters
The following table provides the parameters and descriptions.
Parameter | Description |
hostId | Numeric id of the host obtained either while registering or while getting list of hosts. If the provided host id is invalid (missing), error code ErrorCode.HostNotInCatalog is returned. |
sessionId | String. Containing a GUID, obtained via a call to API Hyper-V Create Host Browsing Session. |
firmwareType | String. Either Uefi or Bios. |
revisions | Array of integers representing the revisions that the user wants to restore, obtained either via Get volumes, or via Get volume revisions API calls. |
Example
{
"sessionId": "5d05495f-39e5-4e4e-ad0c-e351cc2c78f3",
"hostId": 2,
"firmwareType": "Uefi",
"revisions": [
102, 103]
}
Output Parameters
None when successful, validation errors otherwise:
If the provided hostId integer from Input section does not point to a valid Hyper-V server (the correct ids can be obtained via get list of hosts), error message: "ErrorCode.HostNotInCatalog"
If revisions array does not contain a boot volume revision, error message: "Restoring as Virtual Machine is not allowed without selecting a boot volume"
If the Get host capabilities API has returned SupportsVmGenerations = false and SupportsVhdxFormat = false and OS version is Windows 2008 R2 (Equal to Windows version 10.0, build >= 10240, error: "Restoring to a Windows Server 2008 R2 host is not supported on VMs running Windows 10 or Windows Server 2016 with the latest updates installed."
if Boot volume is greater than 2 TB and SupportsVmGenerations = false and SupportsVhdxFormat = true, error message: "Windows Server 2012 does not support boot volumes over 2TB in size. Please select another destination host to continue."
If Uefi revisions selected,
- If SupportsVmGenerations = false and
- SupportsVhdxFormat = false, error message: ""Cannot restore an EFI boot volume to Hyper-V 2008, 2008 R2, or 2012."
- SupportsVhdxFormat = true, error message: ""EFI boot volumes cannot be restored to Hyper-V 2008, 2008 R2, or 2012 hosts.""
If Bios boot volume revisions have been selected and the volumes are larger than 2 TB, and SupportsVhdxFormat = false, error message: "Due to a limitation of the VHD file type, volumes greater than 2040 GB can only be restored on 2012/R2 host."
If restore firmware type is Uefi and SupportsVmGenerations = false, error message: "When restoring to a 2008 R2 or 2012 server you cannot select UEFI firmware."
If SupportsVmGenerations = true, but the user has chosen VHD as diskFormat, error message: "UEFI-based systems can only be restored as VHDX files to ensure they are bootable on Windows Server 2012 R2 or above."
Example POST
POST /v2/accounts/test_acc/computers/0000/restore/diskimage/standard/vm/validate/host/capabilities
Input Parameters
{
"sessionId": "5d05495f-39e5-4e4e-ad0c- e351cc2c78f3",
"hostId": 2,
"firmwareType": "Uefi",
"revisions": [
102,
103
]
}
Output Parameters
Response status: 204 No content (for online operation).