Create Snapshot of Virtual Machine

You can manually create a snapshot of an Azure VM with the specified ID.

Note

When you create a snapshot manually, Veeam Backup for Microsoft Azure detects if there is a snapshot chain for the processed Azure VM. If the snapshot chain exists, Veeam Backup for Microsoft Azure continues the existing chain. Otherwise, the created snapshot starts a new snapshot chain for the processed Azure VM.

Request

To create a snapshot of a specific Azure VM, send the HTTP POST request to the //virtualMachines/takeSnapshot endpoint.

HTTP Request

POST https://<hostname>/api/v2/virtualMachines/takeSnapshot

Request Headers

The request contains the following headers.

Header

Required

Value

Description

Authorization

Required

Bearer <Access-Token>

Authenticates a client who sends the request to the server. Must contain the access token for the current logon session in the Bearer <Access-Token> format.

Request Body

To create the snapshot, send the following parameters in the request body.

Parameter

Type

Description

azureAccountId

string

Specifies an Azure account whose permissions Veeam Backup for Microsoft Azure will use to create a cloud-native snapshot.

virtualMachines

array[string]

The list of Azure VM for whose snapshot Veeam Backup for Microsoft Azure must create.

additionalTags

array[string]

[Applies when you want to assign custom tags] Specifies a tag key (key parameter) and value for each custom tag (value parameter).

copyOriginalTags

boolean

Defines whether to assign tags of virtual disks attached to processed Azure VMs. The default value is true.

Set the parameter values in the following format:

{

 "azureAccountId": "string",

 "snapshotSettings": {

   "additionalTags": [

     {

       "name": "string",

       "value": "string"

     }

   ],

   "copyOriginalTags": true

 },

 "backupItems": {

   "virtualMachines": [

     {

       "id": "string"

     }

   ]

 }

}

Response

The server returns the following response to the client.

Response Codes

A successfully completed operation returns a response code 200 (OK).

Response Headers

The response to this request contains the following headers. The response may also include additional standard HTTP headers.

Header

Value

Description

Content-length

integer

Identifies the length of the response body message, in bytes.

Content-type

  • application/json
  • application/problem+json

Identifies the media type of the response body message.

Response Body

In the response body, Veeam Backup for Microsoft Azure returns the session ID of the snapshot removal operation. For the session log details, see Get Session Log Details.

Create Snapshot of Virtual MachineExample

The following request creates a cloud-native snapshot in the original location of an Azure VM with the ID 1, and assigns to the created snapshot tags of virtual disks attached to the processed Azure VM.

Request:

POST https://51.11.247.127/api/v2/virtualMachines/takeSnapshot

 

Request Header:

Authorization: Bearer <Access-Token>

Content-Type: application/json

 

Request Body:

{

 "azureAccountId": "1",

 "snapshotSettings": {

   "additionalTags": [

     {

       "name": "tag",

       "value": "create"

     }

   ],

   "copyOriginalTags": true

 },

 "backupItems": {

   "virtualMachines": [

     {

       "id": "b45yr8nr5zj684pdjoejkmadcrezdjp8esz63tc6iqd9eq6rfcby"

     }

   ]

 }

}

 

Response:

200

 

Response Body:

{

 "offset": 0,

 "limit": -1,

 "totalCount": 1,

 "results": [

   {

     "id": "d6b218ed-5759-4bef-b4c8-8267466a5d20",

     "type": "ManualSnapshot",

     "status": "Pending",

     "usn": 0,

     "_links": {

       "self": {

         "href": "https://51.11.247.127/api/v2/jobSessions/d6b218ed-5759-4bef-b4c8-8267466a5d20"

       },

       "log": {

         "href": "https://51.11.247.127/api/v2/jobSessions/d6b218ed-5759-4bef-b4c8-8267466a5d20/log"

       }

     },

     "_embeddedResources": {}

   }

 ],

 "_links": {}

}

I want to report a typo

There is a misspelling right here:

 

I want to let the Veeam Documentation Team know about that.