Commit Graph
3293 Commits
Author SHA1 Message Date
cl349@firebug.cl.cam.ac.uk 3bd47fb5b6 Fix code which finds the default interface if there are static routes.
The current code will break if there are multiple scope global routes
since the "ip route list default" command doesn't use "default" as a
filter, and will output multiple devices which breaks the rest of the
script.
Also make the vif/xenbr/eth naming consistent, i.e. if your default
network interface is eth1, you get vif1 and xenbr1.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-05-08 10:36:13 +01:00
stekloff@dyn9047022152.beaverton.ibm.com fe913cb392 The buildroot xm-test grabs is no longer present, this patch fixes it.
Made it a minor release bump for xm-test so old ramdisk will work. The
ramdisk is functionally the same.

Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
2006-05-07 21:41:36 +01:00
emellor@leeni.uk.xensource.com 5afd6596ba Fix console runaway detection for the smallmem_neg test, following the changes
to have Console included as part of the Domain object.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-05-07 14:00:05 +01:00
emellor@leeni.uk.xensource.com aed92ee453 Abstract block-attach and block-detach calls, and add to that the correct
polling waiting for the device to connect and disconnect.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-05-07 13:34:45 +01:00
emellor@leeni.uk.xensource.com 4697d093c7 Move the logic to find the Xen Python scripts above the import statements.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-05-06 15:42:12 +01:00
emellor@leeni.uk.xensource.com 30907c5593 Merged. 2006-05-05 18:36:26 +01:00
emellor@leeni.uk.xensource.com c1124c5993 Use the auxbin module to find the appropriate install directory for our Python
scripts.

This fixes a bug with xm-test not working on 64-bit systems.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-05-05 18:36:12 +01:00
emellor@leeni.uk.xensource.com c185594788 Remove ssidref field from test -- this now only works if there is a policy in
place at the time.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-05-05 16:46:48 +01:00
kaf24@firebug.cl.cam.ac.uk c61c155041 Instead of just having the bootloader config sxp replace anything else,
merge with given values.  This will allow a bootloader to not have to
specify everything which is useful for bootloaders other than pygrub.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2006-05-05 14:09:07 +01:00
kaf24@firebug.cl.cam.ac.uk be3309cba2 Fix python pciif script to reference correct 2.0 compatibility variable.
In the Xen 2.0.x compatibility section of xend (where we try to parse
the s-expressions if they came from an SXP configuration file for Xen
2.0.x), the wrong variable is referenced. This fix corrects the python
script to use the correct variable.

Thanks to Mike Wright for reporting this.

Signed-off-by: Ryan Wilson <hap9@epoch.ncsc.mil>
2006-05-05 14:01:43 +01:00
kaf24@firebug.cl.cam.ac.uk 1f516c94dc Replace a bash-specific redirection in tools/ioemu/configure with a
standard POSIX one which allows the Xen tools to be built with a POSIX
shell other than bash.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-05-05 13:58:13 +01:00
stekloff@dyn9047022152.beaverton.ibm.com de2daba817 Add a HOWTO to help writing tests, includes domains with networking.
Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
2006-05-04 14:22:38 +01:00
stekloff@dyn9047022152.beaverton.ibm.com 38a79ca247 Add new networking infrastructure to Xm-Test. The goal is to make
creating domains with networking very easy. This patch:

1) Adds new XenDevice class, with the XenNetDevice subclass. These
   classes represent devices for xm-test and are tied to XenDomains.
   This can eventually be used for block devices as well. Currently,
   devices must be added to domains prior to starting the domain. The
   attach and detach needs to be handled.

2) Adds a new NetConfig class to handle configuring the network
   environment in which the tests run. This patch only handles ranges
   of IPs in a bridged environment. DHCP needs to be added as well as
   handling NAT and routed environments.

3) Modifies XenDomain class to handle XenDevices.

4) Adds new configuration options for defining a range of IPs, their
   network address, and their netmask.

5) Removes the old Network.py and Network class.

6) Modifies the existing tests to use the new infrastructure.

7) Adds some documentation to help creating domains.

Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
2006-05-04 14:22:29 +01:00
emellor@leeni.uk.xensource.com 57a3f4ca82 Second step toward a new network infrastructure, move XmConsole to be
in XenDomain. The devices we will add, like network, will need to run
console commands when a domain is started. So I have made console be
a part of domain object, which it's tied to anyway.

Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
2006-05-04 14:22:17 +01:00
stekloff@dyn9047022152.beaverton.ibm.com 5b27032111 First step to network infrastructure, add a type to XenDomain to identify
it as HVM or PV rather than using the config time option. The forthcoming
XenNetDevice will need to check. This is also the first step toward running
PV and HVM domains at the same time.

Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
2006-05-04 14:20:11 +01:00
emellor@leeni.uk.xensource.com 136423974c Merged. 2006-05-04 14:19:19 +01:00
kaf24@firebug.cl.cam.ac.uk daac965083 Instead of knowing explicitly about the pygrub entry option, allow
passing arbitrary options to the bootloader and deprecate the bootentry
option.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2006-05-03 11:02:30 +01:00
emellor@leeni.uk.xensource.com e5fb08210d Xm-tests 01_memset_basic_pos.test and 03_memset_random_pos.test start
domUs with 64MB of memory,
and assume that all of that memory is available in the domU. They then
perform various xm memset tests
based on the assumed starting conditions.

