Create a uefi vm via powershell or api | Nutanix Community
Skip to main content

Is there a way to make a UEFI based vm via comandlets or the API?  This posting seems to leave those two out.  https://next.nutanix.com/prism-infrastructure-management-26/uefi-on-vms-faq-37339

Hey there @MrMike , surely there is way to achieve that via REST APIs too.

Here is how you can do that using v2 REST APIs https://www.nutanix.dev/reference/prism_element/v2/api/vms/post-vms-createvm/ 

and making a POST call to create a VM which has property “uefi_boot : true” set for the boot object.

"boot": { "uefi_boot": "true"}

More details on using REST APIs can be found here:https://www.nutanix.dev/api-reference/

Let me know if you need anything else.:smile:


Hey @MrMike , just following up, did you try the above and were you able to create UEFI VM?

Let me know if you need anything else or any clarifications on this.


@AnishWalia20 thanks for the quick reply. I have't had a chance to try it via the API yet because I am mostly working with powershell so I will need to wrap the request via an invoke-restmethod cmdlet.  Since it is defined I see no reason why it shouldn’t work thouth.  Thanks again for the pointer.  I tried ctrl+f finding uefi on the  api reference page but I guess I did not have everything expanded so I missed it.


Ahh, no worries @MrMike . I hope things are much clearer now. Let me know if you need help with anything else. 

 

Cheers!:smile:


Hey there @MrMike , surely there is way to achieve that via REST APIs too.

Here is how you can do that using v2 REST APIs https://www.nutanix.dev/reference/prism_element/v2/api/vms/post-vms-createvm/ 

and making a POST call to create a VM which has property “uefi_boot : true” set for the boot object.

 "boot": { "uefi_boot": "true"}

More details on using REST APIs can be found here:https://www.nutanix.dev/api-reference/

Let me know if you need anything else.:smile:

So are you saying that there is no way to do this with the powershell cmdlets? I just need a yes or no answer so I can move on to having to use the rest API for some of these functions.

 

Another question I'd like to answer to but I doubt I will get, has Nutanix abandoned making additional features and improvements to the powershell cmdlets? It certainly seems that way.