Question

Set host affinity through v3 API

  • 25 February 2021
  • 1 reply
  • 31 views

Hi

I was wondering if it’s possible to set a VM’s host affinity to a specific node(s) using Nutanix v3 API.

I tried using the PUT /vms/{uuid} request and add this to the body:

"affinity":{
"host_uuids":["5357289c-d454-4918-accc-e59c623a509d"]
}

 

But it doesn't work no matter where I place the affinity element inside the json, I always get this message: "Additional properties are not allowed (u'affinity' was unexpected)".

Any way I can make this work? I know it’s possible through CLI or UI, but I need the API.

 

Thanks


1 reply

Userlevel 6
Badge +5

Hey @Matan let me research on this and get back.

Reply