When netback & blkback are comiled into the domU kernel, they eat about
5MB. This mismatch will cause
01_memset_basic_pos.test to fail every time. 03_memset_random_pos.test
will probably fail, but can
pass with some lucky numbers from the random number generator.

This patch changes both tests to read the starting memory allocation from
the balloon driver in the domU.

Signed-off-by: Jim Dykman <dykman@us.ibm.com>
2006-05-02 18:17:59 +01:00
kaf24@firebug.cl.cam.ac.uk ce375a4e0f Fix perfc array range on reset.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-05-02 15:21:19 +01:00
kaf24@firebug.cl.cam.ac.uk 2d0922d515 Move Linux-specific privcmd code into private libxc implementations.
Make header path for kernel's privcmd/evtchn headers generic.
Remove pointless xi_*() interface that was using private libxc
interfaces.

Signed-off-by: John Levon <john.levon@sun.com>
2006-05-02 15:12:06 +01:00
kaf24@firebug.cl.cam.ac.uk 5308dc5660 Debugging Xend with XEND_DAEMONIZE set to False doesn't work as
expected.  Xend actually creates two children and the XEND_DAEMONIZE  
flag only prevents one of the children from being created.  This  
patch causes none of the children to be created.  With this patch,  
Xend functionality is performed in the process executed from the  
command line (i.e., /usr/sbin/xend).  This patch makes it possible to  
debug Xend with pdb.

Signed-off-by: Randy Thelen <rthelen@netapp.com>
2006-04-30 09:52:59 +01:00
kaf24@firebug.cl.cam.ac.uk 013351bd7a Define new event-channel and physdev hypercalls with a more extensible
interface (the legacy hypercalls would break if subcommands with large
argument structures were added, as it would grow the size of the 
union of all argument structures).

Also, based on a patch from Kevin Tian, add a new physdev op to
signal EOI for a particular irq.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-30 09:16:15 +01:00
vhanquez@kneesa.uk.xensource.com 4fabe234e8 Wait for the device to be connected on the guest (with a 10s timeout)
before detaching it. Fix a race condition that dom0 was tearing down the
block device while the guest was putting it in a Connected state.

Signed-off-by: Vincent Hanquez <vincent@snarc.org>
2006-04-28 16:44:00 +01:00
kaf24@firebug.cl.cam.ac.uk b46bbfc10c Recent GUEST_HANDLE related cset broke ia64 compilation.
Signed-off-by Kevin Tian <kevin.tian@intel.com>
2006-04-28 14:35:34 +01:00
kaf24@firebug.cl.cam.ac.uk 1f401246c1 When boot device is cdrom but the cdrom is not bootable, the guest appears
to hang. This patch fixes this by filling in second- and third-priority
fallback boot devices.

