Management of Virtual Images for ETICS Pool

This page is meant to explain how to modify an existing virtual image(s).

General information

The ETICS VMWare images are stored currently on the afs under location: /afs/cern.ch/project/etics/internal/public/VMWareImages/. Under this directory several image directories are present like: WN_base_SLC4_ia32 representing SLC4 32-bits installation for instance. Each image directory should contain following files:

  • image.vmdk (e.g. WN_base_SLC4_ia32.vmdk) - VMWare disk file
  • hostname.vmx.template - generic template for above disk file
  • package_list - sorted set of installed packages
  • package_V_list - sorted list of installed packages together with accompanying package versions and releases

Prerequisites

One needs to have:

  • operational version of the VMWare Server version 1.0.4. or higher (no test with v2.0 were done so far). This can be downloaded from http://vmware.com.
  • around 30GB of disk space per one image
  • basic knowledge of VMWare Server software

Fetching the image from repository

Unless a new image is about to be created whole work will be performed on already existing images. In order to modify a image one needs to fetch it from repository and start it. The script called createVM.sh has been developed to address this need. At the moment of writing the v1.7 was tested and has proven to be operational. The script can be fetched from here. The script requires 3 parameters to operate correctly: 1) VM image name, 2) hostname 3) MAC address (this MAC address should be know to the DHCP server, for automatic IP assignment). Example of script usage:

   mkdir Image_WS
   cd Image_WS
   sh createVM.sh WN_base_SLC4_ia32  lxetvm000a  00:50:56:35:1F:FF
   
In case one needs to altering the image a line taking snaphot (vmrun snapshot ${VMX_FILE_NAME}) should be commented out in the script to avoid later on merging. At this point one should have an operational image and should be able to login to it either from console (vmware command should open one in X11 environment) or via ssh (ssh lxetvm000a).

Modifying the image

Among most common modifications one can list:

  • new packages installations
    • RH-based installations:
       yum install package_name_here 
      or
      up2date -i package_name_here 
    • Debian-based installations:
      apt-get install package_name_here
      or
      dpkg -i package_name_here

  • configuration changes e.g. editing condor_config | condor_config.local or condor_config.parallel files

Preparing image for automated IP assignement

  • All installations
       /etc/init.d/condor.boot stop
       rm -rf /home/condor/log/*
       yum clean all
       rm /etc/hosts /etc/hostname 
       vi /etc/sysconfig/network
       
  • #RH-based installations
       chkconfig firstboot_setNET.sh on   
Make sure that the file /etc/sysconfig/network-scripts/ifcfg-eth0 does not contain any hardcoded MAC address.

  • #Debian-based installations
       rm /etc/udev/rules.d/z25_persistent-net.rules
       rm /etc/hostname 
       update-rc.d firstboot_setNET.sh defaults
       

Testing the image

It is extremely important to test whether the image operates correctly and will not affect the production environment. Because of that the image should be tested in a dedicated setup. Among the basic test one should examine:

  • proper IP address assignment
  • condor operating correctly (joining the desired pool)
  • presence of changes (installations/configuration modifications)
  • presence of AFS for installations of SLC3, SLC4
  • proper time synchronisation

Saving the image

After sucessfull test the image should be saved in the production repository and deployed in production. Each image contains the package set files (see above). The files should be updated accordingly each time the installed package set is changed.

Image versioning

In order to avoid ambiguity among images a image versioning technique needs to be put into place. The basic information about the image shoud contain

  • md5sum of files comprising image definition
  • The image itself should contain the version

-- MarianZUREK - 22 Aug 2008

Edit | Attach | Watch | Print version | History: r11 < r10 < r9 < r8 < r7 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r11 - 2009-03-16 - MarianZUREK
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    ETICS All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback