VMware Cloud Community
J_Wright
Enthusiast
Enthusiast

Scripting Service Console Memory

I am wanting to change the memory on my service console in a script. Here is what I have, but it is not working.

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

sed -e 's/boot\/memSize = \"272\"/boot\/memSize = \"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

It doesn't look like esx.conf and grub.conf are being replaced on my host

Any help would be appreciated

Thanks

0 Kudos
7 Replies
weinstein5
Immortal
Immortal

As I recall changing the Service Console memory requires a host reboot - also make sure the swap space is sized approriately - it needs to be twice the size of the memory assigned to the service console.- you can also change thropught the VI client -

If you find this or another answer useful please consider awarding points by marking the answer correct or helpful

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
Texiwill
Leadership
Leadership

Hello,

Moved to the ESX 3.5 forum.


Best regards,

Edward L. Haletky

VMware Communities User Moderator

====

Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.

CIO Virtualization Blog: http://www.cio.com/blog/index/topic/168354

As well as the Virtualization Wiki at http://www.astroarch.com/wiki/index.php/Virtualization

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
0 Kudos
depping
Leadership
Leadership

it needs a reboot indeed. i used the following:

# Upsize console memory
mv -f /etc/vmware/esx.conf /etc/vmware/esx.conf.old
/bin/sed -e 's/boot\/memSize = \"272\"/boot\/memSize = \"800\"/g' /etc/vmware/esx.conf.old >> /etc/vmware/esx.conf
mv -f /boot/grub/grub.conf /tmp/grub.conf.bak
/bin/sed -e 's/uppermem 277504/uppermem 818176/g' -e 's/mem=272M/mem=800M/g' /tmp/grub.conf.bak >> /boot/grub/grub.conf

Duncan

Blogging:

If you find this information useful, please award points for "correct" or "helpful".

J_Wright
Enthusiast
Enthusiast

After I reboot, I lose communication to the host. I looked at the 2 files and they are not being replaced with the backup files that I made changes to. It looks like the files are just being re-created.

I got another command to work, but it is requiring another reboot after the post. Is there a way to reboot again after the post is completed?

Thanks,

J

0 Kudos
stvkpln
Virtuoso
Virtuoso

I'm personally not a big fan of editing files and doing things like that if I don't absolutely have to.. What I do for our scripted installs is make use of vmware-vim-cmd.. It's a lot cleaner. The command you'd run to up the SC memory to 800MB is: vmware-vim-cmd hostsvc/memoryinfo 838860800. Make sure you allow a good 30-45 seconds (via a sleep statement) prior to executing anything with vmware-vim-cmd during the scripted install stage.

Hope that helps

-Steve
0 Kudos
swiftangelus
Enthusiast
Enthusiast

Hello all,

I have tried the command mentoined here in esx 3.5 update 3. It throws an error:

(vmodl.fault.InvalidArgument) {

dynamicType = <unset>,

invalidProperty = <unset>,

msg = "A specified parameter was not correct.

"

}

Any ideas?

Thanks

0 Kudos
vishy123
Enthusiast
Enthusiast

Try this

#############################################################

  1. Change the amount of RAM allocated to the Service Console #

#############################################################

echo " Change the amount of RAM allocated to the SC" >> /tmp/PostInstall.log

cp /etc/vmware/esx.conf /etc/vmware/esx.conf.ORIG

perl -spi -e 's|/boot/memSize = \"272\"|/boot/memSize = \"800\"|' /etc/vmware/esx.conf

cp /etc/grub.conf /etc/grub.conf.ORIG

esxcfg-boot -g

esxcfg-boot -b

echo " Change the amount of RAM allocated to the SC completed" >> /tmp/PostInstall.log

NOTE: You will need to reboot for memory change to take effect.

0 Kudos