Fix for file injection is broken on centos computes with Cirros images LP #1587960
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / README
1 This is a project to build a small cloud image that has useful tools and
2 function for debugging or developing cloud infrastructure.
3
4 The following works on Ubuntu 14.04 LTS.
5
6 To use it, you would do something like:
7  * get the build dependencies:
8    $ ./bin/system-setup
9
10  * bzr branch lp:cirros
11  * cd cirros
12
13  * download buildroot and setup environment
14    $ br_ver="2015.05"
15    $ mkdir -p ../download
16    $ ln -snf ../download download
17    $ ( cd download && wget http://buildroot.uclibc.org/downloads/buildroot-${br_ver}.tar.gz )
18    $ tar -xvf download/buildroot-${br_ver}.tar.gz
19    $ ln -snf buildroot-${br_ver} buildroot
20
21  * optionally update src/etc/ssl/certs/ca-certificates.crt
22    This is not required, but can be done to make sure its up to date.
23    Doing so requires cvs.
24    # ./bin/mkcabundle > src/etc/ssl/certs/ca-certificates.crt
25
26  * apply any local cirros patches to buildroot
27    ( cd buildroot && QUILT_PATCHES=$PWD/../patches-buildroot quilt push -a )
28
29  * download the buildroot sources
30    $ make ARCH=i386 br-source
31
32  * Build buildroot for a given arch
33    # ARCH should be set to 'i386', 'x86_64' or 'arm'
34    $ make ARCH=i386 OUT_D=$PWD/output/i386
35
36    This will do a full buildroot build, which will take a while. The output
37    that CirrOS is interested in is output/i386/rootfs.tar.
38    That file is the full buildroot filesystem, and is used as input for
39    subsequent steps here.
40
41  * Download a kernel to use.
42    The kernel input to bundle must be in deb format. The ubuntu '-virtual'
43    kernel is used as a starting point.
44
45    # kver is newest -updates kernel from https://launchpad.net/ubuntu/+source/linux
46    $ kver="3.19.0-20.20~14.04.1"
47    $ ./bin/grab-kernels "$kver"
48
49  * build disk images using bin/bundle
50    $ sudo ./bin/bundle -v --arch=$ARCH output/$ARCH/rootfs.tar \
51       download/kernel-$ARCH.deb output/$ARCH/images
52
53  * Then, test using the images
54    $ kvm -drive file=disk.img,if=virtio -curses
55    $ kvm file=blank.img,if=virtio -curses \
56       -kernel kernel -initrd initrd -drive -append "debug-initrd"