Thursday, December 27, 2007

Changing ESX Service Console memory

During default ESX installation, Service Console will be allocated 272MB of memory. Most of time, it is sufficient. However, if you have third party software installed in Service Console, or you have a powerful server (like Sun Fire x4600, with 8 Dual core CPU, 64GB memory) that can support more than 50 vCPUs, I strongly suggest to change the Service Console memory to 512MB. In ESX 2.x, VMware suggested 512MB should be used to support more than 32 vCPUs. Since ESX 3.x has a much more effect method to manage its memory, it runs 50 to 60 vCPUs without any problems with 512MB. If you have other third party software in the Service Console, you might want to increase to more than 512MB.

Here is how to change the Server Console’s memory, and it needs a reboot to take in effect.

First of all, back up the files that we are going to modify.

cp /etc/vmware/esx.conf /etc/vmware/esx.conf.bak
cp /boot/grub/grub.conf /boot/grub/grub.conf.bak

Second, modify esx.conf and grub.conf:

1. Edit /etc/vmware/esx.conf to change the number of 272 to 512

Original: /boot/memSize = "272"
After: /boot/memSize = "512"

2. Edit /boot/grub/grub.conf to change:

Original: 272M
After: 512M
Original: uppermem 277504
After: uppermem 523264


Original: 272M
After: 800MB
Original: uppermem 277504
After: uppermem 818176


Just found sed is a stream editor in Linux. Using sed in a script would make this job much easier and less errors.


#back up config files

/bin/cp /etc/vmware/esx.conf /etc/vmware/esx.conf.bak

/bin/cp /boot/grub/grub.conf /boot/grub/grub.conf.bak

#editing esx.conf and grub.conf

/bin/sed -i -e 's/272/512/' /etc/vmware/esx.conf

/bin/sed -i -e 's/272M/512M/' /boot/grub/grub.conf

/bin/sed -i -e 's/277504/523264/' /boot/grub/grub.conf


Unknown said...

or this

sed -i 's/memSize = \"272\"/memSize = \"800\"/g' /etc/vmware/esx.conf

esxcfg-boot -g
esxcfg-boot -b

Byron Zhao said...

As a matter of fact, with VC 2.x and up, Service Console's memory can be changed in VirtualCenter. Select the ESX host -> Configuration -> Memory -> Properties, Service Console's memory can be changed here. However, no matter which way you do, the ESX host has to be restarted for it to take effect.

Martin Jackson said...

You can also globalise it incase someone's already changed it:

sed -i -e 's/\/boot\/memSize\ =\ "[0-9][0-9][0-9]"/\/boot\/memSize\ =\ "800"/1' /etc/vmware/esx.conf

Anonymous said...

I had to do a:

esxcfg-boot -g
esxcfg-boot -b
after editing the configuration files. Without doing that it would not come up, complaining about not being able to mount the root filesystem and dropping you in some kind of minimal shell.