Tuesday, May 8, 2012

Few things to take care while building vagrant boxes

Following are some of the tricks that were useful to me while creating Oracle Enterprise Linux vagrant box.
Create vm using VDI format for easy handling.
Make sure you have removed all the extraneous packages from the installed vm.
You can check out package descriptions at pkgs.org
yum remove X11
yum list installed | grep gnome

Also ensure that yum installs only relevant language support
Edit /etc/rpm/macros.lang and include
%_install_langs en:fr

Shutting/removing certain services
chkconfig --level 0123456 bluetooth off
chkconfig --level 0123456 cups off
chkconfig --level 0123456 gpm off
chkconfig --level 0123456 hidd off
chkconfig --level 0123456 hplip off
chkconfig --level 0123456 isdn off
chkconfig --level 0123456 nfslock off
chkconfig --level 0123456 nfstat off
chkconfig --level 0123456 pcscd off
chkconfig --level 0123456 portmap off
chkconfig --level 0123456 rcpgssd off
chkconfig --level 0123456 restorecond off
chkconfig --level 0123456 rhnsd off
chkconfig --level 0123456 rpcgssd off
chkconfig --level 0123456 rpcidmapd off
chkconfig --level 0123456 sendmail off
chkconfig --level 0123456 xfs off


Some times VirtualBox guest additions will not install due to discrepancy in the header files
Remove the currently installed kernel header files
  rpm -ev --nodeps kernel-uek-headers

Now attach the iso file to virtual cdrom
 mount /dev/cdrom /mnt; cd /mnt/Server
 rpm -ivh kernel-uek-headers.(what is available)
 This should match with (uname -r)
 cd /; umount /mnt; eject

Finally remove languages support that is not required to further squeeze the size of VM.
rm /usr/lib/locale/locale-archive
cd /usr/lib/locale
ls | grep -v ^en | xargs rm -rf
/usr/sbin/build-locale-archive

To reduce the footprint, do the following on the VM.
dd if=/dev/zero of=/bigemptyfile
sudo rm -rf /bigemptyfile
halt

After shutting down the VM, simply resize the VM file with
VBoxManage modifyhd --compact my_hd.vdi

4 comments:

  1. You'll understand the market a whole lot better with the data and graphic tools provided by our stock quote system. You'll understand how certain economic events can affect your investments, and be able to answer questions from stock market friends concerning when to buy or sell Acam Stock . You will have access to live charts, and you can receive instant notifications as stocks change in cost.

    ReplyDelete
  2. We have analyzed Acam Stock and other stock information for you so that you can stay up-to-date on the latest Acam Stock market trends.

    ReplyDelete
  3. Never miss a stock price change from Mmjff with our Live, Real Time Stock Market Overview! Most of the data is updated every 5 minutes to ensure that you are getting all of the latest Acam Stock change alerts as soon as they happen.

    ReplyDelete
  4. "If you keep these crucial aspects in mind as you look
    for a data science institution in Pune, you'll be well on your way to mastering this fascinating field. "


    data science course in pune with placement guarantee

    ReplyDelete