Solved

/protection_domains/{name}/snapshots/{snapshot_id}/clone ignores prefix parameters

  • 31 July 2020
  • 3 replies
  • 750 views

Hi all

I use the v2 Prism Elements API to clone a VM from a Protection Domain Snapshot.
It seems to work and the VM is created (cloned) correctly.
However: The new VM always has the Prefix “Nutanix-Clone-”.

The values i pass via vg_name_prefix and vm_name_prefix are simply ignored.

 

In the Web UI (using the v1 API internally) it works fine.

Please see the attached screenshots of the Web UI and the API call.

 

Thanks in advance!

icon

Best answer by Paul Ilavarasu 31 July 2020, 11:25

View original

This topic has been closed for comments

3 replies

Userlevel 5
Badge +4

What is your AOS version ?

This is not recommended to use at production and This is mostly for test_workflows used by commvault.

Right API you should use is

POST /protection_domains/{name}/restore_entities

Hi Paul

Thanks for your response.

Version is 5.17.1.

 

I tried POST /protection_domains/{name}/restore_entities and the prefix is applied, so it works now thanks!

Just from the name it sounded more like “clone” is the right one.

Checking the Web UI again i just realized that is also calls the v1 “restore_entities” and not clone.

 

Thanks again!

 

 

A follow up question:

As respose I receive a task_uuid. When I call GET /tasks/{uuid} I just receive an entity_id for a “RecoveryPoint” (see below).

How can i get the UUID of the newly created VM from that (without searching for it by name)?

 

{  "uuid": "c8e1e267-cf66-4250-ae05-c4eb76c85eca",  "meta_request": {    "method_name": "RestoreFromSnapshot"  },  "meta_response": {    "error_code": 0  },  "create_time_usecs": 1596196333620218,  "start_time_usecs": 1596196333917974,  "complete_time_usecs": 1596196335124538,  "last_updated_time_usecs": 1596196335124538,  "entity_list": [    {      "entity_id": "a77472b0-ddce-4b2f-8114-785e44d73e2c",      "entity_type": "RecoveryPoint",      "entity_name": null    }  ],  "operation_type": "RestoreFromSnapshot",  "message": "Restore from Snapshot",  "percentage_complete": 100,  "progress_status": "Succeeded",  "display_name": "Restore from Snapshot",  "cluster_uuid": "0005a7b9-f2ee-0318-3931-ac1f6bcd6346"}