CSS Corp Open Source Services

Archive for March 2010

UEC: Bundling Windows Image

leave a comment »

Creating new disk image

This will be the main HDD in the virtual image, so make sure to give it as much space as you’ll need. Since we’re building a kvm image, we can use a qcow2 format for disk images. Qcow2 is an expandable image format, so it’ll only take as much storage space as it’s actually used within the image.

$ kvm-img create -f qcow2 win-2k3.img 20G

OS Installation

Get the iso file of the Windows distribution to be installed in the image. And start the installation process.

$sudo kvm -m 1024 -cdrom Win2003_cd1.iso -drive file=win-2k3.img,if=scsi,boot=on -nographic -vnc :0

After finishing the installation and in case the installation needs 2nd CD as well, reboot the VM and launch the VM by the following command.

$ sudo kvm -m 1024 -boot c -cdrom Win2003_cd2.iso -drive file=win-2k3.img,if=scsi,boot=on -nographic -vnc :0

Once installation is complete, create the boot disk needed for Windows 2003 server. Read the rest of this entry »

Written by kiranmurari

March 29, 2010 at 9:46 am

UEC: Attach EBS volume to a running instance

leave a comment »

Linux Instances

First create a volume of the required size using euca-create-volume

$ euca-create-volume -s 10 -z mycloud
VOLUME  vol-333C04B8    10       creating        2010-03-26T05:20:56.383Z

Check the available volumes and their status with euca-describe-volumes

$ euca-describe-volumes
VOLUME  vol-333C04B8    10   mycloud   available     2010-03-26T05:20:56.383Z

Now attach the volume to a running instance using euca-attach-volume

$ euca-attach-volume -i i-41620887 -d /dev/sdb vol-333C04B8

The volumes status changes from “available” to “in-use” if it is attached properly.

$ euca-describe-volumes
VOLUME  vol-333C04B8    10  mycloud in-use  2010-03-26T05:41:28.019Z
ATTACHMENT      vol-331F04B2    i-41620887      unknown,requested:/dev/sdb  2010-03-26T05:43:51.343Z

Read the rest of this entry »

Written by kiranmurari

March 26, 2010 at 11:58 am

UEC: Bundling Linux Image

leave a comment »

Creating a new disk Image

This will be the main HDD in the virtual image, so make sure to give it as much space as youll need. Since were building a kvm image, we can use a qcow2 format for disk images. Qcow2 is an expandable image format, so itll only take as much storage space as its actually used within the image.

$ kvm-img create -f qcow2 image.img 5G

OS Installation

Download the iso file of the Linux distribution you want installed in the image.

$ wget http://releases.ubuntu.com/karmic/ubuntu-9.04-server-amd64.iso

And start the installation process:

$ sudo kvm -m 256 -cdrom ubuntu-9.04-server-amd64.iso -drive file=image.img,if=scsi,index=0 \
-boot d -net nic,vlan=0,model=e1000,macaddr= 00:16:3e:de:ad:01 -net tap -nographic -vnc :0

If your installation process requires more than 256MB of RAM change the -m option, and if you need more processors available, you can use the -c option.

Read the rest of this entry »

Written by kiranmurari

March 23, 2010 at 8:12 pm

Eucalyptus: Not enough resources: vm instances

with one comment

Issue:

FinishedVerify: Not enough resources: vm instances.

Reasoning:

This issue arises if the node controller is not registered with the cluster controller or if there are no free VMs available to launch the instance.

Solution:

In case, the node controller is not registered, the output of “euca-describe-availability-zones verbose” will show zero free and max VMs as below.

$ euca-describe-availability-zones verbose
 AVAILABILITYZONE        mycloud       A.B.C.D
 AVAILABILITYZONE        |- vm types     free / max   cpu   ram  disk
 AVAILABILITYZONE        |- m1.small     0000 / 0000   1    128     2
 AVAILABILITYZONE        |- c1.medium    0000 / 0000   1    256     5
 AVAILABILITYZONE        |- m1.large     0000 / 0000   2    512    10
 AVAILABILITYZONE        |- m1.xlarge    0000 / 0000   2   1024    20
 AVAILABILITYZONE        |- c1.xlarge    0000 / 0000   4   2048    20

Register the node controller with the following command and add the discovered nodes.

$ sudo euca_conf --no-rsync --discover-nodes

Read the rest of this entry »

Written by kiranmurari

March 22, 2010 at 11:36 am

UEC: CC and NC on a single machine

with 5 comments

Working on Ubuntu Enterprise Cloud, I  was wondering if both CC and NC could run on a single machine. Ofcourse, this is not a recommended UEC topology for production use, but thought of giving it a try. Moreover, for experimenting purposes this would be an ideal case, not requiring too many hardware resources. So here goes the process….

Eucalyptus Packages
The eucalyptus packages that form the core part of UEC are:

  • eucalyptus-cloud – Elastic Utility Computing Architecture – Cloud controller
  • eucalyptus-cc – Elastic Utility Computing Architecture – Cluster controller
  • eucalyptus-walrus – Elastic Utility Computing Architecture – Walrus (S3)
  • eucalyptus-sc – Elastic Utility Computing Architecture – Storage controller
  • eucalyptus-nc – Elastic Utility Computing Architecture – Node controller

Cluster Controller Installation
1. Install UEC using Ubuntu Server 9.10 CD.
2. During installation, select Cluster installation. NC installation can be done after this.
3. Select the same “eth0” interface as public and private interface.
4. Specify some arbitrary IP address range for Public IPs (say 192.168.1.101-192.168.1.200). This can later be changed in /etc/eucalyptus/eucalyptus.conf.

As I selected to install Ubuntu Enterprise Cloud. So eucalyptus-cloud, eucalyptus-cc, eucalyptus-walrus, eucalyptus-sc packages will be automatically installed. If Install Ubuntu Server is selected, these packages need to be installed after installing Ubuntu Server using apt-get.

$ sudo apt-get install eucalyptus-cloud eucalyptus-cc eucalyptus-walrus eucalyptus-sc

Read the rest of this entry »

Written by kiranmurari

March 19, 2010 at 12:02 pm