PTLSim Ubuntu

From CAPSWiki

Jump to: navigation, search

Follow the steps provided here to successfully install PTLSim with Xen in Ubuntu. This is tested on Ubuntu 7.10 on Intel Machine.

1. Get the modified Xen source from ptlsim-website.

2. Go to Xen source directory. Goto the 'xen' folder and compile xen using 'make'.

3. Install the compiled xen using 'make install' command. You should have 'xen-3.1.0.gz' and 'xen-syms-3.1.0' files in your '/boot' directory.

4. Now install 'xen' kernel provided from ubuntu repository. Give the following command to install xen kernel

  $ sudo apt-get install linux-xen

It will install and configure the default xen kernel that you can use with the xen we have installed.

5. Now reboot your system into new kernel.

6. Get the modified kernel from ptlsim-website. Install the kernel build tools for Ubuntu system by using this:

   $ sudo apt-get install fakeroot build-essential kernel-package

7. First configure the kernel, you can use the config file of the distro's xen kernel that we installed before from /boot directory.

8. Give the following command to create .deb packages of the kernel.

   $ fakeroot make-kpkg --initrd kernel-image kernel-headers

9. On successful compilation it will create two .deb packages in parent directory. Install both the packages.

10. Now create initrd file for our patched kernel by giving the following command

   $ mkinitramfs -o initrd.img-2.6.23.14-xen0-mytrel compiled-kernel-version-string

Here put the appropriate kernel version.

11. Copy the initrd image to the /boot partition. Now create new grub menu entry in /boot/grub/menu.lst file. Following is a sample grub menu entry that I am using.

  title		Xen 3.1.0 / 2.6.23-xen-mytrel
  root 		(hd0,4)                         --first number is your harddrive, so /dev/sda would be 0, /dev/sdb would be 1 so on, the second number is the partition on the drive.
  kernel		/boot/xen-3.1.0.gz
  module		/boot/xen0-linux-2.6.23.14-2.6.23-mytrel root=UUID=27552b31-907e-4a89-9f48-2ab9fcc04514 ro console=tty0
  module		/boot/initrd.img-2.6.23.14-xen0-mytrel                   --be sure this is MODULE not initrd, or you will get an error saying the kernel must be loaded before the initrd.
  quiet

12. Now reboot your machine in new compiled kernel. After booting give following command to check if installed xen supports ptlsim or not.

   $ cat /sys/hypervisor/properties/capabilities | grep 'ptlsim'

If it doesn't show any output, it means that xen you have installed in incorrect. Please recompile the patched xen source and reinstall.

Personal tools