Knowledge Base

Search the Knowledge Base: |
Search the Knowledge Base: |
Using Citrix MetaFrame XP in a Windows 2000 Virtual Machine
Details
Solution
- 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:
- Power on your virtual machine and log in as the Administrator user.
- Right-click the My Computer icon and choose Manage. The Computer Management window appears.
- Click Device Manager in the left pane.
- In the right pane, click the plus (+) sign next to Ports.
- Right-click Communications Port (COM1) and choose Disable.
- Right-click Communications Port (COM2) and choose Disable.
- Click Yes in the confirmation dialog.
- 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. - 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.
- Assign 272MB of memory to the console operating system. This is the minimum recommended for 12 virtual machines.
- 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. - 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. - 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.
- 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.
- 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. - Reboot the ESX Server machine.
- 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.
- Start virtual machines 4, 5, 6, 7, 10 and 11.
- 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. - 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. - Start virtual machines 0, 1, 2, 3, 8 and 9 and let users work against them, too.
- 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
- KB Article: 869
- Updated: Aug 14, 2009
- Products:
VMware ESX - Product Versions:
VMware ESX 1.5.x
VMware ESX 2.0.x
VMware ESX 2.1.x

