Commit Graph
1305 Commits
Author SHA1 Message Date
Anthony Liguori 744e7a3189 Expose the exception thrown by xen.lowlevel.xs. 2006-06-01 12:13:11 +01:00
emellor@leeni.uk.xensource.com a56b4a5a4b Reraise exceptions caught in create.py, so that the error handling in main.py
can handle it neatly.

Signed-off-by: Daniel Miles <daniel.t.miles@hp.com>
2006-06-01 11:57:33 +01:00
kaf24@firebug.cl.cam.ac.uk affc898c83 The xm dmesg command wasn't taking the -c/--clear options because of
incorrect values to arg_check(). Patch simply allows for the possible
option with arg_check().

Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
2006-05-31 07:48:54 +01:00
kaf24@firebug.cl.cam.ac.uk 3903e920a1 Rename csched -> sched_credit/sched-credit in control plane.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-05-27 10:13:27 +01:00
ack@kneesa.uk.xensource.com 46ecd27056 New weighted fair-share CPU scheduler w/ automatic SMP load balancing
Signed-off-by: Emmanuel Ackaouy <ack@xensource.com>
2006-05-26 11:14:36 +01:00
kaf24@firebug.cl.cam.ac.uk 22490ab62b [XEND] Wait sufficient time for memory to balloon out before creating a new domain.
On the ES7000 when Dom0 boots up with all of system memory and you try
to bring up a DomU with more than 2GB of memory, xend times out before
the memory is freed causing the domain not to be created. This patch
increases the timeout depending on the amount of memory that needs to be
freed. It also places a cap on the sleep time so that it does not grow
without a limit. This fixes bug# 650

http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=3D650

Signed-off-by: Aravindh Puthiyaparambil
<aravindh.puthiyaparambil@unisys.com>
2006-05-25 21:41:04 +01:00
kaf24@firebug.cl.cam.ac.uk 29a0da72ab [XEND] Remember cpu-pinning information across guest restarts.
Signed-off-by: Qing He <qing.he@intel.com>
2006-05-25 14:45:40 +01:00
emellor@leeni.uk.xensource.com e73effa056 Allow a guest to determine its VM UUID.
Use xenstore-read $(xenstore-read vm)/uuid.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-05-23 16:23:10 +01:00
emellor@leeni.uk.xensource.com 43af8d669f Added get_permissions implementation.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-05-23 16:14:49 +01:00
emellor@leeni.uk.xensource.com 8b8e97bb5b Fix xspy_get_permissions -- you can't increment the perms pointer when
iterating and expect to be able to free that pointer afterwards.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-05-23 16:14:03 +01:00
kaf24@firebug.cl.cam.ac.uk 9892f9d1aa [IA64] Work around auto-ballooning changes.
Original patch from Kevin Tian at Intel.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-05-22 17:30:25 +01:00
kaf24@firebug.cl.cam.ac.uk 630ad4e0ad [ACM] Replace the union structure parameter of the ACM hypercalls
with command-specific request structures. It aligns the ACM
hypercalls with the way parameters are passed in the event channel
hypercalls.

Advantages include backward-compatibility regarding old guests when
new calls are added and clarity of the code.

Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-05-21 19:05:31 +01:00
Anthony Liguori 0111c4bb06 Expose the exceptions thrown by xen.lowlevel.xc so they can be caught.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2006-05-19 17:31:28 +01:00
kaf24@firebug.cl.cam.ac.uk 37d3005e62 [XEND] An empirical and more conservative memory-overhead estimate for PV and HVM guests.
This patch calculates the overhead needed for HVM domains.  If HVM is
supported by the hardware, I add a little ballooning overhead to
paravirtualized VMs also, to avoid low-memory situations.  (There are
various unchecked alloc_domheap_pages calls in shadow*.c that I am
trying to avoid tripping over for now...)  The values in this patch work
fine on 32 bit; I may update them later based on feedback and/or testing
on 64 bit.

