Browse code

if using lxc, use cirros rootfs image

The cirros 'uec' image contains a kernel, a ramdisk, and a rootfs.
However, the rootfs is empty. cirros copies its ramdisk to it on its first
boot. That means, if you try this with lxc, there is no filesystem for
lxc to boot.

So, in the case of lxc, import the rootfs image, which is a populated
ext3 filesystem, which is what nova lxc expects.

Change-Id: I3ada380c61044a08697b0a964a962b269ea5224c

Scott Moser authored on 2011/12/17 00:29:10
Showing 1 changed files
... ...
@@ -58,7 +58,12 @@ CITEST_BRANCH=master
58 58
 #      http://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-rootfs.img.gz
59 59
 #IMAGE_URLS="http://smoser.brickies.net/ubuntu/ttylinux-uec/ttylinux-uec-amd64-11.2_2.6.35-15_1.tar.gz" # old ttylinux-uec image
60 60
 #IMAGE_URLS="http://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img" # cirros full disk image
61
-IMAGE_URLS="http://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-uec.tar.gz" # uec style cirros image
61
+case "$LIBVIRT_TYPE" in
62
+    lxc) # the cirros root disk in the uec tarball is empty, so it will not work for lxc
63
+        IMAGE_URLS="http://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-rootfs.img.gz";;
64
+    *)  # otherwise, use the uec style image (with kernel, ramdisk, disk)
65
+        IMAGE_URLS="http://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-uec.tar.gz";;
66
+esac
62 67
 
63 68
 # allow local overrides of env variables
64 69
 if [ -f ./localrc ]; then