A while back I posted about how to change the amount of RAM assigned to the COS using the SDK, however, at that time I didn’t know of a good way to do so from the command line on the box. After some digging around, testing (and consequentially breaking), I’ve discovered how to change the setting.
Turns out, someone else already knew about this (including Dominic, a.k.a vmprofessional…I swear I’ve read that kickstart file a thousand times before and never noticed the code for this)…apparently my google-fu wasn’t working for me when I was trying this before.
Remember, valid values are from 272 to 800 MB.
# change ESX's config file
sed -i 's/memSize = "[0-9][0-9][0-9]"/memSize = "512"/' /etc/vmware/esx.conf
# regenerate the grub config files
# recreate the initrd file with new settings
echo "Host must be rebooted for new settings to take effect!"