Difference between revisions of "Getting Started with XenRT"

From Xen
(Created page with "== 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…")
 
m
 
(One intermediate revision by the same user not shown)
Line 9: Line 9:
   
 
Required steps are:
 
Required steps are:
  +
 
1. Configure sudo to work without a password for your user account
 
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
+
2. Ensure you have contrib and non-free selected in your apt configuration, and source packages available
  +
 
3. Install essential build packages:
 
3. Install essential build packages:
 
sudo apt-get install build-essential
 
sudo apt-get install build-essential
  +
 
4. Create some required directories:
 
4. Create some required directories:
 
sudo mkdir -p /local/inputs/windows
 
sudo mkdir -p /local/inputs/windows
 
sudo chown -R `id -un`:`id -gn` /local/
 
sudo chown -R `id -un`:`id -gn` /local/
  +
 
5. Extract the tests tarball to create /local/inputs/tests:
 
5. Extract the tests tarball to create /local/inputs/tests:
 
cd /local/inputs
 
cd /local/inputs
 
tar -xzf /path/to/tests.tgz
 
tar -xzf /path/to/tests.tgz
  +
 
6. Extract the main xenrt tarball to create ~/xenrt.hg:
 
6. Extract the main xenrt tarball to create ~/xenrt.hg:
 
cd ~/
 
cd ~/
 
tar -xzf /path/to/xenrt.tgz
 
tar -xzf /path/to/xenrt.tgz
  +
 
7. Enter xenrt.hg, and copy the sample configuration file:
 
7. Enter xenrt.hg, and copy the sample configuration file:
 
cd xenrt.hg
 
cd xenrt.hg
 
cp build/config.mk.sample build/config.mk
 
cp build/config.mk.sample build/config.mk
  +
 
8. Perform the initial XenRT setup:
 
8. Perform the initial XenRT setup:
 
make minsetup
 
make minsetup
Line 34: Line 41:
 
etc). At one stage you may be asked what method you wish to start the apt-cacher
 
etc). At one stage you may be asked what method you wish to start the apt-cacher
 
daemon - choose 'manual'.
 
daemon - choose 'manual'.
  +
   
 
If you encounter errors associated with packages, ensure you have followed step
 
If you encounter errors associated with packages, ensure you have followed step
 
2 and enabled contrib, non-free, and source packages.
 
2 and enabled contrib, non-free, and source packages.
  +
   
 
You can test that the XenRT installation has succeeded by trying to get a XenRT
 
You can test that the XenRT installation has succeeded by trying to get a XenRT
Line 42: Line 51:
 
and a note about no target being specified, you should find a shell prompt that
 
and a note about no target being specified, you should find a shell prompt that
 
looks like:
 
looks like:
 
 
XenRT interactive Python shell.
 
XenRT interactive Python shell.
 
>>>
 
>>>
Line 54: Line 62:
 
for now we are going to choose a simple test that retrieves a system status
 
for now we are going to choose a simple test that retrieves a system status
 
report from the host.
 
report from the host.
  +
   
 
The host you are using will need to be configured with the root password
 
The host you are using will need to be configured with the root password
Line 59: Line 68:
 
passwords if required).
 
passwords if required).
   
To execute the test, create a new directory to hold the results and run:
 
   
  +
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
 
xrt -V --existing <ip of host> --testcase xenserver.tc.host.TC6859
  +
   
 
This will:
 
This will:
Line 72: Line 82:
   
 
Log files will be put into a subdirectory called logs
 
Log files will be put into a subdirectory called logs
  +
  +
[[Category:XenRT]]

Latest revision as of 06:15, 24 October 2013

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