VMware
 

Knowledge Base

Search the Knowledge Base:

Products:
Search In:
 

Using Citrix MetaFrame XP in a Windows 2000 Virtual Machine

Details

How do I configure a Windows 2000 virtual machine for best performance when running Citrix MetaFrame XP?

Solution

If you are using a Windows 2000 virtual machine as a MetaFrame XP server, be sure you are using FR1, FR2 or FR3, then make the following three modifications:
  1. Disable ports COM1 and COM2 in each Windows 2000 guest operating system. If you use these ports, you may see random spikes in CPU utilization, affecting performance. To disable the COM1 and COM2 ports in the guest operating system:
    1. Power on your virtual machine and log in as the Administrator user.
    2. Right-click the My Computer icon and choose Manage. The Computer Management window appears.
    3. Click Device Manager in the left pane.
    4. In the right pane, click the plus (+) sign next to Ports.
    5. Right-click Communications Port (COM1) and choose Disable.
    6. Right-click Communications Port (COM2) and choose Disable.
    7. Click Yes in the confirmation dialog.
    If you are running MetaFrame XP in a Windows NT virtual machine, you do not need to take the following two steps.

  2. Apply Citrix hotfix XE102W014.
    For a download link and instructions on applying the hotfix, go to the Citrix web site (www.citrix.com), navigate to the support section and search for XE102W014.
  3. Manually add a line to the virtual machine's configuration file. At the top of the Edit Configuration page, click Use Text Editor, then add the following line:
    workload="TerminalServices"
    Click Save Changes to save the configuration file.


Note: Beginning with VMware ESX Server 2.x, multiple virtual machines running MetaFrame XP on the same ESX Server computer do not need to be manually optimized. The optimizations described below are done automatically.

For VMware ESX Server 1.5.x, follow the steps below to fine tune performance for multiple virtual machines running MetaFrame XP on the same ESX Server computer.

The notes below assume that you are running 12 identical virtual machines on an 8-CPU IBM xSeries 440 server. The configuration described in these notes assigns 1.5 virtual machines to each CPU.

  1. Assign 272MB of memory to the console operating system. This is the minimum recommended for 12 virtual machines.
  2. For each virtual machine, ensure that
    • The guest operating system type is set to Windows 2000.
    • Ethernet adapter 0 is set to vmnic0 and configured to use vmxnet.
    • The Citrix hotfix described in the first section of this note is applied. It replaces vdtw30.dll with an updated version of the file.
    • The line workload="TerminalServices" is included in the configuration file, as described in the first section of this note.

    Note: Any modifications or tunings that may be done by your Citrix administrator to a native machine (without ESX Server) running MetaFrame XP should also be applied to the setup in the above virtual machines. If you plan to create one or more virtual machines, then replicate them to create the full set of virtual machines, apply the modifications before replicating the base machines.
  3. Set the processor affinities for the virtual machines (referred to here as VM0 to VM11). Set the processor affinities for VM0-VM3, VM8 and VM9 to CPUs 0, 1, 2, 3. Set the processor affinities for VM4-VM7, VM10 and VM11 to CPUs 4, 5, 6, 7.
    The basic idea here is that for each central electronics complex (CEC) making up an x440, there are six virtual machines pinned so they can run on any of the CPUs in that CEC.
  4. Set the memory assigned to virtual machines 4, 5, 6, 7, 10 and 11 to 2668. The memory to be assigned to the remaining virtual machines is determined in the next stage, depending on the results seen when you start running virtual machines.


In the following section, you begin running virtual machines under load and adjust memory assigned to each virtual machine to achieve best performance.

  1. Disable swapping for ESX Server. Log in to the VMware Management Interface as the root user and go to Configure System>Swap File Configuration. Set Enable on startup to No.
  2. Disable page sharing between virtual machines. To do so, use a text editor on the console operating system to edit the file /etc/init.d/vmware. Find the following line:
    ?cd "$vmdb_answer_SBINDIR" && "$vmdb_answer_SBINDIR"/"$kernloader" -n "$maxCPUs" "$vmdb_answer_LIBDIR"/"$kernel" || exit 1?
    Locate the -n option setting in that line. Just before it, add the option -m. Save the file.
  3. Reboot the ESX Server machine.
  4. Log on to the VMware Management Interface as the root user. Go to Configure System>VMKernel Configuration. Edit the value of MemAllocHighThreshold to be 4096.
  5. Start virtual machines 4, 5, 6, 7, 10 and 11.
  6. Let users work against those six virtual machines for about an hour. At intervals, run the following command on the console operating system:
    cat /proc/vmware/sched/mem
    Watch the TOTAL line until the sum of the size and overhd columns is >= 16*1024*1024 (or 16777216). The six running virtual machines should use, as closely as possible, all the memory in their CEC without spilling over too much into the other CEC. If this number is coming out much greater than 16GB, you may need to lower the memory setting for the first six virtual machines.
  7. Once again, run the command
    cat /proc/vmware/sched/mem
    Look at the value of MemAvailable. This value is memory available in KB. Note the corresponding value in MB. Call this value xMB. Edit the configuration files for virtual machines 0, 1, 2, 3, 8 and 9 and modify the memSize to be x/4 - 80, rounded down to the closest multiple of 4.
  8. Start virtual machines 0, 1, 2, 3, 8 and 9 and let users work against them, too.
Notes:
  • Connect to the server with remote consoles and the management interface only when you really need to use them. If you need to connect remote consoles to see the number of users running against a particular virtual machine, connect to only one virtual machine at a time, then disconnect the remote console and move on to the next virtual machine.
  • To ensure that there is no performance degradation due to NUMA, any time you stop and restart a virtual machine, you should repeat steps 3, 5, 6 and 8 above.

Keywords

URLz; 869; 1086

Feedback

Rating: 1 - Lowest 2 3 4 5 - Highest (0 Ratings)   

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.
What can we do to improve this information? (2000 or fewer characters)
Submit
Rating: 1 - Lowest 2 3 4 5 - Highest (0 Ratings)   
Actions