Signed-off by: Chen Jun <chenjunb@lenovo.com>
2006-04-28 14:33:40 +01:00
kaf24@firebug.cl.cam.ac.uk c357fc5967 Revert the xm-test ramdisk patch until we build new initrds.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-28 14:31:47 +01:00
kaf24@firebug.cl.cam.ac.uk 87ffe80ef7 This patch fixes the buildroot for the xm-test ramdisk. The buildroot xm-test
was getting is no longer there, they've pruned the snapshots. This patch
adds a new buildroot and updates the buildroot configuration. I also 
incremented the xm-test release version to 0.8.

Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
2006-04-28 14:13:56 +01:00
kaf24@firebug.cl.cam.ac.uk c57010da2d Instead of relying on xm create to always run the bootloader, make sure
we run it if we get into domain creation with a bootloader set but no
image.  This could happen if someone creates a domain config via the
XML-RPC or sxp interfaces.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2006-04-28 14:11:57 +01:00
kaf24@firebug.cl.cam.ac.uk 7c059c05f5 The features for a domain are more a property of the domain than the
image.  Move them into the domain info so that the image is just the
pieces needed for booting (eg, kernel + initrd + args)

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2006-04-28 14:10:59 +01:00
kaf24@firebug.cl.cam.ac.uk dd8d11c33b The bootloader code doesn't actually have to deal with the vcpu config
anymore as that's just in the domaininfo.  So stop doing so.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2006-04-28 14:09:35 +01:00
kaf24@firebug.cl.cam.ac.uk 0ff716c0b3 When building with FORTIFY_SOURCE to ensure that return codes of common
functions are checked to avoid some bugs, a few warnings pop up and
become errors due to -Werror.  Attached checks the return codes
(or at least stores them to a dummy variable).

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2006-04-28 14:08:40 +01:00
kaf24@firebug.cl.cam.ac.uk 54b4ddf0d1 Rename {SG}ET_XEN_GUEST_HANDLE to {sg}et_Xen_guest_handle, as they
are function macros rather than define/declare macros.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-28 09:40:07 +01:00
kaf24@firebug.cl.cam.ac.uk d6f69f0e01 Fix memory_op hypercall mlock/munlock wrapping after the
GET/SET_XEN_GUEST_HANDLE patch.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-27 19:19:59 +01:00
kaf24@firebug.cl.cam.ac.uk 12f59b30ed Define __XEN_TOOLS__ when building tools. Use this to
automatically build against latest Xen interface version,
and to specifically define GET_XEN_GUEST_HANDLE().

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-27 14:06:41 +01:00
kaf24@firebug.cl.cam.ac.uk 02842d8a2b Bump Xen interface version number to 0x00030201 for new
structural guest handles.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-27 14:03:22 +01:00
kaf24@firebug.cl.cam.ac.uk 704e9ade0f Wrap all GUEST_HANDLEs in structures, and define SET/GET macros to access them
in Linux and libxc.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2006-04-27 13:58:50 +01:00
kaf24@firebug.cl.cam.ac.uk 067abcc949 Check a write() return value in xenbaked.
From: Jeremy Katz

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-27 09:47:05 +01:00
awilliam@xenbuild.aw aaf9402dab merge with xen-unstable.hg 2006-04-25 23:35:55 -06:00
smh22@firebug.cl.cam.ac.uk 2c04b08df9 Add new xml files for policy.
Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-04-24 11:01:41 +01:00
smh22@firebug.cl.cam.ac.uk 655ead6573 This patch updates the documentation and extends the 'xm' man page with
the integrated access control management commands. The man page is a 
good place to start exploring these commands.

Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-04-24 10:59:57 +01:00
smh22@firebug.cl.cam.ac.uk 5ab002b998 This patch integrates the new access control management tools into 'xm'
and 'xend' and supports label/ssid translation support for 
migration/life-migration/resume.

Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-04-24 10:59:17 +01:00
smh22@firebug.cl.cam.ac.uk e7f4f3a1de This patch adds new python access control management scripts, which
integrate into Xen Management and which support the new access control 
labels (labels replace the ssidref numbers at the management user 
interface).

Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-04-24 10:58:25 +01:00
smh22@firebug.cl.cam.ac.uk 2d59e34fc2 This patch deletes the old shell-based security tools.
Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-04-24 10:54:47 +01:00
smh22@firebug.cl.cam.ac.uk 1f11fdecb1 This patch adds support for managing and creating the simplified
policies to the policy generation tools.

Signed-off by: Thomas Lendacky <toml@us.ibm.com>
Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-04-24 10:52:19 +01:00
smh22@firebug.cl.cam.ac.uk 30476c8dba This patch adds support in the hypervisor for the policy name attribute
introduced into security policies. It also fixes a minor problem related 
to handling unsupported boot policies.

Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-04-24 10:51:50 +01:00
smh22@firebug.cl.cam.ac.uk c462e5c2f0 This patch adds a policy name to the policy definition. This policy name
must be unique and must change if the content of the file changes. The 
policy name is used to ensure that the XM tools and the hypervisor work 
on the same policy, i.e., interpret the security information on domains 
consistently. This patch also simplifies the policy management by moving 
policy and labels into a single file.

Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-04-24 10:50:38 +01:00
emellor@leeni.uk.xensource.com df0c8173e2 The attached patch replaces the current numbers identifying the
individual steps of device migration with constants.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-04-21 11:57:34 +01:00
emellor@leeni.uk.xensource.com 3c4f089bd8 This patch adds a test case for local virtual machine migration with a
virtual TPM attached.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-04-21 11:56:40 +01:00
emellor@leeni.uk.xensource.com 23920c55d4 The attached patch allows external devices to migrate. The patch
contains code that allows to at least detect local migration of a
virtual machine and handles this for the virtual TPM (results in a no-op
for local migr.). If migration of a virtual machine with attached vTPM
to another machine is attempted, XenD will return an error.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-04-21 11:54:12 +01:00
kaf24@firebug.cl.cam.ac.uk f9afb49240 Fix python installation on sles10. Install prefix is being
passed along for some reason, so we explicitly redefine it
to nothing.

Signed-off-by: Ryan Grimm <grimm@us.ibm.com>
2006-04-21 09:14:07 +01:00