Updated VM restore points MD to point to public documentation (#5)

* added cross region copy documentation

* Added doc file for Cross region Copy API

Add doc file for Cross region Copy API

* folder for cross-region, fixed review comments

* moved doc file to cross-region folder

* incorporated review comments in the doc.

* fixed indentation and other typos

* added additional FQA and know issue.

* updated docs to use the new properties bag

* added ARM templates

* Cross region creation API documentation

* Updated to point to public REST API documentation

* changes hierarchy and fixed other comments

* Updated Api document name and links

* fixed typo

* Added templates

* Renamed markdown files

* update cross region links

* updated vm restore points md to point to publicdoc

Co-authored-by: Dinesh Reddy <dinesh.kethi@microsoft.com>
This commit is contained in:
dikethir 2021-12-15 19:30:26 +05:30 коммит произвёл GitHub
Родитель 51ab2d6952
Коммит f8746ad629
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
10 изменённых файлов: 989 добавлений и 87 удалений

Двоичные данные
API documentation.docx

Двоичный файл не отображается.

Двоичный файл не отображается.

Просмотреть файл

@ -0,0 +1,37 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-08-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"RestorePointCollectionName": {
"type": "string",
"defaultValue": "<RestorePointCollectionName>"
},
"RestorePointName": {
"type": "string",
"defaultValue": "<RestorePointName>"
},
"SourceRestorePointCollectionName": {
"type": "string",
"defaultValue": "<SourceRestorePointCollectionName>"
},
"SourceRestorePointName": {
"type": "string",
"defaultValue": "<SourceRestorePointName>"
}
},
"variables": {
"SourceResourceId": "[resourceId(resourceGroup().name, 'Microsoft.Compute/restorePointCollections/restorePoints', parameters('SourceRestorePointCollectionName'), parameters('SourceRestorePointName'))]"
},
"resources": [
{
"type": "Microsoft.Compute/restorePointCollections/restorePoints",
"name": "[concat(parameters('RestorePointCollectionName'), '/', parameters('RestorePointName'))]",
"apiVersion": "2021-03-01",
"properties": {
"sourceRestorePoint": {
"id": "[variables('SourceResourceId')]"
}
}
}
]
}

Просмотреть файл

@ -0,0 +1,30 @@
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"RestorePointCollectionName": {
"type": "string",
"defaultValue": "<RestorePointCollectionName>"
},
"SourceRestorePointCollectionName": {
"type": "string",
"defaultValue": "<SourceRestorePointCollectionName>"
}
},
"variables": {
"SourceResourceId": "[resourceId(resourceGroup().name, 'Microsoft.Compute/restorePointCollections', parameters('SourceRestorePointCollectionName'))]"
},
"resources": [
{
"type": "Microsoft.Compute/restorePointCollections",
"name": "[concat(parameters('RestorePointCollectionName'))]",
"location": "[resourceGroup().location]",
"apiVersion": "2021-03-01",
"properties": {
"source": {
"id": "[variables('SourceResourceId')]"
}
}
}
]
}

Просмотреть файл

