Bharat Kumar 052c24c4d1 CLOUDSTACK-702: Multiple ip ranges in different subnets.
This feature enables adding of guest ip ranges (public ips)  form different subnets.

In order to provide the dhcp service to a different subnet we create an ipalias on the router. This allows the router to listen to the dhcp request from the guest vms and respond accordingly. Every time a vm is deployed in the new subnet we configure an ip alias on the router. Cloudstack uses dnsmasq to provide dhcp service. We need to configure the dnsmasq to issue ips on the new subnets. Added a new class dnsmasqconfigurator which generates the dnsmasq confg file, this file replaces the old config in the router.

The details of the alias ips are stored in db in the nic_ip_alias table. Every time a new subnet is added one of the ip from the subnet is used to configure the ip alias.

I have pushed the code to  https://github.com/bvbharatk/cloud-stack/tree/Cloudstack-702 , also rebased the code with master.
I need to test the code for advanced sg enabled network using kvm.

I have added the unit test
Marvin tests are at https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=53e4965

Also accomodated some of the changes suggested by koushik.
corrected the import statements. renamed the IpAlias command to createIpAlias command.

This feature supports only ipv4
2013-05-13 17:06:44 +05:30
..
2012-09-06 11:05:09 -07:00
2012-07-04 18:45:08 -04:00
2011-05-20 17:52:27 -07:00
2012-07-04 18:45:08 -04:00

1. The buildsystemvm.sh script builds a 32-bit system vm disk based on the Debian Squeeze distro. This system vm can boot on any hypervisor thanks to the pvops support in the kernel. It is fully automated
2. The files under config/ are the specific tweaks to the default Debian configuration that are required for CloudStack operation.
3. The variables at the top of the buildsystemvm.sh script can be customized:
	IMAGENAME=systemvm # dont touch this
	LOCATION=/var/lib/images/systemvm #
	MOUNTPOINT=/mnt/$IMAGENAME/ # this is where the image is mounted on your host while the vm image is built
	IMAGELOC=$LOCATION/$IMAGENAME.img
	PASSWORD=password # password for the vm
	APT_PROXY= #you can put in an APT cacher such as apt-cacher-ng
	HOSTNAME=systemvm # dont touch this
	SIZE=2000 # dont touch this for now
	DEBIAN_MIRROR=ftp.us.debian.org/debian 
	MINIMIZE=true # if this is true, a lot of docs, fonts, locales and apt cache is wiped out

4. The systemvm includes the (non-free) Sun JRE. You can put in the standard debian jre-headless package instead but it pulls in X and bloats the image. 
5. You need to be 'root' to run the buildsystemvm.sh script
6. The image is a raw image. You can run the convert.sh tool to produce images suitable for Citrix Xenserver, VMWare and KVM. 
   * Conversion to Citrix Xenserver VHD format requires the vhd-util tool. You can use the 
       -- checked in config/bin/vhd-util) OR
       -- build the vhd-util tool yourself as follows:
           a. The xen repository has a tool called vhd-util that compiles and runs on any linux system (http://xenbits.xensource.com/xen-4.0-testing.hg?file/8e8dd38374e9/tools/blktap2/vhd/ or full Xen source at http://www.xen.org/products/xen_source.html).
           b. Apply this patch: http://lists.xensource.com/archives/cgi-bin/mesg.cgi?a=xen-devel&i=006101cb22f6%242004dd40%24600e97c0%24%40zhuo%40cloudex.cn.
           c. Build the vhd-util tool
               cd tools/blktap2
               make
               sudo make install
   * Conversion to ova (VMWare) requires the ovf tool, available from 
       http://communities.vmware.com/community/vmtn/server/vsphere/automationtools/ovf
   * Conversion to QCOW2 requires qemu-img