Version 20 (modified by ibaldin, 8 years ago)


NEuca Guest Configuration


NEuca guest tools perform post-boot configuration of the VM using the configuration file passed in by the user as user-data option to euca-run-instances command. Configuration consists of executing several scripts at boot time. One to configure additional network interfaces, the other to execute a user-specified shell script. For more details see NEuca Overview.

Bulding guest image with NEuca tools


You should obtain a Eucalyptus-friendly pre-existing basic bootable image as the starting point. Pointers to them are available on the "Extras" tab of your Eucalyptus portal, once you login. Several software packages must be installed on the image for NEuca guest tools to function:

  • GNU Make
  • Python 2.6 and up
  • Python-boto - frequently available as a distribution-specific package (python-boto).
  • Python-ipaddr - available mostly as source.

Installing onto the image

There are a number of ways to install additional software on the existing image. We describe one here as an example. It consists of several steps. Most operations require sudo privileges:

  • Mount existing image on a loopback device
    $ sudo mount -t auto -o loop,rw image-name /where/image/is/mounted
  • Copy the necessary software onto the image
    $ sudo cp neuca-py.tar.gz ipaddr.tar.gz /where/image/is/mounted/root/
  • Chroot into the image
    $ sudo chroot /where/image/is/mounted
  • Install prerequisites using distribution-standard tools like yum or apt-get (example below is for Debian/Ubuntu images):
    # apt-get install python python-boto
  • ipaddr can be installed simply by
    # tar -zxf ipaddr.tar.gz
    # cd ipaddr
    # python install
  • Install neuca-py scripts. Grab the latest tagged release using anonymous subversion checkout or download the attached tar file. The makefile does its best to guess the distribution you are running so it can perform the necessary steps. Currently images based on Debian and RedHat derivatives should work.
    # cd /root
    # tar -zxf neuca-py.tar.gz
    # cd neuca-py
    # make install
  • Exit from chrooted environment
    # exit
  • Unmount the image
    $ sudo umount /where/image/is/mounted
  • Upload and register the image to Eucalyptus as usual. Note its EMI.
  • Create a NEuca .ini-formatted configuration file and instantiate a VM based on this EMI as described in the overview section.


Sometimes when running in chrooted environment things don't work quite like expected. Doing the following step should make things easier (before you chroot)

$ cp /etc/resolv.conf /where/image/is/mounted/etc/
$ mount -o bind /dev /where/image/is/mounted/dev/
$ mount -t proc none /where/image/is/mounted/proc/
$ sudo /usr/sbin/chroot /where/image/is/mounted