Install-multiple-versions: Difference between revisions

From Xen
Jump to navigationJump to search
Line 47: Line 47:


The version of Xen toolstack has to match with the version of Xen kernel you are using.
The version of Xen toolstack has to match with the version of Xen kernel you are using.

So you need to go to the installation folder for the specific version of xen toolstack and run the xen-related commands, such as xl.
So you need to go to the installation folder for the specific version of xen toolstack and run the xen-related commands, such as xl.
Since you boot into Xen 4.6.0, you can run the following commands to list the domain informations.
Since you boot into Xen 4.6.0, you can run the following commands to list the domain informations.

cd ${INSTALL46}
cd ${INSTALL46}

./sbin/xl list
./sbin/xl list


NB: If you find the domain 0's name is (null), you need to run the xen-init-dom0 to initialize the domain 0 in xenstore. In the above example, you need to run the following commands:
NB: If you find the domain 0's name is (null), you need to run the xen-init-dom0 to initialize the domain 0 in xenstore. In the above example, you need to run the following commands:

cd ${INSTALL46}
cd ${INSTALL46}

./lib/xen/bin/xen-init-dom0
./lib/xen/bin/xen-init-dom0

Reference
[1] Question about the best practice to install two versions of Xen toolstack on the same machine. http://www.gossamer-threads.com/lists/xen/devel/432095

Revision as of 20:29, 25 May 2016

Purpose of this page

Sometimes, you may want to install two versions of Xen (e.g., Xen-4.6.0 and Xen-4.7.0) on the same host. In order to do that, you need two install two versions of the xen kernel and the xen-tools.

This wiki will describe how to use two different versions of Xen on the same host.

Notations and Assumptions

This wiki assumes Ubuntu 12.04 as dom0.

We use SRC46 to represent the path to the source code of Xen 4.6.0, for example, /home/username/xen-4.6.0;

We use SRC47 to represent the path to the source code of Xen 4.7.0, for example, /home/username/xen-4.7.0;

We use INSTALL46 to represent the path to the installation path for Xen 4.6.0, for example, /home/username/install/xen460;

We use INSTALL47 to represent the path to the installation path for Xen 4.7.0, for example, /home/username/install/xen470;

How to install two versions of Xen on the same host

Step 1: Install two versions of the Xen kernel under /boot; You just need to install the two xen kernels into /boot on the host;

The commands to install one version of Xen kernel are as follows:

cd ${SRC46} configure --prefix=${INSTALL46} --sysconfdir=${INSTALL46}/etc --enable-rpath make sudo make install-xen

cd ${SRC47} configure --prefix=${INSTALL47} --sysconfdir=${INSTALL47}/etc --enable-rpath make sudo make install-xen

Step 2: Configure the grub entry for each version of Xen.

Step 3: Install Xen toolstack into the installation folder for each version: cd ${SRC46} make install-tools

cd ${SRC47} make install-tools

Now you have install two versions of Xen kernels and Xen toolstacks into your host.

You can reboot your system and select one version, say, Xen 4.6.0.

The version of Xen toolstack has to match with the version of Xen kernel you are using.

So you need to go to the installation folder for the specific version of xen toolstack and run the xen-related commands, such as xl. Since you boot into Xen 4.6.0, you can run the following commands to list the domain informations.

cd ${INSTALL46}

./sbin/xl list

NB: If you find the domain 0's name is (null), you need to run the xen-init-dom0 to initialize the domain 0 in xenstore. In the above example, you need to run the following commands:

cd ${INSTALL46}

./lib/xen/bin/xen-init-dom0

Reference [1] Question about the best practice to install two versions of Xen toolstack on the same machine. http://www.gossamer-threads.com/lists/xen/devel/432095