C H A P T E R  4

Troubleshooting

Setting up an environment to host virtual desktops can be complicated, and it is not uncommon for a few steps not to work properly in the initial setup. The following sections offer solutions to some common problems.


Pools

If you have created a new pool and virtual machines are not created automatically, the cause may be one of the following:
If you have created a pool, and new virtual machines are created automatically, but they are not made available:

1. Verify that you still have enough disk space for your virtual machines.

Before a newly created virtual machine is made available for users, a snapshot is taken by default. This operation requires sufficient disk space.

2. Verify that the RDP port (typically 3389) of the Windows guest OS instance is open.

Before a newly created virtual machine is made available, the Virtual Desktop Connector verifies whether RDP communication can be established to the virtual machine. The following issues might prevent a successful test:

If the Sun Ray DTU is cycling and cannot connect to a virtual machine:

1. Verify that you have a virtual machine available to connect to.

2. Verify that remote access is correctly configured on your Windows guest OS (see Step 2 above.)

3. Verify that the Virtual Desktop Connector can communicate with the agent.

The firewall on the VirtualCenter server might block the communication.

4. Verify that the VMware tools are installed on the Windows guest OS.


Users

If users are not able to login to the Windows guest OS instance:

single-step bullet  Verify that the users are configured for remote access and are allowed to perform a remote access.


Machines

If unused virtual machines do not suspend:

1. Verify that the Power Options on the Windows guest OS have been configured for standby.

2. Verify that the Virtual Desktop Connector Tools are installed and running on the Windows guest OS.

3. Verify that the virtual machine is configured to suspend.

Look up the Virtual Machine configuration (Options/Power management), and make sure that the Suspend the Virtual Machine item is selected.



Note - If you experience problems with the standby feature in Windows XP, see http://www.terranovum.com/projects/energystar/ez_gpo.html.
EZ GPO includes a group policy for power options.


If the cloning process does not operate as expected:

To determine whether a new virtual machine is ready for use, the Virtual Desktop Connector tries to open an RDP connection to it. In certain cases, especially if you use a customized VM template for Vista, RDP can become available before the build process has completed; however, a virtual machine made available before the build process has completed cannot be used.

The following procedure describes how to set up a customized virtual machine template for Vista using VMware customization specs in such a way as to correct this problem. It requires that RDP be disabled in the virtual machine template and that no firewalls block RDP connections at the end of the cloning process.

Preparations for manual sysprep for Windows XP (Step 3) and Vista VMs (Step 4) are also included. These steps are not needed if you use only Windows XP VMs.



Note - If you are using the Windows Firewall, make sure that the Remote Desktop item is checked under Firewall Exceptions.


1. Disable RDP by making sure the Remote Desktop checkbox on the Remote section of the System Preference dialog on the Windows Control Panel is unchecked.

2. Create a registry file called enableRdp.reg at C:\ with the following content:


REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server]
"fDenyTSConnections"=dword:00000000 

The enableRdp.reg file enables RDP through the Windows registry. It must be installed as above at the very end of the cloning process, so that when the SetupComplete.cmd command changes the configuration key on the Windows registry, the RDP connection can succeed.

3. For Windows XP manual sysprep, include the following under Additional Commands in the Setup Manager tool:


regedit /s C:\EnableRdp.reg

The Setup Manager tool is used to create answer files for sysprep.

4. For Windows Vista manual sysprep and customization specs, create a batch file called SetupComplete.cmd in the %WINDIR%\Setup\Scripts directory with the following content:


regedit /s C:\ EnableRdp.reg

Windows Vista looks for %WINDIR%\Setup\Scripts\SetepComplete.cmd and executes it at the end of every setup process, including sysprep. The default setting for %WINDIR% is C:\Windows.


Networking

If the virtual machine does not have a valid IP address or cannot be pinged:

single-step bullet  Verify that your networking interface is properly configured for your ESX server in the Virtual Infrastructure Client.

If the network interface is properly configured for your ESX server:

single-step bullet  Verify that there is a properly configured DHCP server with enough leases running on the subnet your virtual machines will run on.

See the VMware documentation available on line at http://www.vmware.com/support/pubs/vi_pubs.html.

If you are unable to get a Remote Desktop Connection to your virtual machine:

1. Verify that it has been enabled in the Remote tab of the System Properties dialog.

If this is enabled, the issue probably has to do with your network settings.

2. Verify that the virtual machine’s subnet can be reached from the Windows machine from which you run the Remote Desktop Connection client.

If you have set up a private network for your virtual machines, it might not be accessible from a machine not on that network.

If the window displaying your virtual desktop freezes:

If you suspend or power down your virtual machine without first closing the RDP connection, the guest OS dies, but the RDP connection remains active. The result is a non-responsive window displaying the last known state of your Windows session. The following steps show how to set the Run VMware Tools Scripts panel on both the Virtual Infrastructure Client and the guest OS to avoid this problem.

1. Configure the Run VMware Tools Scripts panel on the Virtual Infrastructure Client.

a. Select Edit Settings of a particular VM to bring up the Virtual Machine Properties page.

b. Click the Options tab.

c. Select VMware Tools.

This is where you can modify the behavior of the Power Controls (Start, Stop, Suspend, and Reset).

d. Next to the Power Off switch (red rectangle), select Shut Down Guest.

This allows the guest OS to shut down gracefully when the Power Control button is pressed.

e. In the Run VMware Tools Scripts panel, check the Before Powering Off checkbox.

2. Repeat steps a. through e. above to configure the Run VMware Tools Scripts panel on the guest OS.

3. Modify the poweroff-vm-default.bat script on the guest OS.

The install location on the guest OS, typically
C:\Program Files\VMware\VMware Tools
contains the following default scripts:

poweroff-vm-default.bat
poweron-vm-default.bat
resume-vm-default.bat
suspend-vm-default.bat

4. Add tsdiscon.exe to the poweroff-vm-default.bat script.

The poweroff-vm-default.bat script is the first to execute when the VM is powered off from the VMware Infrastructure Client. It now calls tsdiscon.exe, which closes all open RDP connections.