VMware vSphere

 View Only
Expand all | Collapse all

Service console default memory change from command line

  • 1.  Service console default memory change from command line

    Posted Oct 25, 2007 05:19 PM

    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



  • 2.  RE: Service console default memory change from command line

    Posted Oct 25, 2007 05:22 PM

    See above, vmservconmem, under Console Memory



  • 3.  RE: Service console default memory change from command line

    Posted Oct 25, 2007 05:24 PM

    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



  • 4.  RE: Service console default memory change from command line

    Posted Oct 25, 2007 05:42 PM

    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.



  • 5.  RE: Service console default memory change from command line

    Posted Oct 25, 2007 05:47 PM

    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



  • 6.  RE: Service console default memory change from command line

    Posted Oct 25, 2007 06:02 PM

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



  • 7.  RE: Service console default memory change from command line

    Posted Oct 25, 2007 06:06 PM

    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.



  • 8.  RE: Service console default memory change from command line

    Posted Oct 25, 2007 06:07 PM

    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



  • 9.  RE: Service console default memory change from command line

    Posted Oct 25, 2007 06:40 PM

    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.



  • 10.  RE: Service console default memory change from command line

    Posted Oct 25, 2007 06:51 PM

    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.



  • 11.  RE: Service console default memory change from command line

    Posted Oct 25, 2007 07:09 PM

    În this case allocate 1600M swap



  • 12.  RE: Service console default memory change from command line

    Posted Feb 25, 2009 04:33 PM

    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



  • 13.  RE: Service console default memory change from command line

    Posted Feb 25, 2009 07:58 PM

    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.



  • 14.  RE: Service console default memory change from command line

    Posted Feb 27, 2009 01:46 PM

    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...