VMware

VMware ESX Server 2.0

Features | Documentation | Knowledge Base | Discussion Forums

previous Prev   Contents   Last   Next next

Running Many Virtual Machines on ESX Server

Running Many Virtual Machines on ESX Server

If you plan to run or register more than 60 virtual machines, you must change a few settings in the service console. By changing these settings, you provide additional CPU and memory resources to the service console, allowing ESX Server to operate more efficiently under this higher load.

Note: If you decrease the number of registered or running virtual machines to less than 60, then you should revert the settings back to their defaults through the management interface or through the service console.

Increasing the Memory in the Service Console

Increasing the Memory in the Service Console

  1. Log into the VMware Management Interface as root.
  2. Click the Options tab, then click Startup Profile.
  3. Increase the Reserved Memory to at least 512MB, and up to 800MB (the maximum recommended setting).
  4. Click OK, then reboot ESX Server.

    For more information, see Service Console Memory.

Allocating CPU Resources to the Management Interface

Allocating CPU Resources to the Management Interface

If, after changing these settings, you are still unable to open the VMware Management Interface to your server, then the number of outstanding processes, that are waiting to be executed, is too high. You need to allocate the necessary CPU resources to the management interface, by increasing the priority for the vmware-serverd and httpd processes.

  1. Log in as the root user on the service console.
  2. Type ps auxw and find the process IDs of the httpd and vmware-serverd processes.

    If there are multiple httpd processes, then type top. Click Shift-p (P) to sort the output by CPU usage. Remember the process ID for the httpd process using the most CPU.

  3. Raise the vmware-serverd process priority to -15 so that it can connect to all running virtual machines:

    renice -15 -p <vmware-serverd_process_ID>

  4. Raise the httpd process priority to -15:

    renice -15 -p <httpd_process_ID>

  5. Verify that you can log into the VMware Management Interface and view correct information about the virtual machines. Once this occurs, then continue with the next step.
  6. Change the vmware-serverd process priority back to the default of zero (0).

    renice 0 -p <vmware-serverd_process_ID>

  7. Change the httpd process priority back to the default of zero (0).

    renice 0 -p <httpd_process_ID>

Changing Default Parameters in the config File

Changing Default Parameters in the config File

Add the following configuration parameters in the /etc/vmware/config file.

Note: If you decrease the number of registered or running virtual machines to less than 60, then you should comment out the new lines you added or delete them from the /etc/vmware/config file.

Increasing Memory to the Apache Process

Increasing Memory to the Apache Process

By default, Apache allocates a shared memory segment of 24MB to contain all the virtual machines' data. This value of 24 MB is sufficient for 80 virtual machines. If you have more than 80 (up to the maximum of 200) registered virtual machines, Apache may run out of memory. If that happens, you may see a "Panic out of memory" message in /usr/lib/vmware-mui/apache/logs/error_log and the VMware Management Interface shuts down.

  1. Use a text editor and add the following option to /etc/vmware/config:

    mui.vmdb.shmSize = "37748736"

    where 37748736 represents 36MB (36 multiplied by 1024, multiplied by 1024).

  2. Restart the Apache server.

    /etc/rc.d/init.d/httpd.vmware restart

Note: Increasing this value may impact the performance of the virtual machines, since the Apache processes will require more memory in the service console.

Increasing the Timeout Value for the vmware-authd Process

Increasing the Timeout Value for the vmware-authd Process

As root, use a text editor and add the following configuration parameter to the /etc/vmware/config file:

vmauthd.connectionSetupTimeout = 120

This increases the timeout value to 2 minutes from the default of 30 seconds.

Increasing Memory for the vmware-serverd Process

Increasing Memory for the vmware-serverd Process

As root, use a text editor and add the following configuration parameter to the /etc/vmware/config file:

vmserverd.limits.memory = "49152"
vmserverd.limits.memhard = "65536"

These changes raise the soft memory limit for the vmware-serverd process to 48 MB (48 multiplied by 1024) and the hard memory limit to 64 MB (64 multiplied by 1024).

Note: You must restart the vmware-serverd process by rebooting ESX Server or by logging in to the service console as root and issuing the command

killall -HUP vmware-serverd

Running Many Virtual Machine with a Significant CPU Load

Running Many Virtual Machine with a Significant CPU Load

If you plan to run a large number of virtual machines with applications that use a significant amount of CPU, then increase the service console shares to 10000.

  1. Log into the VMware Management Interface as the root user.
  2. Click the Options tab, then click Service Console Settings.

    The CPU page should be displayed. If not, click the CPU tab.

  3. Click Edit.
  4. Type 10000 in the Shares field and click OK.

If the management interface is unresponsive, then you need to make these changes through the service console.

  1. Log into the service console as the root user.
  2. Type cat /proc/vmware/sched/cpu.
  3. Find the line that has console for the name. For example:
     vcpu
     vm
     name
     uptime
     status
     ...
     125
     125
     console
     71272.378
     RUN
     ...
     126
     126
     idle1
     71272.378
     RUN
     ...
     127
     127
     idle2
     71272.378
     RUN
     ...
  4. Use the echo command to change the number of service console shares:

    echo 10000 > /proc/vmware/vm/<name>/cpu/shares

    For the preceding output, you would type:

    echo 10000 > /proc/vmware/vm/125/cpu/shares.

Avoiding Management Interface Failures when Many Virtual Machines Are Registered

Avoiding Management Interface Failures when Many Virtual Machines Are Registered

If you have a very large number of virtual machines registered on a single ESX Server machine, the VMware Management Interface may shut down and a Panic out of memory message may be recorded in /usr/lib/vmware-mui/apache/logs/error_log.

By default, the Apache Web server uses 24MB of memory to store information about the virtual machines on the server. The errors described above can happen when this memory is not adequate for the number of virtual machines.

To work around the problem, open the file /etc/vmware/config in a text editor and find the line that begins with mui.vmdb.shmSize =. Increase the number in quotation marks, which is specified in bytes of memory. Then restart the Apache server with the following command:

/etc/rc.d/init.d/httpd.vmware restart

previous Prev   Contents   Last   Next next