Buildbot Setup for Virtual Machines - Red Hat 6 x86

The following steps were used to create a Red Hat 6 x86 buildslave.

Initial Setup

cd vms
qemu-img create -f qcow2 vm-rhel6-x86-base.qcow2 8G
kvm -m 1024 -hda vm-rhel6-x86-base.qcow2 -cdrom ../iso/red-hat/rhel-server-6.0-i386-dvd.iso -redir 'tcp:22275::22' -boot d -smp 2 -cpu qemu32,-nx -net nic,model=virtio -net user

When the VM boots. Go through the prompts.

Re-initialize the drive, when prompted.

Set the Hostname to "rhel6-x86".

Configure Network, set eth0 to "Connect Automatically"

Set the root password.

Set partitioning type to: Use All Space

Don't encrypt the partitions (just adds overhead).

Select "Write Changes to Disk" on the popup that appears.

Set the software set to "Virtual Host".

After clicking next on the install-type page, the installation will finally start.

After installation completes, click reboot. Then shutdown the VM.

Serial Console Setup

Login as root.

Add to /boot/grub/menu.lst:

also add in menu.lst to kernel line (after removing 'quiet'):

Add login prompt on serial console:

Create buildbot account

With the network up and running, it's time to add a user so that we don't have to login as root all the time.

Now logout and then ssh to the VM as the buildbot user. On my local box I added the following to my /.ssh/config file to make logging in easier:

With the above in place I can simply type:

...to connect to the vm.

RHN and Updates

Register the system with RHN:

Choose defaults when registering. After the process is complete:

The first time you update you'll be prompted to import some GPG keys from Red Hat. The updating process may take a while, depending on the number of updates and the speed of your Internet connection.

After updating shutdown so we can make more copies.

Image for RPM Build

Wait for the system to boot.

Install compilers etc:

If the "Development Tools" group is not available, the following lines will install the packages from it:

Other packages to install:

Create rpm directories and download 5.0 rpm for shared-compat:

Image for install/test

Install extra dependencies:

This page is licensed: CC BY-SA / Gnu FDL

Last updated

Was this helpful?