@ -0,0 +1,404 @@
# Cross-Region-VM-Restore-Points
As an extension to VM Restore Points we are providing additional functionality within Azure platform to enable our partners to build BCDR solutions for Azure VMs. One such functionality is:
Ability to copy VM Restore Points from one region to another other region
Scenarios where this API can be helpful:
* Extend multiple copies of backup to different regions
* Extend local backup solutions to support disaster recovery from region failures
**NOTE 1:** For copying a RestorePoint across region, you need to pre-create a RestorePoint in the local region. For details regarding creation of VM Restore Points in the local region refer to the [VM Restore Points documentation](https://github.com/Azure/Virtual-Machine-Restore-Points).
**NOTE 2:** Cross Region Copy of VM Restore Point feature is currently in private preview and is not meant for production workloads. The feature is currently supported via REST APIs only. Other client tool support such as portal, CLI, SDKs, etc. will be coming later
**NOTE 3:** Cross Region Copy of VM Restore Point feature is supported starting with api-version: '2021-03-01'
**NOTE 4:** Cross Region Copy of VM Restore Points is currently supported only in Canary regions (East US EUAP and Central US EUAP)
## Cross-region copy of VM Restore Points
### Create Restore Point Collection in target region
First step in copying an existing VM Restore point from one region to another is to create a RestorePointCollection in the target region by referencing the RestorePointCollection from the source region.
#### URI Request
```
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}&api-version={api-version}
```
#### Request Body
```
{
"name": "name of the copy of restorePointCollection resource",
"location": "location of the copy of the restorePointCollection resource",
"tags": {
"department": "finance"
},
"properties": {
"source": {
"id": "/subscriptions/{subid}/resourceGroups/{resourceGroupName}/providers/microsoft.compute/restorePointCollections/{restorePointCollectionName}"
}
}
}
```
#### Response
The request response will include a status code and set of response headers.
##### Status code
The operation returns a 201 during create and 200 during Update.
##### Response body
```
{
"name": "name of the copied restorePointCollection resource",
"id": "CSM Id of copied restorePointCollection resource",
"type": "Microsoft.Compute/restorePointCollections",
"location": "location of the copied restorePointCollection resource",
"tags": {
"department": "finance"
},
"properties": {
"source": {
"id": "/subscriptions/{subid}/resourceGroups/{resourceGroupName}/providers/microsoft.compute/restorePointCollections/{restorePointCollectionName}",
"location": "location of source RPC"
}
}
}
```
### Create VM Restore Point in Target Region
Next step is to trigger creation of a RestorePoint in the target RestorePointCollection referencing the RestorePoint in the source region that needs to be copied.
#### URI request
```
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{restorePointName}&api-version={api-version}
```
#### Request body
```
{
"name": "name of the restore point resource",
"properties": {
"sourceRestorePoint": {
"id": "/subscriptions/{subid}/resourceGroups/{resourceGroupName}/providers/microsoft.compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{restorePointName}"
}
}
}
```
**NOTE:** Location of the sourceRestorePoint would be inferred from that of the source RestorePointCollection
#### Response
The request response will include a status code and set of response headers.
##### Status Code
This is a long running operation; hence the operation returns a 201 during create. The client is expected to poll for the status using the operation. (Both the Location and Azure-AsyncOperation headers are provided for this purpose.)
During restore point creation, the ProvisioningState would appear as Creating in GET restore point API response. If creation fails, its ProvisioningState will be Failed. ProvisioningState would be set to Succeeded when the data copy across regions is initiated.
**NOTE:** You can track the copy status by calling GET instance View (?$expand=instanceView) on the target VM Restore Point. Please check the "Get VM Restore Points Copy/Replication Status" section below on how to do this. VM Restore Point is considered usable (can be used to restore a VM) only when copy of all the disk restore points are successful.
##### Response body
```
{
"id": "CSM Id of the restore point",
"name": "name of the restore point",
"properties": {
"optionalProperties": "opaque bag of properties to be passed to extension",
"sourceRestorePoint": {
"id": "/subscriptions/{subid}/resourceGroups/{resourceGroupName}/providers/microsoft.compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{restorePointName}"
},
"consistencyMode": "CrashConsistent | FileSystemConsistent | ApplicationConsistent",
"sourceMetadata": {
"vmId": "Unique Guid of the VM from which the restore point was created",
"location": "source VM location",
"hardwareProfile": {
"vmSize": "Standard_A1"
},
"osProfile": {
"computername": "",
"adminUsername": "",
"secrets": [
{
"sourceVault": {
"id": "/subscriptions/<subId>/resourceGroups/<rgName>/providers/Microsoft.KeyVault/vaults/<keyvault-name>"
},
"vaultCertificates": [
{
"certificateUrl": "https://<keyvault-name>.vault.azure.net/secrets/<secret-name>/<secret-version>",
"certificateStore": "certificateStoreName on Windows"
}
]
}
],
"customData": "",
"windowsConfiguration": {
"provisionVMAgent": "true|false",
"winRM": {
"listeners": [
{
"protocol": "http"
},
{
"protocol": "https",
"certificateUrl": ""
}
]
},
"additionalUnattendContent": [
{
"pass": "oobesystem",
"component": "Microsoft-Windows-Shell-Setup",
"settingName": "FirstLogonCommands|AutoLogon",
"content": "<XML unattend content>"
}
],
"enableAutomaticUpdates": "true|false"
},
"linuxConfiguration": {
"disablePasswordAuthentication": "true|false",
"ssh": {
"publicKeys": [
{
"path": "Path-Where-To-Place-Public-Key-On-VM",
"keyData": "PEM-Encoded-public-key-file"
}
]
}
}
},
"storageProfile": {
"osDisk": {
"osType": "Windows|Linux",
"name": "OSDiskName",
"diskSizeGB": "10",
"caching": "ReadWrite",
"managedDisk": {
"id": "CSM Id of the managed disk",
"storageAccountType": "Standard_LRS"
},
"diskRestorePoint": {
"id": "/subscriptions/<subId>/resourceGroups/<rgName>/restorePointCollections/<rpcName>/restorePoints/<rpName>/diskRestorePoints/<diskRestorePointName>"
}
},
"dataDisks": [
{
"lun": "0",
"name": "datadisk0",
"diskSizeGB": "10",
"caching": "ReadWrite",
"managedDisk": {
"id": "CSM Id of the managed disk",
"storageAccountType": "Standard_LRS"
},
"diskRestorePoint": {
"id": "/subscriptions/<subId>/resourceGroups/<rgName>/restorePointCollections/<rpcName>/restorePoints/<rpName>/diskRestorePoints/<diskRestorePointName>"
}
}
]
},
"diagnosticsProfile": {
"bootDiagnostics": {
"enabled": true,
"storageUri": " http://storageaccount.blob.core.windows.net/"
}
}
},
"provisioningState": "Succeeded | Failed | Creating | Deleting",
"provisioningDetails": {
"creationTime": "Creation Time of Restore point in UTC"
}
}
}
```
### Get VM Restore Points Copy/Replication Status
Once copy of VM Restore Points is initiated, you can track the copy status by calling GET instance View (?$expand=instanceView) on the target VM Restore Point.
#### URI Request
```
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{restorePointName}?$expand=instanceView&api-version={api-version}
```
#### Response
```
{
"id": "CSM Id of the restore point",
"name": "name of the restore point",
"properties": {
"optionalProperties": "opaque bag of properties to be passed to extension",
"sourceRestorePoint": {
"id": "/subscriptions/{subid}/resourceGroups/{resourceGroupName}/providers/microsoft.compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{restorePointName}"
},
"consistencyMode": "CrashConsistent | FileSystemConsistent | ApplicationConsistent",
"sourceMetadata": {
"vmId": "Unique Guid of the VM from which the restore point was created",
"location": "source VM location",
"hardwareProfile": {
"vmSize": "Standard_A1"
},
"osProfile": {
"computername": "",
"adminUsername": "",
"secrets": [
{
"sourceVault": {
"id": "/subscriptions/<subId>/resourceGroups/<rgName>/providers/Microsoft.KeyVault/vaults/<keyvault-name>"
},
"vaultCertificates": [
{
"certificateUrl": "https://<keyvault-name>.vault.azure.net/secrets/<secret-name>/<secret-version>",
"certificateStore": "certificateStoreName on Windows"
}
]
}
],
"customData": "",
"windowsConfiguration": {
"provisionVMAgent": "true|false",
"winRM": {
"listeners": [
{
"protocol": "http"
},
{
"protocol": "https",
"certificateUrl": ""
}
]
},
"additionalUnattendContent": [
{
"pass": "oobesystem",
"component": "Microsoft-Windows-Shell-Setup",
"settingName": "FirstLogonCommands|AutoLogon",
"content": "<XML unattend content>"
}
],
"enableAutomaticUpdates": "true|false"
},
"linuxConfiguration": {
"disablePasswordAuthentication": "true|false",
"ssh": {
"publicKeys": [
{
"path": "Path-Where-To-Place-Public-Key-On-VM",
"keyData": "PEM-Encoded-public-key-file"
}
]
}
}
},
"storageProfile": {
"osDisk": {
"osType": "Windows|Linux",
"name": "OSDiskName",
"diskSizeGB": "10",
"caching": "ReadWrite",
"managedDisk": {
"id": "CSM Id of the managed disk",
"storageAccountType": "Standard_LRS"
},
"diskRestorePoint": {
"id": "/subscriptions/<subId>/resourceGroups/<rgName>/restorePointCollections/<rpcName>/restorePoints/<rpName>/diskRestorePoints/<diskRestorePointName>"
}
},
"dataDisks": [
{
"lun": "0",
"name": "datadisk0",
"diskSizeGB": "10",
"caching": "ReadWrite",
"managedDisk": {
"id": "CSM Id of the managed disk",
"storageAccountType": "Standard_LRS"
},
"diskRestorePoint": {
"id": "/subscriptions/<subId>/resourceGroups/<rgName>/restorePointCollections/<rpcName>/restorePoints/<rpName>/diskRestorePoints/<diskRestorePointName>"
}
}
]
},
"diagnosticsProfile": {
"bootDiagnostics": {
"enabled": true,
"storageUri": " http://storageaccount.blob.core.windows.net/"
}
}
},
"provisioningState": "Succeeded | Failed | Creating | Deleting",
"provisioningDetails": {
"creationTime": "Creation Time of Restore point in UTC"
},
"instanceView": {
"statuses": [
{
"code": "ReplicationState/succeeded",
"level": "Info",
"displayStatus": "Replication succeeded"
}
],
"diskRestorePoints": [
{
"id": "<diskRestorePoint Arm Id>",
"replicationStatus": {
"status": {
"code": "ReplicationState/succeeded",
"level": "Info",
"displayStatus": "Replication succeeded"
},
"completionPercent": "<completion percentage of the replication>"
}
}
]
}
}
}
```
## Known issues and limitations
* Cross-region copy functionality is only supported via REST APIs. ARM Template deployment, CLI, SDK, PS will be added later.
* Copy of copy does not work - You cannot copy a restore point that is already copied from another region. For ex. if you have copied a RP1 from East US to West US as RRP1. You cannot copy RRP1 from West US to another region (or back to East US).
* A single Restore Point in the source region can only be copied once to a target region. Meaning you cannot have multiple copies of the same restore point in a single target region.
* Copy of the Restore point of CMK encrypted VM and disks will be encrypted using PMK in the target region. Customer needs to use CMK when restoring the disks and VM from the restore point.
* Target Restore Point only shows the creation time when the target Restore Point was created. To get the creation time of the original restore point, you need to call GET on the original restore point.
* Currently, the replication progress in only updated once every 10mins. Hence for disks that have low churn, there can be scenarios where only the initial (0) and the terminal replication progress (100) can be seen.
* Maximum copy time that is supported is 2 weeks. If there is huge amount data to be copied to the target region, depending on the bandwidth available between the regions, the copy time could be couple of days. If the copy time exceeds 2 weeks, the copy operation will be terminated.
* There are no error details provided when a Disk Restore Point copy fails
* When a disk restore point copy fails, intermediate completion percentage where the copy failed is not shown.
* Restoring of Disk from Restore point does not automatically check if the disk restore points replication is completed. You need to manually check the replication status and start restoring the disk only after the disk restore points is replicated successfully.
* Restore points that are copied to the target region do not have a reference to the source VM. They have reference to the source Restore points. So, If the source Restore point is deleted there is no way to identify the source VM using the target Restore points.
* Out of order copying of Restore Points is not supported. Meaning, if you have 3 restore points - RP1, RP2, RP3. If you have copied RP1 and RP3 to target region, you cannot copy RP2.
* Currently, the restore points and cross region copy charges get billed on an incorrect/non-existent resource. On clicking the resource it shows that it doesn't exist/not found.
## Frequently asked questions (FAQs)
**Question: Can I copy the same RPC and RPs to multiple regions (one-to-many) independently to one another? Can this be done in parallel?**
Answer: Yes
**Question: On the VM Restore Points Copy/Replication Status: How can I get the original RP creation time? Is it provisioningDetails.creationTime?**
Answer: GET on the Restore Point will return the creation time of that Restore Point. To get the creation time of the original Restore Point, you need to call GET on the original Restore Point.
**Question: Can I start work on a specific Disk Restore Point once it is copied to the target region (replicationStatus.Status.Code=succeeded) even if other disk restore points copy has NOT completed yet or failed?**
Answer: Yes. However, Restoring of Disk from Restore point does not automatically check if the disk restore points replication is completed. You need to manually check the replication status and start restoring the disk only after the disk restore points is replicated successfully.
**Question: Does the copy API support Encrypted VMs and disks that use SSE-CMK? What is the behavior in the target region? Will the target VM and disks be encrypted with SSE-CMK?**
Answer: The disk restore points copied to the target region are encrypted using PMK. While restoring disks from these disk restore points you need to provide the CMK for encrypting the restore disk using SSE-CMK.
**Question: Is copy of restore point within the same region supported?**
Answer: No
**Question: Are there any limitation to the number of restore points that can be copied?**
Answer: Each VM can have a maximum of 200 Restore Points. So you can only copy 200 Restore Points from the source Retore Point Collection to a target Restore Point Collection.
**Question: Can I copy multiple restore points from a source to a target region parallelly?**
Answer: No. Copying of another restore point from the same source to the same target is allowed only after the previous copy is complete.
**Question: Can I copy restore points from a source to a target region out-of-order?**
Answer: No
**Question: Can I copy of Restore Points from different source Restore Point Collections to the same Restore Point Collection in the target region?**
Answer: No
**Question: Can I exclude disks while copying restore points from source region to target region?**
Answer: No, you need to exclude disks while creating the local region restore point.
**Question: ProvisioningState of RestorePoint is marked as succeeded, does that mean copy of RestorePoint is completed/successful?**
Answer: No, provisioningState only indicates that copy has been initiated successfully. Poll on ReplicationState via Get instanceView for actual copy status
**Question: When a disk restore point copy fails, can I resume the copy for the particular disk restore point?**
Answer: No, when a disks restore point copy fails, the entire VM restore point copy fails and you cannot resume the copy. You need to restart the copy of the VM restore point.

Двоичный файл не отображается.

Просмотреть файл

@ -0,0 +1,20 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-08-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"RestorePointCollectionName": {
"type": "string",
"defaultValue": "<RestorePointCollectionName>"
},
"RestorePointName": {
"type": "string",
"defaultValue": "<RestorePointName>"
}
},
"resources": [{
"type": "Microsoft.Compute/restorePointCollections/restorePoints",
"name": "[concat(parameters('RestorePointCollectionName'), '/', parameters('RestorePointName') )]",
"apiVersion": "2021-07-01"
}
]
}