Signed-off-by: Charles Coffing <ccoffing@novell.com>
2006-05-19 16:08:51 +01:00
kaf24@firebug.cl.cam.ac.uk 0a44ca5991 [XEND] separate concept of initial memory size and overhead memory size.
When a domain (whether para- or fully-virtualized) reports how much
overhead memory it requires (via getDomainMemory in image.py), all such
memory was immediately allocated to the domain itself.  This is
certainly incorrect for HVM domains, since additional
increase_reservation calls are made later in qemu.  Since all ballooned
memory is already taken, qemu will fail.  The fix is to treat the
requested memory size and the overhead size as separate values.  The
requested memory size is immediately allocated to the new domain; the
overhead is left unallocated for whatever else might need it later.

Signed-off-by: Charles Coffing <ccoffing@novell.com>
2006-05-19 16:07:36 +01:00
kaf24@firebug.cl.cam.ac.uk b75af341bd This patch adds a boolean parameter 'network' to the save method of the
XendCheckpoint class to differentiate between network suspend/resume
(network=True) and local suspend/resume (network=False).
Instead of passing the 'live' parameter to the migration methods, this
'network' parameter is passed now. This ends up being merely a renaming
of the parameter.
A check with the xm-test suite against this change has resulted in no
additional errors.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-05-10 16:52:55 +01:00
kaf24@firebug.cl.cam.ac.uk cf6a9db5e6 The PciController class lacks a configuration method to re-generate the
configuration of an existing domain. This is needed for a domain to be
able to reboot and retain its PCI device configuration. This patch adds
such support.

Thanks to Mike Wright for reporting this problem and working with me to
fix it.

Signed-off-by: Ryan Wilson <hap9@epoch.ncsc.mil>
2006-05-10 16:07:46 +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 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
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 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
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
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
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
emellor@leeni.uk.xensource.com d4184d7e40 Continue to diagnose the device state, even if Xend has crashed.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-04-20 17:16:27 +01:00
emellor@leeni.uk.xensource.com abd30192c0 This patch enables external devices, such as for example a mounted hard
drive image or a TPM, to be migrated to a remote machine. The patch
hooks into the checkpointing (XendCheckpoint.py) code and performs
migration in 4 different steps:

In a 1st step (step = 0 in the code) migration of all devices of a
domain is 'tested', that means their driver implementations (blkif.py,
netif.py, tpmif.py, usbif.py, pciif.py) are queried whether migration is
possible at all. Currently all device representations respond with a
'yes' (=0), although probably a VM mounting a hard drive partition
should respond with a 'no' (-1) already. This first step is a quick
check to see whether devices can be migrated.

The 2nd step is to do whatever can be done before the domain is
suspended. At this point migration of the device could be initiated, if
at all possible.

The 3rd step is to migrate a device after the domain has been suspended,
meaning that it is not scheduled anymore and the VM is 'settled'. All
devices are called again and a good implementation would initiate the
migration in a background process to achieve as much concurrency as
possible.

The 4th step is to synchronize with the 3rd step. At this point the
implementor has to make sure that anything that was initiated in step 3
has completed. Once all steps 4 have been processed, the VM will resume
on the remove machine.

I have implemented hooks for migration of a virtual TPM in
xen/xend/server/tpmif.py. These hooks call a configurable external
migration tool using the os.popen() call with a fixed command line
parameter set. The implementation refuses to migrate a VM attached to a
virtual TPM if no tool has been provided for migration.
All other devices do not currently overload the 'migrate' method defined
in the DevController.py and therefore will just let migration happen.

I have added hooks for error recovery such that whatever part of
migration has been initiated can be rolled back when any of the devices
fail to migrate in one of the steps. The interface (in tpmif.py) to the
external application now uses os.popen() to allow error handling by
reading the application's output.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-04-14 21:22:09 +01:00
Ryan Harper 73b491c2a0 Allow cpus parameter to xm create to accept a range string by removing the
restriction of cpus accepting only integers.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
2006-04-14 21:15:38 +01:00
kaf24@firebug.cl.cam.ac.uk e59a11f58d Fix stack corruption in the libxs python interface. domid_t is a short;
instead use uint32_t like we do in xc.c.

