How to Add Memory to an ESXi Virtual Machine

1

One very important aspect to the ESXi 5 All-in-One systems that have become very popular is getting the memory mix correct. Generally an OpenSolaris derived OS is used for storage as it provides both ZFS as well as native iSCSI to provide other virtual machines, and other network devices with fast, reliable and redundant storage. With that being said, OpenIndiana (a commone OpenSolaris derivative) does like to use as much RAM as possible for caching. With ESXi 5.0 having a 32GB limit in the “free” edition, partitioning memory to the various virtual machines becomes an important task. This simple guide goes through how to change an ESXi VM’s memory allocation in the most basic form since a lot of users can be intimidated by the concept of being able to change RAM allocations to the different machines.

Test Configuration

Again it is time to fire up my ESXi 5.0 test bed. If you want to read about the inexpensive, yet very powerful build, you can learn about the AMD Opteron 6128 ESXi server here.

  1. CPUs: 2x AMD Opteron 6128
  2. Motherboard: Supermicro H8DG6-F
  3. Memory: 8x 4GB Kingston unbuffered ECC 1333MHz DIMMs
  4. SSD: OCZ Vertex 3 120GB
  5. Power Supply: Corsair AX650 650w 80 Plus Gold
  6. Chassis: Norco RPC-450B
  7. Cooling: 2x Dynatron A1 G34 Coolers
  8. VMware ESXi 5.0

Changing Memory Allocations

Before we get started, a huge assumption here is that you do, in fact, have additional physical memory available. You will have great difficulty trying to give your ZFS storage VM 24GB of RAM and a Linux VM 8GB of RAM if you only have 16GB of physical memory installed, even if you try overprovisioning. I am also assuming you are logged into the ESXi machine using the VMware vSphere client. If you cannot get this far, it is likely you should be thinking about a simplified setup. One other note is that you want to shut down the virtual machine you are editing before starting the below instructions.

The first thing you want to do is go to the virtual machine you are attempting to allocate memory to. In this case, I am using an OpenIndiana 151a virtual machine which is providing ZFS storage functions.

VMware ESXi Add Memory to VM - Go to virtual machines
VMware ESXi Add Memory to VM – Go to virtual machines

Once you know the virtual machine, right click it and select edit settings. You can also do this from the menus in the VMware vSphere client.

VMware ESXi Add Memory to VM - Edit Settings
VMware ESXi Add Memory to VM – Edit Settings

Once the Virtual Machine Properties setting is shown, you can click on Memory which will show you a nice slider. Note, OpenIndiana has a recommended value of 1GB but a maximum recommended of 1TB. That may seem like a lot now, but it will not be soon. Remember, current Xeon E5 servers are three quarters of the way there already.

VMware ESXi Add Memory to VM - VM Properties Memory
VMware ESXi Add Memory to VM – VM Properties Memory

Next, you can edit the value either in GB (shown above) or MB (shown below.) Realistically, I would recommend at least 8GB of RAM for an all-in-one configuration. 2GB is just too low for ZFS.

VMware ESXi Add Memory to VM - Change Memory Number
VMware ESXi Add Memory to VM – Change Memory Number

That is all there is to the guide, it is a really simple procedure but can be an important one if you either need to allocate more memory to other virtual machines over time or you want to reclaim free memory.

 

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.