After you create a VM on ESXi, you enable EM4J in the VM by adding a parameter to the VM's configuration. You can add a second parameter to limit the size of the EM4J balloon, but it is unnecessary. The following table describes the parameters.
Table 2. EM4J VM Configuration Parameters
|When set to |
|Sets a limit for the total balloon size for the VM, in
megabytes. If set to |
When EM4J ballooning is enabled, the guest balloon is disabled. If you enable EM4J ballooning, but do not run an EM4J-enabled JVM, there will be no ballooning for the VM, which could lead to the ESXi host swapping pages from the VM. This situation is undesirable because it can be expensive to swap the pages back in again. If you shut down a JVM with an EM4J balloon, the ballooned memory remains until it is written over. This means that the risk of swapping occurring after a JVM shutdown is at least initially very low.
The procedure describes how to add the EM4J configuration parameters using the vSphere Client. You can also add the parameters by editing the VM's VMX text file. After you enable EM4J, cloning the VM will duplicate the setup.
Create at least one virtual machine. EM4J requires VMware ESXi 5.0 or higher. See Creating a Virtual Machine.
Shut down the guest OS and, using vSphere Client, power off the VM, if necessary. It is not possible to edit the configuration parameters while the VM is running.
In the left panel of the vSphere Client, expand the ESXi host so that the VM you want to configure is visible.
Right-click the VM and select Edit Settings... from the pop-up menu.
Click the Options tab.
In the Settings column, under Advanced, select General. See the following figure.
In the Configuration Parameters box on the right, click Configuration Parameters....
Click Add Row and enter the following parameter, as shown in the following figure.
(Optional) Click Add Row and enter the following parameter.
(or enter the maximum number of
megabytes to limit the size of the EM4J balloon)
Click OK twice.
Repeat this procedure for each VM that will run an EM4J-enabled Java application.