Signed-off-by: John Levon <john.levon@sun.com>
2006-04-13 19:14:11 +01:00
kaf24@firebug.cl.cam.ac.uk b5fa90ac8e build: Clean up use of .PHONY
* Move .PHONY directives next to targets,
  this makes them a lot harder to miss
* Add missing .PHONY directives
* Remove nonexistent .PHONY directives
* Hopefully I didn'T miss anything...

Signed-Off-By: Horms <horms@verge.net.au>
2006-04-10 17:02:49 +01:00
emellor@leeni.uk.xensource.com 224cab0dfd Merged. 2006-04-10 16:36:03 +01:00
emellor@leeni.uk.xensource.com 913843e16b Fix call to server, using new XendClient syntax.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-04-10 16:26:23 +01:00
emellor@leeni.uk.xensource.com 9a74026a08 I used the wrong operator in a couple places for putting together some
error messages out of format strings. This patch corrects those
operators and fixes the strings.

Signed-off-by: Ryan Wilson <hap9@epoch.ncsc.mil>
2006-04-10 14:47:51 +01:00
emellor@leeni.uk.xensource.com 45bd0044c4 Factor out the parsing of XAUTHORITY, so that it can be used by the unit test,
and fix that test to use it.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-04-06 14:22:52 +01:00
emellor@leeni.uk.xensource.com d5ed151f12 Fix test to match change to DCE formatting of UUIDs.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-04-06 14:21:45 +01:00
emellor@leeni.uk.xensource.com d220279c33 Further workarounds for the broken string marshalling in xmlrpclib. Regardless
of the encoding used, one still may not include non-printable characters in an
XML document.  When a dmesg contains a ^D character, something seen on one of
our test machines, an invalid XML document is generated.

Use a trick by David Mertz to work around this -- escape the string using
Python's repr function.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-04-06 00:59:06 +01:00
emellor@leeni.uk.xensource.com c0693d2c6e Workaround bug in xmlrpclib's string escaping. That library outputs invalid
UTF-8 if given a string containing high-bit characters, so instead pass in
Unicode strings, for which the escaping is correct.

This fixes a bug seen when the dmesg of a machine contains high bit characters,
but I'm sure there are other ways in which it might be triggered.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-04-04 11:08:20 +01:00
emellor@leeni.uk.xensource.com cb52e35a60 Merged. 2006-04-03 23:58:40 +01:00
emellor@leeni.uk.xensource.com 2df295f268 Lookup backend by name _or_id_. This is important for domain 0, for example!
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-04-03 23:57:42 +01:00
emellor@leeni.uk.xensource.com d0263f0fa4 Fix cpus string parsing, wrt use of ^ to remove elements.
Patch from Satoshi Uchida <s-uchida@ap.jp.nec.com>.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-04-03 18:39:21 +01:00
tkuik@tkuik-lnx2.cisco.com d2a5e52e8c Allow a domain other than Domain-0 to be a backend.
Signed-off-by: Tim Kuik tkuik@cisco.com
2006-04-03 18:23:00 +01:00
kaf24@firebug.cl.cam.ac.uk d057bf8506 When dom0 fails to balloon enough memory to allow a new domain to start,
an exception is thrown.  The test that decides which exception to throw
is backwards, resulting in strange error messages.  The attached patch
fixes the problem.

Signed-off-by:  Charles Coffing <ccoffing@novell.com>
2006-04-01 10:52:47 +01:00
kaf24@firebug.cl.cam.ac.uk e5829dcbe1 Plumb network vif credit-based rate limiting thorugh xenbus
and xend into xm guest config files.

A new vif parameter 'rate' is supported, with an optional time window
paremeter for specifying granularity of credit replenishment. The default
window is 50ms. For example:

 'rate=10Mb/s'  'rate=250KB/s'  'rate=1MB/s@20ms'

From: Chris Clark <christopher.w.clark@gmail.com>

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-31 15:34:52 +01:00