Join us at engage.eucalyptus.com
Happy New Year to everyone on this forum!
I launched a KVM instance based on a bootable CentOS 5.7 image from Openstack with euca-run-instance command, that has two file systems, /boot Linux file system with ID=83, and root (/) LVM file system with ID=8e.
Now after I have installed some softwares and run some experiments on the running instance, I want to use euca-bundle-vol command to bundle the runnning VM, and then publish it into Openstack Glance imaging server as a new image so that new instances spawned from that image will automatically inherit the new softwares and data.
But the problem is if I bundle the root file system together the boot file system, it will report the error "unable to copy files" unless I exclude the /boot file system with "-e /boot" option.
For example, without excluding /boot, it would fail
euca-bundle-vol -c ${EC2_CERT} -k ${EC2_PRIVATE_KEY} -u ${EC2_USER_ID} --ec2cert ${EUCALYPTUS_CERT} --no-inherit -v / -d /mnt/bundle -e /mnt -r x86_64 -s 10240 -p new-server
Unable to copy files
After excluding /boot, it would succeed:
euca-bundle-vol -c ${EC2_CERT} -k ${EC2_PRIVATE_KEY} -u ${EC2_USER_ID} --ec2cert ${EUCALYPTUS_CERT} --no-inherit -v / -d /mnt/bundle -e /mnt,/boot -r x86_64 -s 10240 -p new-server
Tarring image
Encrypting image
......
Generating manifest /mnt/bundle/new-server.manifest.xml
I am sure I have more than enough disk space on /mnt for a 10G image.
So my question is whether it is even possible to bundle a running instance that has two separate root and boot file systems? I am deeply appreciated if anyone can give me any hints?
Thanks a lot!
Josh
Let me answer my own.
Seems it is impossible to use euca-bundle-vol to bundle a VM instance having / and /boot in two different partitions. Even though you did bundle it into a new cloud image by excluding /boot, but new instance spawned from it will fail to boot complaining unable to find boot device at booting time.
Eventually I gave up the attemp to bundle a running Openstack instance with separate root and boot partitions. After that I just recreated a new CentOS 5.7 image with single root file system. Now I am able to rebundle a running VM and spawn new instance from the rebundled image.
Yes, you can hot bundle this style of server, but you need a special boot kernel. I am not sure how eucalyptus handles this yet but i wrote a guide to do this on AWS:
http://www.dowdandassociates.com/content/howto-hot-bundle-running-citrix...
also, make sure /boot is mounted (run mount by itself to check... most linuxes don't mount it by default)