Thursday, July 31, 2008

VMWare Server Remote Console problems

Common situation

You have a VMWare Server 2.0 RC1 box (let's call it vmhost) that's being used as a sandbox and isn't allowed to be added to the primary company domain that everyone uses. Consequently it's set up in its own workgroup using DHCP.

Known Problem

The default url to access VMWare Server would be https://vmhost:8333/. However launching the console within Web Access by clicking the picture of the overlapping boxes will result in the following error:

Error opening the remote virtual machine vmhost: The host name could not be resolved.

VMWare Commentary

This is listed as a known issue in the release notes:

On Windows, the VMware Server desktop and Start menu shortcuts use the NetBIOS name in the connection URL. This might cause VI Web Access to fail to connect to VMware Server. VMware Remote Console connections might also fail, with the error Error opening the remote virtual machine machine_name: The host name could not be resolved.

Workaround: Enter the correct host name as the Fully Qualified Domain Name (FQDN) when prompted by the Windows installer. Or, if the URL specified in the shortcut does not work, use the correct host name, IP address, or localhost, as appropriate, in the connection URL. You can also manually enter the short name and the FQDN, or localhost, in the /etc/hosts file.

For the situation described, the IP address isn't static and the FQDN is not defined in DNS. Therefore none of this will work.

Workaround

Create an ASP page on the server including the following:

<a href="https://<%=Request.ServerVariables("LOCAL_ADDR")%>:8333" target="_blank">VMWare Server</a>

This will interrogate the server for the local IP address and construct a url that will work for both Web Access and Remote Console.

Edit: corrected the asp code which got messed up by unescaped characters. "Sorry about that, chief"

No comments: