API

Welcome to the Nutanix NEXT community. To get started please read our short welcome post. Thanks!

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting VM's console URL

Wayfarer

Getting VM's console URL

Hi! 

 

My company has it's own home-growned self-service portal, recently I connected AHV/Prism to it with Prism v2 API, so my end-users are able to request and manage AHV machines trough this portal. I would like to give them URL link to VM's console (just in case if they can not connect to VM through network, for debug, etc). I was surprised that API doesn't have anything about VM's console access at all. In Prism every powered On VM has this "button"  - is any way to obtain URL it generates? image.png

 

 

4 REPLIES
Nutanix Employee

Re: Getting VM's console URL

The URL format could be determined by inspecting Prism with some guess and check, but there isn't an API mechanism for obtaining this information because we don't (yet) offer a console SDK. Please reach out to your Nutanix account team and ask them to connect you with myself and @tarak with reference to this API thread. We can discuss options with you.

Highlighted
Wayfarer

Re: Getting VM's console URL

Well, it is not a big deal to get URL under this console button, it looks like 

https://PRISM:9440/console/lib/noVNC/vnc_auto.html?path=vnc/vm/VM_UUID/proxy&title=VM_NAME&uhura=true&attached=false&useV3=false

So I can easyly construct it (cause I can get VM_UUID/VM_NAME through API)... But if I just copy-paste this link I get "Error fetching VM details" in any browser. If you know how to properly construct URL - I'll be glad to hear. I just don't want to give end-users access to Prism (who knows what they can break in it Smiley Happy  

Nutanix Employee

Re: Getting VM's console URL

Yup, the requirement you have makes total sense. The URL you copied has the expectation that the user is authorized to access Prism (and has an active session). To layer console access on top of Prism access, you'll need to proxy the console. Get an email thread going with us and we can figure out a solution for you.

Wayfarer

Re: Getting VM's console URL

Thank you, I'll be waiting your solution for this case.