As the previous post mentioned, now it's time to talk about running Xen-based VMs that we created from scratch.
It was hard for us to figure out how to make it work. The truth is that we are still having problems. But at least something is working now.
Basically, since we used Xen instead of KVM (due to hardware limitations) several issues arose, since both people and linux distributions are running towards KVM. However, we didn't give up and at the end we succeeded in running our VMs - but not without effort.
Most of our problems were Xen configuration-related (running kernel, ramdisk and filesystem from local files rather than using a Xen bootloader) instead of Eucalyptus-related. However, it doesn't matter, since both softwares have to work together in order to have a good final product. Moreover, as Gastón mentioned before, the documentation is still unsatisfactory.
Well, let's describe our Debian installation first.
Installation of Debian5.0 (Lenny).
Basically we used the "virt-install" script as you can see below.
# virt-install --prompt
What is the name of your virtual machine? debian
How much RAM should be allocated (in megabytes)? 256
What would you like to use as the disk (file path)? debian.img
How large would you like the disk (debian.img) to be (in gigabytes)? 1
What is the install URL? http://mirror.csclub.uwaterloo.ca/debian/dists/stable/main/installer-i386/
Starting install...
So far so good... We used a default installation. (like Windows -> Next, Next, Finish).
After the OS installation, we logged into the machine through the Xen hypervisor and installed two packets: apache and ssh server (just to say that our VM has something different).
After that, we turned off the VM. Then, it was time to extract the root filesystem and upload it to eucalyptus.
Please note that this is not a trivial method and it might not work for different distros. The idea was to use a pair
# parted debian.img
GNU Parted 1.8.1
Using /vm/debian.img
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) U
Unit? [compact]? b
(parted) p
Model: (file)
Disk /vm/debian.img: 1073741823B
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32256B 954132479B 954100224B primary ext3 boot
2 954132480B 1069286399B 115153920B extended
5 954164736B 1069286399B 115121664B logical linux-swap
(parted) q
# nohup dd if=debian.img of=rootfs.img skip=32256 count=954100224
The file is now ready (rootfs.img) to be uploaded to Eucalyptus.
That's all for this post. We will explain more details later.
Until next post,
Lucio
No comments:
Post a Comment