NGT with APIv2 AHV not supported | Nutanix Community
Skip to main content
Solved

NGT with APIv2 AHV not supported

  • December 7, 2020
  • 6 replies
  • 539 views

Hi, I’m trying to create a automated NGT install script for my environment:

 

Code:

curl --insecure --request POST --url https://x.x.x.x:9440/PrismGateway/services/rest/v2.0/vms/ef064f22-7ac8-4221-96dd-4cc6f2433dfb/manage_vm_guest_tools --header 'authorization: Basic xxxxx' --header 'content-type: application/json' --data '{"operation":"MOUNT","override_guest":true,"uuid":"ef064f22-7ac8-4221-96dd-4cc6f2433dfb"}'

 

Response:

{"message":"Hypervisor ahv not supported","detailed_message":null,"error_code":{"code":1101,"help_url":"http://my.nutanix.com"}}

 

AOS: 5.15.1

Best answer by Aleksander P

Hi, 

 

I resolved this with API v1. Thank you by your support.

 

Enabling NGT:

URL endpoint: https://x.x.x.x:9440/PrismGateway/services/rest/v1/vms/ef064f22-7ac8-4221-96dd-4cc6f2433dfb/guest_tools/

 

Body:
{
  "applications": {"Vss Snapshot": true},
  "enabled": true,
  "vmUuid": "ef064f22-7ac8-4221-96dd-4cc6f2433dfb"
}

 

Mounting NGT:

https://x.x.x.x:9440/PrismGateway/services/rest/v1/vms/ef064f22-7ac8-4221-96dd-4cc6f2433dfb/guest_tools/mount

 

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

6 replies

Alona
Nutanix Employee
Forum|alt.badge.img+5
  • Nutanix Employee
  • 432 replies
  • December 8, 2020

Nutanix Dev states that “This API works only for Esxi.”


Alona
Nutanix Employee
Forum|alt.badge.img+5
  • Nutanix Employee
  • 432 replies
  • December 8, 2020

You would have to use APIv3 but then you might as well use inbuilt PC capability to perform bulk installation Prism Central Guide: Installing NGT on Multiple VMs


  • Author
  • Voyager
  • 2 replies
  • Answer
  • December 10, 2020

Hi, 

 

I resolved this with API v1. Thank you by your support.

 

Enabling NGT:

URL endpoint: https://x.x.x.x:9440/PrismGateway/services/rest/v1/vms/ef064f22-7ac8-4221-96dd-4cc6f2433dfb/guest_tools/

 

Body:
{
  "applications": {"Vss Snapshot": true},
  "enabled": true,
  "vmUuid": "ef064f22-7ac8-4221-96dd-4cc6f2433dfb"
}

 

Mounting NGT:

https://x.x.x.x:9440/PrismGateway/services/rest/v1/vms/ef064f22-7ac8-4221-96dd-4cc6f2433dfb/guest_tools/mount

 


Forum|alt.badge.img+2
  • Trailblazer
  • 17 replies
  • January 26, 2021

@Aleksander P  This worked for me too. I got a clue from this CALM script and then came across your post. Thank you. However, I do not have CALM and the bulk installation suggested by @Alona does not meet my requirement as I am enabling NGT using the API using a cloud-init script during Self-Service VM provisioning.

@Alona I am concerned that these NGT API calls are only available in v1 and not v2. Will NGT management via APIs be deprecated?


Alona
Nutanix Employee
Forum|alt.badge.img+5
  • Nutanix Employee
  • 432 replies
  • January 27, 2021

Hi CyberG,

I find it unlikely that NGT management via API is going to be deprecated soon as bulk upgrade from PC is handled on the background via API calls.

API versions are complementary to each other and not mutually exclusive.


Forum|alt.badge.img+2
  • Trailblazer
  • 17 replies
  • January 27, 2021

Ok @Alona , that’s comforting to know. I was concerned due to the recommendation to migrate from v1 to v2.0 at https://www.nutanix.dev/reference/prism_element/v2/