Eucalyptus Faststart 3.4.1 – cloud-in-a-vm on Fedora 19

Eucalyptus 3.4.1 is releasing soon, I mean, very soon. So, as a part of testing Eucalyptus Faststart, we used Fedora 19 box to try out Eucalyptus.

Cloud-in-a-vm, eh?

The journey wasn’t so bad, but I did have to touch couple of things that I never used, things that I did a while back and forgot, things I didn’t know and so on. But this morning our QA lead Victor Iglesias helped with the missing parts, in other words the reason of my suffering for a while.

Anyway, so, here is what I did to get a cloud running in a vm on a Fedora 19 box.

Installed Fedora 19 on a core i5 Dell Inspiron laptop. It is better to have some free space in the volume group while installing Fedora. We will be creating a 100GB logical volume (LV) for the cloud VM later on. Also, if there is unallocated space available in the HDD, we can use that space for the LV.

The first thing I did is disabled selinux from /etc/selinux/config

For this setup, I decided to install the @virtualization from the base group installer to keep things simpler.

yum install @virtualization

Since we will have to run AWS-like instances inside a VM, we need to enabled the nested-kvm feature from kvm_intel module. By default nested kvm is off in most of the systems.

Open/Create the following file, /etc/modprobe.d/kvm-nested.conf and add this line,

options kvm_intel nested=1

Reboot the system to enable this nested virtualization feature.

Ensure that we have nested kvm enabled,

cat /sys/module/kvm_intel/parameters/nested

“Y” represents nested kvm availability.

More on nested-kvm, here.

Now we have to create bridge (e.g br0) for the VMs.

Once the VM setup is complete, it’s almost time to start the Faststart VM.

For this setup we used a 100GB logical volume (LV).

lvcreate -L 100G -n "fslv" "volumegroup"

If there is only unallocated space available on the HDD but no free space in the volume group, create a partition (e.g /dev/sda3). Then create physical volume and extend volume group,

pvcreate /dev/sda3
vgextend "volumegroup" /dev/sda3

Uncomment the following lines in /etc/libvirt/qemu.conf file,

vnc_listen = ""
vnc_password = "<password>"
user = "root"
group = "root"

Restart libvirtd service,

systemctl restart libvirtd.service

Copy the faststart-3.4.1.iso to /var/lib/libvirt/images/ directory.

Create a 3 liner script or run these commands manually,

virsh undefine fs
dd if=/dev/zero of=/dev/fedora/fslv bs=1M count=1
virt-install --name fs --cpu host-passthrough --disk /dev/fedora/fslv --ram 4000 --cdrom $1 --graphics vnc,listen= --bridge br0

Make sure, to pass the iso file after –cdrom if you are running the above lines manually, otherwise pass the iso file as a argument with the script.

Connect to the instance with Fedora Remote Desktop Viewer or any other you like and follow the instruction to install Eucalyptus. For this installation I selected cloud-in-a-box to have all the component in the same box. This might take a while, so make sure you are caffeine enabled.

When the installation is completed, reboot the VM. In this case, you might have to start the VM again.

virsh --connect qemu:///system
virsh # start fs

It will now configure the Eucalyptus cloud and within couple of minutes an Eucalyptus cloud will be ready with one basic image and one load-balancer image.

Connect the Eucalyptus hybrid user console with the VMs IP,

User Credentials:
  * Account:  demo
  * Username: admin
  * Password: password

By default Eucalyptus Faststart installation creates admin and demo credentials.

Follow the Eucalyptus documentation to discover Eucalyptus more.

More on cloud in a vm:

Enable SSH on Fedora 16

A very quick post, I needed after a fresh Fedora 16 install.

Enable sshd service.

$ systemctl enable sshd.service

start sshd service

$ systemctl start sshd.service

check sshd status if needed.

$ systemctl status sshd.service

restart sshd service, when needed.

$ systemctl restart sshd.service

stop sshd service and duck down 😛

$ systemctl stop sshd.service

well, make sure you have port 22 open.

$ system-config-firewall

….and that’s all for this quick note.