On 02/06/2015 03:12 PM, Darragh O'Reilly wrote:


not sure if this is the best way ...

# create a backing file
truncate --size 2GB precise-backing-file
losetup -f precise-backing-file
losetup -a
# find what /dev/loopX was used - eg /dev/loop1

mkfs /dev/loop1
mkdir mnt
mount /dev/loop1 mnt
cd mnt
# root tar from https://cloud-images.ubuntu.com/
tar -xvf /vagrant/precise-server-cloudimg-amd64-root.tar.gz
cd ../
umount /dev/loop1

glance image-create --name my-lxc-test --is-public True --disk-format raw 
--container-format bare --progress --file /tmp/precise-backing-file

Thanks!






Dmitry Guryanov dguryanov at parallels.com
Thu Feb 5 14:00:01 UTC 2015

Previous message: [Openstack] error in creating external network
Next message: [Openstack] OpenStack 2014.2.2 released
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

Hello,

Where do people obtain glance images for nova/lxc? Cloud images for KVM
can't run in LXC container because first, image should be slightly
modified (because it doesn't have its own kernel) and also it should be
single FS, not an image with partition table.

The only way which I found to start sort of a container is to download
an image from OpenVZ size, covert it to raw format without partition
table. At least it runs init and some processes, but it doesn't work
completely...



--
Dmitry Guryanov


_______________________________________________
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to     : [email protected]
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack

Reply via email to