X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=cirros-testvm%2Fsrc-cirros%2FREADME;fp=cirros-testvm%2Fsrc-cirros%2FREADME;h=16837025b5856e0567306cf4499810ad2a8ca673;hb=b0a0f15dfaa205161a7fcb20cf1b8cd4948c2ef3;hp=0000000000000000000000000000000000000000;hpb=c6ac3cd55ee2da956195eee393b0882105dfad4e;p=packages%2Ftrusty%2Fcirros-testvm.git diff --git a/cirros-testvm/src-cirros/README b/cirros-testvm/src-cirros/README new file mode 100644 index 0000000..1683702 --- /dev/null +++ b/cirros-testvm/src-cirros/README @@ -0,0 +1,56 @@ +This is a project to build a small cloud image that has useful tools and +function for debugging or developing cloud infrastructure. + +The following works on Ubuntu 14.04 LTS. + +To use it, you would do something like: + * get the build dependencies: + $ ./bin/system-setup + + * bzr branch lp:cirros + * cd cirros + + * download buildroot and setup environment + $ br_ver="2015.05" + $ mkdir -p ../download + $ ln -snf ../download download + $ ( cd download && wget http://buildroot.uclibc.org/downloads/buildroot-${br_ver}.tar.gz ) + $ tar -xvf download/buildroot-${br_ver}.tar.gz + $ ln -snf buildroot-${br_ver} buildroot + + * optionally update src/etc/ssl/certs/ca-certificates.crt + This is not required, but can be done to make sure its up to date. + Doing so requires cvs. + # ./bin/mkcabundle > src/etc/ssl/certs/ca-certificates.crt + + * apply any local cirros patches to buildroot + ( cd buildroot && QUILT_PATCHES=$PWD/../patches-buildroot quilt push -a ) + + * download the buildroot sources + $ make ARCH=i386 br-source + + * Build buildroot for a given arch + # ARCH should be set to 'i386', 'x86_64' or 'arm' + $ make ARCH=i386 OUT_D=$PWD/output/i386 + + This will do a full buildroot build, which will take a while. The output + that CirrOS is interested in is output/i386/rootfs.tar. + That file is the full buildroot filesystem, and is used as input for + subsequent steps here. + + * Download a kernel to use. + The kernel input to bundle must be in deb format. The ubuntu '-virtual' + kernel is used as a starting point. + + # kver is newest -updates kernel from https://launchpad.net/ubuntu/+source/linux + $ kver="3.19.0-20.20~14.04.1" + $ ./bin/grab-kernels "$kver" + + * build disk images using bin/bundle + $ sudo ./bin/bundle -v --arch=$ARCH output/$ARCH/rootfs.tar \ + download/kernel-$ARCH.deb output/$ARCH/images + + * Then, test using the images + $ kvm -drive file=disk.img,if=virtio -curses + $ kvm file=blank.img,if=virtio -curses \ + -kernel kernel -initrd initrd -drive -append "debug-initrd"