Просмотреть файл

@ -0,0 +1,33 @@
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"RestorePointCollectionName": {
"type": "string",
"defaultValue": "<RestorePointCollectionName>"
},
"SourceVMName": {
"type": "string",
"defaultValue": "<SourceVMName>"
},
"RestorePointCollectionLocation": {
"type": "string",
"defaultValue": "<RestorePointCollectionLocation>"
}
},
"variables": {
"SourceId": "[resourceId(resourceGroup().name, 'Microsoft.Compute/virtualMachines', parameters('SourceVMName'))]"
},
"resources": [{
"type": "Microsoft.Compute/restorePointCollections",
"name": "[concat(parameters('RestorePointCollectionName'))]",
"location": "[parameters('RestorePointCollectionLocation')]",
"apiVersion": "2021-07-01",
"properties": {
"source": {
"id": "[variables('SourceId')]"
}
}
}
]
}

Просмотреть файл

@ -0,0 +1,456 @@
## Cross-region creation of VM Restore Points
Ability to create VM Restore Points directly in the target region by referencing a VM in the source region
**Scenario where this API can be helpful:** Implement a disaster recovery solution to protect VMs from region failure.
### Create Restore Point Collection in target region
First step in creating a VM Restore point in a target region referencing a VM from a source region is to create a RestorePointCollection in the target region.
#### URI Request
```
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}?api-version={api-version}
```
**NOTE:** api-version must be 2021-07-01 or later
#### Request Body
```
{
"name": "name of the restorePointCollection resource",
"location": "location of the restorePointCollection resource",
"tags": {
"department": "finance"
},
"properties": {
"source": {
“id”: "/subscriptions/{subid}/resourceGroups/{resourceGroupName}/providers/microsoft.compute/virtualMachines/{vmName}"
}
}
}
```
#### Response
The request response will include a status code and set of response headers.
##### Status code
The operation returns a 201 during create and 200 during Update.
##### Response body
```
{
"name": "name of the restorePointCollection resource",
"id": "CSM Id of restorePointCollection resource",
"type": "Microsoft.Compute/restorePointCollections",
"location": "location of the restorePointCollection resource",
"tags": {
"department": "finance"
},
"properties ": {
"restorePointCollectionId": "Guid Id of RestorePointCollection",
"source": {
"id": "/subscriptions/{subid}/resourceGroups/{resourceGroupName}/providers/microsoft.compute/virtualMachines/{vmName}",
"location": "location of the virtualMachine resource"
}
}
}
```
### Create VM Restore Point in Target Region
Next step is to trigger creation of a RestorePoint in the target RestorePointCollection.
#### URI request
```
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{restorePointName}?api-version={api-version}
```
#### Request body
```
{
"name": "name of the restore point resource",
"properties": {
"excludeDisks": ["List of disks to be excluded in the RestorePoint"]
}
}
```
**NOTE:** Location of the source VM would be inferred from that of the target RestorePointCollection
#### Response
The request response will include a status code and set of response headers.
##### Status Code
This is a long running operation; hence the operation returns a 201 during create. The client is expected to poll for the status using the operation. (Both the Location and Azure-AsyncOperation headers are provided for this purpose.)
During restore point creation, the ProvisioningState would appear as Creating in GET restore point API response. If creation fails, its ProvisioningState will be Failed. ProvisioningState would be set to Succeeded when the data copy across regions is initiated.
**NOTE:** You can track the copy status by calling GET instance View (?$expand=instanceView) on the target VM Restore Point. Please check the "Get VM Restore Points Copy/Replication Status" section below on how to do this. VM Restore Point is considered usable (can be used to restore a VM) only when copy of all the disk restore points are successful.
##### Response Body
###### Intial Response Body
```
{
"id": "CSM Id of the restore point",
"name": "name of the restore point",
"sourceMetadata": {
"vmId": "Unique Guid of the VM from which the restore point was created",
"location": "source VM location",
"hardwareProfile": {
"vmSize": "Standard_A1"
},
"osProfile": {
"computername": "",
"adminUsername": "",
"secrets": [
{
"sourceVault": {
"id": "/subscriptions/<subId>/resourceGroups/<rgName>/providers/Microsoft.KeyVault/vaults/<keyvault-name>"
},
"vaultCertificates": [
{
"certificateUrl": "https://<keyvault-name>.vault.azure.net/secrets/<secret-name>/<secret-version>",
"certificateStore": "certificateStoreName on Windows"
}
]
}
],
"customData": "",
"windowsConfiguration": {
"provisionVMAgent": "true|false",
"winRM": {
"listeners": [
{
"protocol": "http"
},
{
"protocol": "https",
"certificateUrl": ""
}
]
},
"additionalUnattendContent": [
{
"pass": "oobesystem",
"component": "Microsoft-Windows-Shell-Setup",
"settingName": "FirstLogonCommands|AutoLogon",
"content": "<XML unattend content>"
}
],
"enableAutomaticUpdates": "true|false"
},
"linuxConfiguration": {
"disablePasswordAuthentication": "true|false",
"ssh": {
"publicKeys": [
{
"path": "Path-Where-To-Place-Public-Key-On-VM",
"keyData": "PEM-Encoded-public-key-file"
}
]
}
}
},
"storageProfile": {
"osDisk": {
"osType": "Windows|Linux",
"name": "OSDiskName",
"diskSizeGB": "10",
"caching": "ReadWrite",
"managedDisk": {
"id": "CSM Id of the managed disk",
"storageAccountType": "Standard_LRS"
},
},
"dataDisks": [
{
"lun": "0",
"name": "datadisk0",
"diskSizeGB": "10",
"caching": "ReadWrite",
"managedDisk": {
"id": "CSM Id of the managed disk",
"storageAccountType": "Standard_LRS"
},
}
]
},
"diagnosticsProfile": {
"bootDiagnostics": {
"enabled": true,
"storageUri": " http://storageaccount.blob.core.windows.net/"
}
}
},
"optionalProperties": "opaque bag of properties to be passed to extension",
"consistencyMode": "CrashConsistent | FileSystemConsistent | ApplicationConsistent",
"provisioningState": "Succeeded | Failed | Creating | Deleting",
"provisioningDetails": {
"creationTime": "Creation Time of Restore point in UTC",
"totalUsedSizeInBytes": "25",
"statusCode": "status code reported by the extension",
"statusMessage": "status message reported by the extension"
}
}
```
###### Final Response Body
```
{
"id": "CSM Id of the restore point",
"name": "name of the restore point",
"sourceMetadata": {
"vmId": "Unique Guid of the VM from which the restore point was created",
"location": "source VM location",
"hardwareProfile": {
"vmSize": "Standard_A1"
},
"osProfile": {
"computername": "",
"adminUsername": "",
"secrets": [
{
"sourceVault": {
"id": "/subscriptions/<subId>/resourceGroups/<rgName>/providers/Microsoft.KeyVault/vaults/<keyvault-name>"
},
"vaultCertificates": [
{
"certificateUrl": "https://<keyvault-name>.vault.azure.net/secrets/<secret-name>/<secret-version>",
"certificateStore": "certificateStoreName on Windows"
}
]
}
],
"customData": "",
"windowsConfiguration": {
"provisionVMAgent": "true|false",
"winRM": {
"listeners": [
{
"protocol": "http"
},
{
"protocol": "https",
"certificateUrl": ""
}
]
},
"additionalUnattendContent": [
{
"pass": "oobesystem",
"component": "Microsoft-Windows-Shell-Setup",
"settingName": "FirstLogonCommands|AutoLogon",
"content": "<XML unattend content>"
}
],
"enableAutomaticUpdates": "true|false"
},
"linuxConfiguration": {
"disablePasswordAuthentication": "true|false",
"ssh": {
"publicKeys": [
{
"path": "Path-Where-To-Place-Public-Key-On-VM",
"keyData": "PEM-Encoded-public-key-file"
}
]
}
}
},
"storageProfile": {
"osDisk": {
"osType": "Windows|Linux",
"name": "OSDiskName",
"diskSizeGB": "10",
"caching": "ReadWrite",
"managedDisk": {
"id": "CSM Id of the managed disk",
"storageAccountType": "Standard_LRS"
},
"diskRestorePoint": {
"id": "/subscriptions/<subId>/resourceGroups/<rgName>/restorePointCollections/<rpcName>/restorePoints/<rpName>/diskRestorePoints/<diskRestorePointName>"
}
},
"dataDisks": [
{
"lun": "0",
"name": "datadisk0",
"diskSizeGB": "10",
"caching": "ReadWrite",
"managedDisk": {
"id": "CSM Id of the managed disk",
"storageAccountType": "Standard_LRS"
},
"diskRestorePoint": {
"id": "/subscriptions/<subId>/resourceGroups/<rgName>/restorePointCollections/<rpcName>/restorePoints/<rpName>/diskRestorePoints/<diskRestorePointName>"
}
}
]
},
"diagnosticsProfile": {
"bootDiagnostics": {
"enabled": true,
"storageUri": " http://storageaccount.blob.core.windows.net/"
}
}
},
"optionalProperties": "opaque bag of properties to be passed to extension",
"consistencyMode": "CrashConsistent | FileSystemConsistent | ApplicationConsistent",
"provisioningState": "Succeeded | Failed | Creating | Deleting",
"provisioningDetails": {
"creationTime": "Creation Time of Restore point in UTC",
"totalUsedSizeInBytes": "25",
"statusCode": "status code reported by the extension",
"statusMessage": "status message reported by the extension"
}
}
```
### Get VM Restore Points With Copy/Replication Status
Once creation of VM Restore Points is initiated, you can track the data copy status by calling GET instance View (?$expand=instanceView) on the VM Restore Point.
#### URI Request
```
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{restorePointName}?$expand=instanceView&api-version={api-version}
```
#### Response
```
{
"id": "CSM Id of the restore point",
"name": "name of the restore point",
"properties": {
"sourceMetadata": {
"vmId": "Unique Guid of the VM from which the restore point was created",
"location": "source VM location",
"hardwareProfile": {
"vmSize": "Standard_A1"
},
"osProfile": {
"computername": "",
"adminUsername": "",
"secrets": [
{
"sourceVault": {
"id": "/subscriptions/<subId>/resourceGroups/<rgName>/providers/Microsoft.KeyVault/vaults/<keyvault-name>"
},
"vaultCertificates": [
{
"certificateUrl": "https://<keyvault-name>.vault.azure.net/secrets/<secret-name>/<secret-version>",
"certificateStore": "certificateStoreName on Windows"
}
]
}
],
"customData": "",
"windowsConfiguration": {
"provisionVMAgent": "true|false",
"winRM": {
"listeners": [
{
"protocol": "http"
},
{
"protocol": "https",
"certificateUrl": ""
}
]
},
"additionalUnattendContent": [
{
"pass": "oobesystem",
"component": "Microsoft-Windows-Shell-Setup",
"settingName": "FirstLogonCommands|AutoLogon",
"content": "<XML unattend content>"
}
],
"enableAutomaticUpdates": "true|false"
},
"linuxConfiguration": {
"disablePasswordAuthentication": "true|false",
"ssh": {
"publicKeys": [
{
"path": "Path-Where-To-Place-Public-Key-On-VM",
"keyData": "PEM-Encoded-public-key-file"
}
]
}
}
},
"storageProfile": {
"osDisk": {
"osType": "Windows|Linux",
"name": "OSDiskName",
"diskSizeGB": "10",
"caching": "ReadWrite",
"managedDisk": {
"id": "CSM Id of the managed disk",
"storageAccountType": "Standard_LRS"
},
"diskRestorePoint": {
"id": "/subscriptions/<subId>/resourceGroups/<rgName>/restorePointCollections/<rpcName>/restorePoints/<rpName>/diskRestorePoints/<diskRestorePointName>"
}
},
"dataDisks": [
{
"lun": "0",
"name": "datadisk0",
"diskSizeGB": "10",
"caching": "ReadWrite",
"managedDisk": {
"id": "CSM Id of the managed disk",
"storageAccountType": "Standard_LRS"
},
"diskRestorePoint": {
"id": "/subscriptions/<subId>/resourceGroups/<rgName>/restorePointCollections/<rpcName>/restorePoints/<rpName>/diskRestorePoints/<diskRestorePointName>"
}
}
]
},
"diagnosticsProfile": {
"bootDiagnostics": {
"enabled": true,
"storageUri": " http://storageaccount.blob.core.windows.net/"
}
}
},
"optionalProperties": "opaque bag of properties to be passed to extension",
"consistencyMode": "CrashConsistent | FileSystemConsistent | ApplicationConsistent",
"provisioningState": "Succeeded | Failed | Creating | Deleting",
"provisioningDetails": {
"creationTime": "Creation Time of Restore point in UTC",
"totalUsedSizeInBytes": "25",
"statusCode": "status code reported by the extension",
"statusMessage": "status message reported by the extension"
},
"instanceView": {
"statuses": [
{
"code": "ReplicationState/succeeded",
"level": "Info",
"displayStatus": "Replication succeeded"
}
],
"diskRestorePoints": [
{
"id": "<diskRestorePoint Arm Id>",
"replicationStatus": {
"status": {
"code": "ReplicationState/succeeded",
"level": "Info",
"displayStatus": "Replication succeeded"
},
"completionPercent": "<completion percentage of the replication>"
}
}
]
}
}
}
```
## Known issues and limitations
* Cross-region creation functionality is only supported via REST APIs and template deployment. CLI, SDK, PS will be added later.
* Concurrent creation of Restore Points for a VM in the same or different regions is not supported
* Error messages may not reflect the actual error that has occurred. We are working on improving the error messages to make them more intuitive.
* Restore point of CMK encrypted VM and disks will be encrypted using PMK in the target region. Customer needs to use CMK when restoring the disks and VM from the restore point.
* Currently, the replication progress in only updated once every 10mins. Hence for disks that have low churn, there can be scenarios where only the initial (0) and the terminal replication progress (100) can be seen.
* If there is huge amount data to be copied to the target region, depending on the bandwidth available between the regions, copy time could be couple of days. If time taken to copy the data exceeds 2 weeks, the restore points replication will be terminated and the Restore Point will not be usable.
* Restore points that are copied to the target region do not have a reference to the source VM. The source VM reference is available in the Restore Point Collection
* Billing of Restore Point Collection may not be accurate. You will see 2 seperate billing entries for a single Restore Point Collection (one entry in the source region and another in the target region).
* Other known issues and limitations of cross region copy of restore points may apply here as well

