1999 The Central Ohio Linux User Group. // All rights reserved. // Released under the GPL, v. 2. See: LICENSE.TXT // This file: template/header.php // // // echo "\n"; print ""; echo "\n"; echo ""; echo ""; echo "Rossberry.com - The Home of the Mobile Linux Lab"; if ($title != "") { echo " -- $title"; } echo "\n"; // The next line lets us link the header page below // the top ditrectory, and have the buttons work // RPH -- 011124 echo ""; // // scheme://user:pass@host:port/path?query#fragment // //$REQUEST_URI = $_SERVER[REQUEST_URI]; $url=parse_url("$REQUEST_URI"); $svr=$url[host]; //$svr="www.rossberry.net"; $svr="www.rossberry.com"; $server = $server_name ; print ""; ?>


Home of the Mobile Linux Lab

Home Overview Philosophy Infrastructure
Version Control Blogs Files cfengine

Creating our first vm - the buildserver

This will be the largest vm that we build. Since I want to be able to move it around and back it up, I create it as an image based vm. You will need at least 20G in /var/lib/xen/images on dom0 (or / if you just have 1 file system). I'm aiming all of this at paravirt images so (unfortunately) we can't build directly from an ISO or image. We have to copy the media content into dom0 and use either nfs or Apache to serve it out to be built. While I don't usually build any other vm's from dom0, it turns out to be handy to have a backup build environment. I've tried using nfs to export this build environment to buildhost (after it is built) to cut disk usage. I don't like it that way because then my buildhost is not self contained. And it means I have to run nfs or Apache on dom0 (see the discussion under dom0).

I usually use Apache, so (assuming I have a DVD on /media/cdrom)

yum -y install httpd
chkconfig httpd on
service httpd restart
cd /media/cdrom
rsync -av . /var/www/html/centos-5.5-x86_64

If you want to use my buildhost kickstart, then copy it into /var/www/html/buildhost.ks. You can use the graphical virt-manager tool to create the vm, or you can do it from the command line with a command similar to

virt-install -n buildhost -r 512 --arch=x86_64 --os-type=linux
--os-variant=rhel5 -p -l http://VIRTUAL_IP_OF_DOM0/centos-5.5-x86_64 -x ks=http://VIRTUAL_IP_OF_DOM0/buildhost.ks -f
/var/lib/xen/images/buildhost.img -s 20 -w network:hostonly

You will also need to adjust the ip inside the kickstart file to match the virtual ip of dom0.

This creates a 64 bit vm called buildhost with 512M of RAM and a 20G disk drive in /var/lib/xen/images. More details on customizing buildhost are given in the DHCP setup, Named (DNS) setup, and Cobbler (build system) setup pages.

If you looked at the buidhost.ks kickstart file before you used it (you did look, right??) you will see that iptables is enabled, with only ssh allowed. While this might seem hard to justify in a disconnected lab, where else are we going to learn? So if you went ahead and did the Apache, dns, dhcp, and cobbler setups, you will find that you can only access them from build host itself. The 'cheat' way is to turn iptables off. But then we don't get the 'growth pain' that comes from figuring it out. So leave iptables on and add tcp port 80, tcp port 21551, udp port 67 and tcp and udp port 53. Here is what I'm running in /etc/sysconfig/iptables.

The installation of cobbler requires some packages from the EPEL and rpmforge repositories. I keep these (and other rpms that we will build later) in a "tools" repo on the buildhost. Once you have the buildhost up and Apache installed, create /var/www/html/tools and copy the Cobbler tarball into the directory and unpack it. Install the createrepo package and then run createrepo in /var/www/html/tools. You will need to create an /etc/yum.repos.d/tools.repo file on each machine that you want to utilize this repository


1999 The Central Ohio Linux User Group. // All rights reserved. // Released under the GPL, v. 2. See: LICENSE.TXT // This file: template/footer.php // print "

"; // print " \n \n \n "; // $url=parse_url("$REQUEST_URI"); $scheme = $url[scheme]; $host = $url[host]; $whereami = $url[path]; $basename = exec("basename $whereami"); $REFERRER=exec("basename $whereami .php"); $SMURF = exec(" ls | grep $REFERRER | grep txt "); if ($SMURF != "") { ## echo ""; ## This next line of code opens the displayed code in a new window when uncommented echo ""; echo "\"View of "; echo ""; echo "$basename"; } else { print "\n"; print "\n"; } // print " Contact mll@rossberry.com Copyright\n © 2010, 2011 Jim Wildman.\n "; print "
All rights reserved.
"; ?>