Version 31 (modified by ibaldin, 6 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 (or look here), 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.
  • python-netaddr
  • python-daemon

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 python-netaddr python-daemon
  • 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 if you wish to test it.
  • If you are using ImageProxy, download the kernel and ramdisk matching your filesystem, create an ImageProxy XML metafile, take its SHA-1 signature so you can use it with ORCA slice requests.
  • Create a NEuca .ini-formatted configuration file and instantiate a VM based on this EMI as described in the overview section.

Using neuca tools

The tools are constantly updated. Issuing command

$ neuca

will produce a list of available neuca commands


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

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

Before you unmount your image you should reverse some of the steps above:

$ sudo umount /where/image/is/mounted/proc
$ sudo umount /where/image/is/mounted/dev
$ sudo umount /where/image/is/mounted