7 Replies Latest reply on Jan 6, 2009 2:53 PM by vishy123

    Scripting Service Console Memory

    J.Wright Enthusiast

       

      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

       

       

       

       

       

        • 1. Re: Scripting Service Console Memory
          weinstein5 Guru

           

          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

           

           

          1 person found this helpful
          • 2. Re: Scripting Service Console Memory
            Texiwill Guru
            vExpertUser Moderators

            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

            • 3. Re: Scripting Service Console Memory
              depping Champion
              VMware EmployeesUser Moderators

               

              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: http://www.yellow-bricks.com

               

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

               

               

              1 person found this helpful
              • 4. Re: Scripting Service Console Memory
                J.Wright 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

                 

                 

                 

                 

                 

                • 5. Re: Scripting Service Console Memory
                  stvkpln Master
                  vExpert

                  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

                  • 6. Re: Scripting Service Console Memory
                    swiftangelus 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

                     

                     

                    • 7. Re: Scripting Service Console Memory
                      vishy123 Novice

                       

                      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.