From: Konrad Rzeszutek Wilk Date: Fri, 14 Jun 2013 18:19:50 +0000 (-0400) Subject: README: Add the initial README file. X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=6974eff64f252201ce7316e03697c72d2d113508;p=xentesttools%2Fbootstrap.git README: Add the initial README file. Signed-off-by: Konrad Rzeszutek Wilk --- diff --git a/README b/README new file mode 100644 index 0000000..a601c81 --- /dev/null +++ b/README @@ -0,0 +1,130 @@ + +This Xen Testing Toolkit is a very small system designed to build +Linux and Xen hypervisor very fast and very small. It also extracts +some binaries for the user-space components to make it possible +to run programs. + +To build this you need to run this under Fedora Core 13 as the RPMs +that are extracted are Fedora Core 13 based. + + +1). Get a build environment. + +First step is to get the chroot environment. You can build it yourself +or you can get one that has been already created by going to: + + http://darnok.org/xen/amd64.tgz + +If you are thinking to do these builds in your home directory, extract +it in a folder that is appropriate: + +[konrad@localhost ~]$ mkdir $HOME/amd64 +[konrad@localhost ~]$ cd $HOME/amd64 +[konrad@localhost ~]$ sudo tar -xf ~/amd64.tgz + +The "sudo" is necessary b/c some of the files that are created need to have +the appropriate permissions. + +When done, consult the amd64/README file and see what you need to do to +chroot in the build directory. + +2). Fetch the rest. + +Once you are in the chrooted environment (in /build), you need to fetch +the rest of the sources that this system needs. For that, please enter: + + FC-64 git clone git://xenbits.xensource.com/xentesttools/bootstrap.git + Initialized empty Git repository in /build/bootstrap/.git/ +.. + FC-64 cd bootstrap/ + FC-64 make fetch + +which should fetch various git targets. Depending on your speed this can +take ~15 minutes. + +3). Build + +Once the fetching off all the different sources has been completed, then +you need to compile it. For that, just type: + +FC-64 make + +The initial build will also select the .config option of the kernel based +on the linux.config (in your bootstrap directory) file. The Linux kernel +and its object files (and modules) ends up in linux-build. + +The build is silent, so you won't see any messages unless GCC complains +about warnings or errors. + +4). Use the XTT + +Once the build is completed you can use the XTT output. The initial +build will create in the "dist" directory three different outputs: + + a). root_image.iso + +This is a very simple ISO image. It can burnt on a CD-ROM or you can +use it to boot an PVHVM guest in Xen. For example with this guest +configuration: + + kernel = "/usr/lib/xen/boot/hvmloader" + builder='hvm' + memory=1024 + maxvcpus = 3 + serial='pty' + vcpus = 2 + name="bootstrap-x86_64-pvhvm" + disk = [ 'file:/home/konrad/amd64/build/dist/root_image.iso,hdc:cdrom,r'] + boot="dn" + vif = [ 'mac=00:0F:4B:00:00:68' ] + vnc=1 + vnclisten="0.0.0.0" + usb=1 + +You can launch the newly built XTT image. (xl create -c bootstrap/test-hvm.vm) + + b). dist/common/vmlinuz,initramfs.cpio.gz + +Those are the two files that can be used to launch this as a PV guest. + + extra="console=hvc0 debug earlyprintk=xen loglevel=8 initcall_debug" + kernel="/home/konrad/amd64/dist/common/vmlinuz" + ramdisk="/home/konrad/amd64/dist/common/initramfs.cpio.gz" + memory=1024 + vcpus=2 + maxvcpus=3 + name="bootstrap-x86_64" + on_crash="preserve" + vif = [ 'mac=00:0F:4B:00:00:68' ] + vnc=1 + vnclisten="0.0.0.0" + + b). root_image-pxe.tar + + Said file can be used in a PXE environment to boot a Xen + initial domain + system. For that you need to configure a DHCPd and setup an PXE environment. + + *TODO: Explain tftpboot, dhcpd, etc?* + + +You can either use the serial/hvc0 console to access it or SSH in. To +setup your SSH keys and such look in bootstrap/debugspace/ssh_stuff/README. + +5). Questions. + +Q: I am tired of using that newly generated SSH key all the time. How can I +put my own SSH key on the root image? +A: See bootstrap/debugspace/root/ssh_stuff/README + +Q: I would like to execute 'xl info' or run some program during startup + automatically. +A: In bootstrap/debugspace/ add a file called 'init.late' (chmod to 755) and + have in it: + + > more /init.late + #!/bin/sh + + xl info + +Q: I want to tweak the things that are started. +A: Edit bootstrap/rc.d/init.d/rcS diff --git a/test-hvm.vm b/test-hvm.vm new file mode 100644 index 0000000..5518823 --- /dev/null +++ b/test-hvm.vm @@ -0,0 +1,13 @@ +kernel = "/usr/lib/xen/boot/hvmloader" +builder='hvm' +memory=1024 +serial='pty' +vcpus = 2 +maxvcpus = 3 +name="bootstrap-x86_64-pvhvm" +disk = [ 'file:/home/konrad/amd64/dist/root_image.iso,hdc:cdrom,r'] +boot="dn" +vif = [ 'mac=00:0F:4B:00:00:68, bridge=switch' ] +vnc=1 +vnclisten="0.0.0.0" +usb=1 diff --git a/test.vm b/test.vm new file mode 100644 index 0000000..b9e5c92 --- /dev/null +++ b/test.vm @@ -0,0 +1,12 @@ +extra="console=hvc0 debug earlyprintk=xen loglevel=8 initcall_debug" +kernel="/home/konrad/amd64/dist/common/vmlinuz" +ramdisk="/home/konrad/amd64/dist/common/initramfs.cpio.gz" +memory=1024 +vcpus=2 +maxvcpus=3 +name="bootstrap-x86_64" +on_crash="preserve" +vif = [ 'mac=00:0F:4B:00:00:68' ] +vnc=1 +vnclisten="0.0.0.0" +