VMware Cloud Community
txvcharlie
Enthusiast
Enthusiast

How to increase RAM memory to guest OS?

I have 48GB of RAM memory installed on the physical server. How do I increase the amount of RAM memory to each guest OS?

0 Kudos
14 Replies
LikeABrandit
Enthusiast
Enthusiast

You will need to ensure the VM is powered off first (unless you are using hot-add which is uncommon) then right-click the VM(s) within your vSphere Client, select "Edit Settings" and change each one's memory allocation to where you'd like it then power it back up. The first location the "Edit Settings" screen will go is to the memory, so it should be straightforward from there.

~Brandit

0 Kudos
amanvcp
Contributor
Contributor

You can do it easily with Power CLI. Use SET-VM command. See below

VMware vSphere PowerCLI Cmdlets Reference

Not sure what version on vSphere you are on, however this is very simple. By scripting you can do it for multiple VMs.

txvcharlie
Enthusiast
Enthusiast

Many thanks for the help. Okay, so I can increase the RAM and decrease the same way (preferably when the guest OS is power off), correct? I have 48GB of physical RAM and planned to have 4 virtual machines (guest OSes). If I want to divide them equally, that would be 12GB per OS/VM. Is there an advantage of not utilizing/assigning all the available physical RAM to all the guest OSes?

0 Kudos
BenLiebowitz
Expert
Expert

how much ram is currently allocated to each VM?  How many VMs do you have?  Which hypervisor are you running? 

Depending on how you have things setup, the memory may be able to be changed without shutting down, but typically the VM has to be powered off for the memory increase to take place. 

A script like this may be able to help (if you use PowerCLI)...

PowerCLI: Script to Schedule Memory and or vCPU up/downgrade | ICT-Freak.nl

Ben Liebowitz, VCP vExpert 2015, 2016, & 2017 If you found my post helpful, please mark it as helpful or answered to award points.
0 Kudos
BenLiebowitz
Expert
Expert

ESX/ESXi allows the physical memory to be shared, so you can allocate all the memory like that if you wish, just keep in mind it gives you very little room for growth if you wanted to add a 5th VM. 

Ben Liebowitz, VCP vExpert 2015, 2016, & 2017 If you found my post helpful, please mark it as helpful or answered to award points.
0 Kudos
a_p_
Leadership
Leadership

Two things to remember: Make sure the guest operating systems support the amount of memory you configure. E.g. 32-bit operating systems usually don't support more than 4 GB. In addition to this leave some memory unallocated for the ESXi host. Although memory management on the host works well, I usually "reserve" 2-3 GB for the host (i.e. don't assign to VMs).

André

txvcharlie
Enthusiast
Enthusiast

Total physical is 48GB. Right now it's only 4GB per VM. I like to increase that to 12GB. I'm running 5.1 ESXi with 4VMs.

0 Kudos
txvcharlie
Enthusiast
Enthusiast

a.p. wrote:

Two things to remember: Make sure the guest operating systems support the amount of memory you configure. E.g. 32-bit operating systems usually don't support more than 4 GB. In addition to this leave some memory unallocated for the ESXi host. Although memory management on the host works well, I usually "reserve" 2-3 GB for the host (i.e. don't assign to VMs).

André

I see. What amount of RAM allocation do you recommend for file server that have about 20 people or so people should have? What amount of RAM allocation should I have for the following VM servers? I have a total of 48GB of physical memory.

  1. File server - for about 20 people
  2. Web server - for about 30 people
  3. Oracle server - for about 15 people
  4. Domain server - for about 20 people
0 Kudos
LikeABrandit
Enthusiast
Enthusiast

Well, your ESXi host will have some overhead, as well as each VM. You can over-allocate though.

As for advantage/disadvantage to allocating it all, the advantage is obviously that your VM can utilize more RAM. The disadvantage is that if you end up over-allocated and your VMs use their full capacity simultaneously, anything above the overhead+utilized RAM would be swapped to disk which is a huge performance hit.

However, through Transparent Page Sharing, ballooning, etc. you would likely be able to allocate 12GB to each VM and never run into this issue. The safe thing to do however is reserve ~2GB for the host and VM overhead (you can tweak this to match your environment's actual overhead at any time). This might be more than needed in some situations, but it should keep you from ever over-allocating.

TL;DR - Allocate up to 46GB, since it seems likely your VMs won't even use the amount you're giving them, and modify VMs if you notice a trend of too much/too little RAM allocated to them.

~Brandit

0 Kudos
txvcharlie
Enthusiast
Enthusiast

Thanks! That is very helpful suggestions.

0 Kudos
a_p_
Leadership
Leadership

Assuming you run Windows 2008 R2, you should be ok with:

  1. File server - for about 20 people - 4GB
  2. Web server - for about 30 people - 4GB
  3. Oracle server - for about 15 people - 8-12GB (difficult to guess)
  4. Domain server - for about 20 people - 4GB

You can certainly assign more memory to each of the guests, but they will most likely not use it anyway.


André

0 Kudos
txvcharlie
Enthusiast
Enthusiast

Andre, many thanks for the response. I'm using Windows Server 2012 for file server of about 20 people. Does this require more RAM? The oracle server will be server 2008 R2. But the point of all these Oracle server will defenitly require more RAM, correct? What about SQL Server 2008 R2? How much ram does this server needs for serving about 7 person at max?

0 Kudos
a_p_
Leadership
Leadership

From what I saw with Windows 2012 so far, it doesn't require much more memory than Windows 2008, so I'd probably start with the memory sizes I mentioned before and only increase is if required. For database servers it's always a question of what's running on them. They usually grab most of the available memory (unless you restrict them) to optimize data access. With the physical memory you have and the current usage, you may start with e.g. 8GB for the database servers and check how they behave.

André

0 Kudos
txvcharlie
Enthusiast
Enthusiast

Thanks!

0 Kudos