VMware Cloud Community
Stuarty1874
Contributor
Contributor

Increase Service Console Memory via Kickstart Script

Folks, I've tried to use the following in my %POST% section of my Kickstart scripted install but it kills my host. I'm trying to increase the Service Console RAM to 800MB.

  1. This section configures Service Console Memory to 800MB

mv -f /etc/vmware/esx.conf /tmp/esx.conf.bak

sed -e 's/boot\/memsize = \"272\"/boot\/mesize = \"800\"/g' /tmp/esx.conf.bak >> /etc/vmware/esx.conf

mv -f /boot/grub/grub.conf /tmp/grub.conf.bak

sed -e 's/uppermem 277504/uppermem 523264/g' -e 's/mem=272M/mem=800M/g' /tmp/grub.conf.bak >> /boot/grub/grub.conf

I get the attached error on reboot....

Any ideas?

Reply
0 Kudos
9 Replies
sbeaver
Leadership
Leadership

Try this

mv -f /etc/vmware/esx.conf /tmp/esx.conf.bak

sed -e 's/boot\/memsize = \"272\"/boot\/mesize = \"800\"/g' /tmp/esx.conf.bak >> /etc/vmware/esx.conf

mv -f /boot/grub/grub.conf /tmp/grub.conf.bak

sed -e 's/uppermem 277504/uppermem 818176/g' -e 's/mem=272M/mem=800M/g' /tmp/grub.conf.bak >> /boot/grub/grub.conf

uppermem is (RAM * 1024) - 1024 = uppermem

(800*1024)-1024=818176

Steve Beaver

VMware Communities User Moderator

*Virtualization is a journey, not a project.*

Steve Beaver
VMware Communities User Moderator
VMware vExpert 2009 - 2020
VMware NSX vExpert - 2019 - 2020
====
Co-Author of "VMware ESX Essentials in the Virtual Data Center"
(ISBN:1420070274) from Auerbach
Come check out my blog: [www.virtualizationpractice.com/blog|http://www.virtualizationpractice.com/blog/]
Come follow me on twitter http://www.twitter.com/sbeaver

**The Cloud is a journey, not a project.**
Reply
0 Kudos
Stuarty1874
Contributor
Contributor

Wow. That was quick. I'll retest and get back to you.

Reply
0 Kudos
Schorschi
Expert
Expert

Sbeaver,

VMware recommends running esxcfg-boot as well. I don't have my snippet of code handy will post it tomorrow, but I just wanted to point this out.

Reply
0 Kudos
Stuarty1874
Contributor
Contributor

When I run this from the Service Console it works ok, but when I add it to my script it fails. I've attached a copy of my script. Any idea why this might be happening?

Reply
0 Kudos
Schorschi
Expert
Expert

Because the method VMware gave us, as the official method per VMware, and it uses esxcfg-boot, which VMware also says should not be called from kickstart, as officially no esxcfg commands should be called from kickstart (cough, some are safe but not all), we do all our customization via custom script/service we wrote, which is invoked on first reboot after OEM load.

Here are the steps VMware explicitly gave us...

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

esxcfg-boot -g

esxcfg-boot -b

It is similar to what sbeaver noted, but this must be done outside of %post

Reply
0 Kudos
Byron_Zhao
Enthusiast
Enthusiast

Just found out this in VC 2.5. VC -> select host->Configuration->Memory->Properties.

Didn't notice if it is in VC 2.0.1.

-BZ

Reply
0 Kudos
Schorschi
Expert
Expert

This begs the question on when the RCLI (Preferred in PowerShell set of course) will do this. If the RCLI does not do this or is not scheduled to do it in GA release, it definitely should. Also, I found what I believe is a bad bug in VC 2.5 or in 3i. See attached screen print. Doing this trick with 3i, I have server showing a NEGATIVE value for memory setting!

Reply
0 Kudos
Schorschi
Expert
Expert

Begs the question, will this trick work in RCLI, if not if definitely should. In fact, VMwware should add this to the PowerShell bundle. Also, if you attempt this on 3i, it does not work? At least not on my 3i servers. On 3i, it displays a NEGATIVE value, and the properties interface crashes. Hey, VMware? Bug?

Reply
0 Kudos
falsehope
Contributor
Contributor

I use this and it works a treat :smileygrin:

vimsh -ne "hostsvc/memoryinfo 838860800"

Thats 800M

800 * 1024 * 1024

Reply
0 Kudos