Просмотреть файл

@ -1,108 +1,30 @@
# What is a VM Restore Point?
A VM Restore Point stores the VM configuration and point-in-time crash (if the VM is shutdown) or application consistent snapshot for all managed disks attached to a Virtual Machine. VMRestorePointCollection is the ARM resource which contains the restore points specific to a VM and each Restore Point contains disk restore points for each included disk. The resource hierarchy hence looks like this-
VM Restore Points Collection
VM Restore Points (application or crash consistent across disks at a point in time)
VM Restore Points (application consistent across disks at a point in time)
Disk Restore Points (one for each disk included in the VM restore point)
You can create a VM using the VM Restore Point or create individual disks from the Disk Restore Point object. VM Restore Points are incremental where the first Restore Point stores a full copy of all the disk attached to the VM. For each successive restore point for a VM, only the incremental changes to your disks are backed up. To further reduce your costs, you can optionally exclude any disk when creating a restore point for your VM.
## Cross Region VM Restore Points
## Get started
VM restore points are available in all public regions. Please review the [VM restore points documentation]() to learn how to:
* Create VM restore points to protect the VM from data loss and data corruption
* Exclude disks that you do not want to protect as part of VM restore points to optimize costs
* Restore a VM and all disks from a VM restore point
## Cross Region VM Restore Points (Preview)
As an extension to VM Restore Points we are providing additional functionality within Azure platform to enable our partners to build BCDR solutions for Azure VMs. Additional functionalities include:
**1. Ability to copy VM Restore Points from one region to another other region**
Scenarios where this API can be helpful:
* Extend multiple copies of backup to different regions
* Extend local backup solutions to support disaster recovery from region failures
For copying VM Restore Points across regions please refer to the [Cross Region Copy of VM Restore Points documentation](https://github.com/Azure/Virtual-Machine-Restore-Points/blob/main/Cross%20Region%20VM%20Restore%20Points/Cross%20Region%20Copy%20of%20Restore%20Points/README.md).
**2. Ability to create VM Restore Points directly in the target region by referencing a VM in the source region**
Scenario where this API can be helpful:
* Implement a disaster recovery solution to protect VMs from region failure.
For creating VM Restore Points across regions please refer to the [Cross Region Creation of VM Restore Points documentation](https://github.com/Azure/Virtual-Machine-Restore-Points/blob/main/Cross%20Region%20VM%20Restore%20Points/Cross%20Region%20Creation%20of%20Restore%20Points/README.md).
## Note
The VM Restore Point feature is currently in private preview and is not meant for production workloads. The feature is currently supported via ARM templates and REST APIs only. Other client tool support such as portal, CLI, SDKs, etc. will be coming later.
## Restrictions
1. Only works with Managed disks.
2. Ultra disks, Ephemeral OS Disks and Shared Disks are not supported.
3. Requires API version >= 2021-03-01
4. Required AFECs: "Microsoft.Compute/RestorePointExcludeDisks", "Microsoft.Compute/IncrementalRestorePoints"
## Creating a VM Restore Point
1. First Step is to create a RestorePointCollection. You can refer to the following API documentation on [how to create a RestorePointCollection](https://docs.microsoft.com/en-us/rest/api/compute/restore-point-collections/create-or-update#create-or-update-a-restore-point-collection.).
2. Next, you can create a restore point using the RestorePointCollection. You can refer to the following API documentation on [how to create a RestorePoint](https://docs.microsoft.com/en-us/rest/api/compute/restore-points/create#create-a-restore-point).
* You can also create a restore point and exclude one or more attached disks.
## RestorePointCollection Resource
Use the following URI for GET and DELETE operation on the Restore Point Collection resource. The URI has all the required parameters and there is no need for an additional request body.
https://management.azure.com/subscriptions/{SubscriptionID}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{RestorePointCollectionName}?$expand=restorePoints&api-version=2021-03-01
You can use PATCH/PUT request to update tags on a Restore Point Collection. No other properties (e.g. location, source VM) can be updated.
## RestorePoint Resource
Use the following URI for GET and DELETE operation on the Restore Point resource. The URI has all the required parameters and there is no need for an additional request body.
https://management.azure.com/subscriptions/{SubscriptionID}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{RestorePointCollectionName}/RestorePoints/{RestorePointName}?api-version=2021-03-01
For update of an existing Restore Point Collection resource, only update of tags is permitted.
## Create Disk
1. Get the Disk Restore ID by either using GET call on Restore Point Collection and expanding Restore Points or by doing a call on Restore Point(s).
2. You can use the below Rest API call to create a disk using diskRestorePoint. [API documentation.](https://docs.microsoft.com/en-us/rest/api/compute/disks/createorupdate)
PUT https://management.azure.com/subscriptions/49151e6d-fa6e-4985-ae85-00548ec78853/resourceGroups/dfgdf_group/providers/Microsoft.Compute/disks/restore_disk1?api-version=2020-12-01
Request Body:
{
"location": "East US",
"properties": {
"creationData": {
"createOption": "Restore",
"sourceResourceId": "/subscriptions/{SubscriptionID}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{RestorePointCollectionName}/restorePoints/{RestorePointName}/diskRestorePoints/{DiskRestorePointName}"
}
}
}
## SAS using Disk Restore Points
We are providing a BeginGetAccess API through which the user can directly pass the ID of the diskRestorePoint to create a SAS to the underlying disk.
* If there is no active SAS on the incremental snapshot of the restore point, then a new SAS will be created and Url returned to the user.
* If there is already an active SAS, the SAS will be extended and original SASUrl will be returned.
POST
https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/restorepointcollections/{restorePointCollection}/restorepoints/{vmRestorePoint}/diskRestorePoints/{diskRestorePointName}/BeginGetAccess
POST request body
{
"access" :"Read"
"durationInSeconds": "3600"
}
Response codes
202 Accepted. This operation is performed asynchronously. After receiving a 202 HTTP response, the client is expected to poll for the status of the asynchronous part of the operation using the URL returned in the Azure-AsyncOperationheader. Azure will show operation status as complete (succeeded) only afterthe operation iscomplete.
There is also a EndGetAccess API in which the user can directly pass the ID of the diskRestorePoint to revoke SAS.
POST
https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/restorepointcollections/{restorePointCollection}/restorepoints/{vmRestorePoint}/diskRestorePoints/{diskRestorePointName}/EndGetAccess
Response codes
202 Accepted. This operation is performed asynchronously. After receiving a 202 HTTP response, the client is expected to poll for the status of the asynchronous part of the operation using the URL returned in the Azure-AsyncOperationheader.Azure will show operation status as complete (succeeded) only afterthe operation iscomplete.
NOTE: Currently cross region VM restore points functionality is in private preview. If you are intersted in testing these capabilities please reach out to your Microsoft account executive.