0 Replies Latest reply on Sep 18, 2008 5:42 AM by rbmadison

    Easy End User VM Console Access

    rbmadison Enthusiast

       

      I found a bit of aspx code a while ago to allow console access to a VM. It's written in ASP. Attached are the files. Below are the steps you need to do to get this working. Once it's running you simply type in the name or IP of the VM you want to connect to and it brings up the web console of that VM only. If anyone is good at javascript it would be nice to convert this from ASP to javascript so a separate web IIS ASP webserver isn't needed.

       

       

       

       

       

      1. Create a readonly database user that can access your VirtualCenter database. This is the account that will be used to query the database and get the remote console information.

      2. Install IIS on any server other than your VirtualCenter server. You can make this a VM. This is required because we need asp support.

      2. Copy the attached getlist.asp and default.asp attached fles into it.

      3. Create a system ODBC connection on the IIS server to your VirtualCenter database using the readonly user account.

      4. Edit the getlist.asp file and change the following:

      a. Change the line "strConnectLog = "Provider=SQLOLEDB..." to reflect your ODBC connection. Use the readonly user account you created in

      step 1.

      b. Replace all occurances of myvcserver with the host name of your VirtualCenter server.

      c. Save the file.

      6. Edit the default.asp and replace occurances of myvcserver.mydomain.com with the fully qualified host name of your VirtualCenter server and save

      the file.

      7. Go to your VirtualCenter server and navigate to
      myvcserver\c$\Documents and Settings\All Users\Application Data\VMware\VMware

      VirtualCenter\docRoot. Rename the index.html file to orgindex.html. Don't worry this doesn't break your VirtualCenter and the page will still be

      accessible.

      8. Save the attached index.html into this docRoot folder.

      9. Edit the saved index.html and change the line replace vmconsole.mydomain.com with the fully qualified name of the IIS web site you created in step

      2.

       

      Now when you access your VirtualCenter server you will just see a page asking you which console to connect to. Type in a VM IP or host name and click submit.

       

       

      You can get back to the original default web page by going to the bottom of the page and clicking on the last underscore at the bottom of the page. It will bring up the orgindex.html page. I wanted to make this somewhat hidden for end users but still accessible.

       

       

      Let me know if I missed anything. If we could get this working in javascript this would be even better so we wouldn't need another IIS server.

       

       

      Thanks!