VMware Cloud Community
jketron
Enthusiast
Enthusiast

Service console default memory change from command line

What is the command line to change the default memory of the service console from 272 to 800? I want to script this during the RDP installation process

Thank you

0 Kudos
13 Replies
jayolsen
Expert
Expert

See above, vmservconmem, under Console Memory

0 Kudos
oreeh
Immortal
Immortal

You can modify it also by editing /boot/grub/grub.conf

The kernel parameter is mem

Sample entry:

title VMware ESX Server

#vmware:autogenerated esx

root (hd0,0)

uppermem 556032

kernel --no-mem-option /vmlinuz-2.4.21-37.0.2.ELvmnix ro root=UUID=f11cd903-b7f6-4d1e-9072-c7518eb8cdef mem=800M cpci=1:;2:;

7:;

initrd /initrd-2.4.21-37.0.2.ELvmnix.img

0 Kudos
jketron
Enthusiast
Enthusiast

OK, two questions for your replies

to do during the install does the vmservconmem option work in 3.x as well?

and

Does editing just the grub.conf file change the service console memory post install for exisiting servers (and a reboot), seem to recall there was several things you had to do to change the mem via command line post install.

0 Kudos
oreeh
Immortal
Immortal

Does editing just the grub.conf file change the service console memory post install for exisiting servers (and a reboot),

yes - at least this worked for me in the past when I couldn't use the VI client

seem to recall there was several things you had to do to change the mem via command line post install.

you should of course have an appropriate sized swap partition

0 Kudos
jketron
Enthusiast
Enthusiast

swap states 554840, so I read that as 554MB, it sounds like I need to increase it too

0 Kudos
oreeh
Immortal
Immortal

Yepp, when using 800M service console memory the swap should be 1600M.

It doesn't hurt to always configure 1600M swap - even if the SC only uses 272M or 544M - since this simplifies later changes a lot.

0 Kudos
jketron
Enthusiast
Enthusiast

I just looked at one of the servers that has 800MB dedicated to the service console and the swap file is the same size, can you elaborate the what the impact may be

0 Kudos
oreeh
Immortal
Immortal

This depends on some other things, like agents running in the console, general load you place on the console, ...

If, in your case the SC, doesn't need too much swap (or even better doesn't utilize swap at all) you are fine.

A side note: most of the configurations regarding the SC are derived from general *NIX rules.

One of these rules being: allocate twice the memory as swap.

But since this really isn't a general *NIX system but an ESX host many of these rules are not completely true / or even false (a swapping SC for example is a bad thing anyway).

I personally always configure 1600M swap despite the fact that it probably never gets used / never should get used.

0 Kudos
jketron
Enthusiast
Enthusiast

I agree with you about hoping to never use swap and in our case we almost never use it as well but I want to set a config that is going to be used for hundreds of ESX hosts.

0 Kudos
oreeh
Immortal
Immortal

În this case allocate 1600M swap

0 Kudos
low351
Contributor
Contributor

to do during the install does the vmservconmem option work in 3.x as well?<div>Unfortunately no, I tried to use it on ESX 3.5.0 123630 and I get:


SyntaxError: Unknown Command: 'vmservconmem'




I did this in the %post section of my kickstart file instead.



vmware-vim-cmd hostsvc/memoryinfo 838860800

0 Kudos
low351
Contributor
Contributor

Actually I had to use /usr/bin/vmware-vim-cmd hostsvc/memoryinfo 838860800

Without the fully qualified path it did't find the command.

AND SCRATCH THAT ONE TOO... both my /usr/bin/vmware-vim-cmd commands fail to execute in the %POST... dunno why yet.

0 Kudos
dm330
Contributor
Contributor

Hello i use this script in my kickstart file using the EDA appliance v0.87

#===============================================================================

Service Console set to 800mb

#===============================================================================

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 &gt;&gt; /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 &gt;&gt; /boot/grub/grub.conf

mv -f /etc/vmware/hostd/config.xml /etc/vmware/hostd/config.xml.bak

/bin/sed -e 's|&lt;/config&gt;|&lt;hostdWarnMemInMB&gt;750&lt;/hostdWarnMemInMB&gt;&lt;hostdStopMemInMB&gt;800&lt;/hostdStopMemInMB&gt;&lt;/config&gt;|g' /etc/vmware/hostd/config.xml.bak &gt;&gt; /etc/vmware/hostd/config.xml

And then you have to reboot the esx server to activate it...

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