Edgewall Software

WrongTrac - this page will be deleted in a few days.


This page is for using VSP Utility domU images (hereafter udom).

What is udom?

udom is a xen virtual machine image which contains VSP Web Console, Spirit Agent and other applications.

Where should I get a udom images?

For time being, you may download both udom.img and udomswap.img from this wiki page.

The ant scripts for generating udom images are under development. You will be able to build your own udom images using ant as following later,

    #cd trunk/installer
    #ant

The output images files can be found at $VSP_HOME/installer/target/disk/udom.img.gz and $VSP_HOME/installer/target/disk/udomswap.img.gz

How to use the udom images

Unzip udom images

Assume that you have copied udom.img.gz and udomswap.img.gz to your dom0's /home/test/udom directory. The first thing you need to do is to unzip them,

   #gunzip udom.img.gz
   #gunzip udomsway.img.gz

After then, you should have two files without .gz.

Update images

You may need to update following settings before you start udom.

  • change ip address, gateway and DNS setting (TO be provided later, assume you are familiar with linux networking)
  • change webconsole configuration file
  • configure ssh btw vspudom and your dom0.
  • etc

The rest of this section will discuss how to update these settings.

Mount root file system

In order to change the settings for udom, you need to mount udom's root file system first.

  • run following command to get next free loop device.
            #losetup -f
         	    /dev/loop2
    
  • assume that the output of "losetup -f" is /dev/loop2, you can use following command to mount root file system at /mnt
        #losetup /dev/loop2 /home/test/udom/udom.img
        #kpartx -av /dev/loop2
        #mount /dev/mapper/loop2p2 /mnt

After change, you need to release resources properly,

        umount /mnt
        kpartx -d /dev/loop2
        losetup -d /dev/loop2

Update udom's root file system

Once the root file system has been mounted, you will be able to change any file in it. Following are some examples,

   # change /etc/resolv.cfg
   vi /mnt/etc/resolv.cfg
   # use yum to install a new package
   chroot /mnt yum install ...
   # create a new account
   chroot /mnt useradd <userid>
   # install a new rpm.
   cp my.rpm /mnt/tmp
   chroot /mnt rpm -i /tmp/my.rpm
   rm -f /mnt/tmp/my.rpm

Change vsp.properties

Once you have mounted the root file system at /mnt, you should find vsp.properties at /mnt/opt/avaya/apache-tomcat-

5.5.26/webapps/webconsole/conf/vsp.properties

The default content of the file,

   software.name=vspwebconsole
   software.version=0.0.1
   software.type=com.avaya.vsp.webconsole

   libvirtd=xen+ssh://root@pitkin.dr.avaya.com

If your dom0's ip address is x.x.x.x, you should change libvirtd property to following,

   software.name=vspwebconsole
   software.version=0.0.1
   software.type=com.avaya.vsp.webconsole

   libvirtd=xen+ssh://root@x.x.x.x

Set SSH Keys

We are using SSH for the communication btw udom and dom0. In order to let Web Console work properly, you need to complete following two configuration,

  • In order to let's your dom0 trust udom. You need to run following command
    	cat /mnt/home/tomcat/.ssh/id_dsa.pub >> /root/.ssh/authorized_keys
    
  • In order to let's udom to trust dom0. You need to run following command
            hostkey=`cat /etc/ssh/ssh_host_rsa_key.pub`
            # pleaes change domain-name and ipaddress to reflect dom0's setting.
    	msg = "${domain-name} ${ipaddress} $hostkey" 
    	echo $msg >> /mnt/home/tomcat/.ssh/known_host
    

Please be noted that we don't recommend our customer to use keys comes with VSP. Instead, our custer should create their own keys.

creat an virtual machine description file

Create a file named "vspudom" under directory /etc/xen with following content,

name = "vspudom"
uuid = "98771500-f0ea-0311-c578-0c88524be5bd"
maxmem = 1024
memory = 1024
vcpus = 1
bootloader = "/usr/bin/pygrub"
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
vfb = [  ]
disk = [ "tap:aio:/home/test/udom/udom.img,xvda,w", "tap:aio:/home/test/udom/udomswap.img,xvdb,w" ]
vif = [ "mac=00:16:3e:27:22:21,bridge=xenbr0" ]

Start udom virtual machine

Once the virtual machine configuration file is under /etc/xen, you can use following command to start udom virtual machine,

    virsh start vspudom

and, you can access vspudom's console by using following command

    virsh console vspudom

The default password for root account is root01.

Guidelines for adding a new component into domU

You may want to add a new component into udom. That is quite straight forward.

  • Add a new inst_xxx.sh file under trunk/installer/udom/scripts, you may follow other inst_* files to learn which environment variable is available and how to call rpm, yum, etc.
  • Follow the example to define inst_xxx.sh in trunk/installer/build.properties
  • Add a new target in trunk/installer/build.xml

Trouble shooting

TBD.