Getting VM's console URL


Badge +1
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?




5 replies

Badge +5
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.
Badge +1
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 🙂
Badge +5
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.
Badge +1
Thank you, I'll be waiting your solution for this case.
Userlevel 7
Badge +35
Were you able to find anything @ckousoulis ? Consider sharing here for other to also learn from - Thanks

Reply