Getting Started with XenRT

From Xen
Jump to navigationJump to search

XenRT Installation and Basic Operation

These instructions are based upon installation to a Debian Wheezy (7.0) 64-bit host. Other versions of Debian may work, however they have not been tested.

Please note that XenRT installation will update many OS level settings etc, and it is recommended that it is installed on a dedicated host (e.g. a VM), to avoid causing any problems to other services on the host.

Required steps are:

1. Configure sudo to work without a password for your user account

2. Ensure you have contrib and non-free selected in your apt configuration, and source packages available

3. Install essential build packages:

  sudo apt-get install build-essential

4. Create some required directories:

  sudo mkdir -p /local/inputs/windows
  sudo chown -R `id -un`:`id -gn` /local/

5. Extract the tests tarball to create /local/inputs/tests:

  cd /local/inputs
  tar -xzf /path/to/tests.tgz

6. Extract the main xenrt tarball to create ~/xenrt.hg:

  cd ~/
  tar -xzf /path/to/xenrt.tgz

7. Enter xenrt.hg, and copy the sample configuration file:

  cd xenrt.hg
  cp build/config.mk.sample build/config.mk

8. Perform the initial XenRT setup:

  make minsetup

The last step will download lots of required Debian packages (if you are on a slow connection / don't have a local Debian mirror this may take some time!), and perform the initial XenRT setup (which includes certain bits of compilation etc). At one stage you may be asked what method you wish to start the apt-cacher daemon - choose 'manual'.


If you encounter errors associated with packages, ensure you have followed step 2 and enabled contrib, non-free, and source packages.


You can test that the XenRT installation has succeeded by trying to get a XenRT shell - this is done by running "xrt -V --shell" - after some verbose log text and a note about no target being specified, you should find a shell prompt that looks like: XenRT interactive Python shell. >>>

Exit this prompt by pressing ctrl-D.

You are now ready to run your first test - for simplicity we will assume you have an existing machine with XenServer installed (while XenRT is able to install machines, this requires more advanced setup which will be documented elsewhere). While most tests require configuration for guest operating systems, for now we are going to choose a simple test that retrieves a system status report from the host.


The host you are using will need to be configured with the root password 'xensource' for this test (the configuration can be updated to use other passwords if required).


To execute the test, create a new directory to hold the results and run: xrt -V --existing <ip of host> --testcase xenserver.tc.host.TC6859


This will:

- Connect to the host
- Identify the version of XenServer in use
- Copy over some required scripts to the host
- Run the test
- Collect logs from the host
- Report the results

Log files will be put into a subdirectory called logs