VMware Cloud Community
ColinISYS
Contributor
Contributor
Jump to solution

Generate Remote Console URLs for large number of VMs

I have the situation where there are nearly 500 VMs in a Virtual Center. Company policy dictates that the primary method of access to the VMs is RDP. However power operations still require users to log in to the Virtual center and administer their machines from there. This is beginning to slow the Virtual Center down considerably.

The solution would be to block users from the Virtual Center and grant them access to the Console and power options using the Remote Console URL.

How do I generate 500 urls without going to each machine individually and clicking the Generate Remote Console URL button?

0 Kudos
1 Solution

Accepted Solutions
masaki
Virtuoso
Virtuoso
Jump to solution

However power operations still require users to log in VC ....

Why can't they restart from rdp?

Do you have Hardware vendor remote control interfaces(like Sun ILOM) ?

View solution in original post

0 Kudos
5 Replies
masaki
Virtuoso
Virtuoso
Jump to solution

However power operations still require users to log in VC ....

Why can't they restart from rdp?

Do you have Hardware vendor remote control interfaces(like Sun ILOM) ?

0 Kudos
hicksj
Virtuoso
Virtuoso
Jump to solution

With that large an environment, even using the Web interface wouldn't be very managable.

I'd recommend using the VI Perl Toolkit. Create a cgi script that:

  • prompts the user for their VC credentials

  • queries VC based on those rights, displaying the VMs they have permissions to

  • provides a "Power" button they can use to cycle the power on whichever VM they've selected

Power operations are simple to script, and this would provide a dynamic listing of VMs based on the user credentials... instead of a static list of generated URLs.

Regards, J

ColinISYS
Contributor
Contributor
Jump to solution

Hi J

Many thanks for your reply.

I have written the solution you suggested and this works fine (I have attached it for all to use freely). The only shortcoming here is there is no console view. In a large Enterprise environment it is useful to be able to power on/off servers and see the console if they become unresponsive to RDP/ping etc. The console may show a blue screen for example.

I have worked out how to generate the Base64 encoded urls to all the VMs in my environment and once I have finalised my solution I will post it back here.

Regards

Colin

0 Kudos
hicksj
Virtuoso
Virtuoso
Jump to solution

Colin,

Good deal and thanks for contributing back!

I realized that my proposed solution didn't provide Console services, but I don't like to point out my post shortcomings. Smiley Wink Actually, I was figuring there must be a way to generate the URLs also, so I look forward to seeing your followup.

J

0 Kudos
ColinISYS
Contributor
Contributor
Jump to solution

Hi J

here it is - I have borrowed a cool piece of code writted by Antonin Foller, that Base64 encodes strings. I called his function and passed it a string that includes the VM unique ID extracted from the VPX_VM table in the Virtual Center database.

I have included a file called Base64.vbs that contains Antonins two functions; one encodes and one decodes strings. It is not needed for the web page to work but is a useful reference.

Regards

Colin

0 Kudos