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>
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>
* 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>
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>
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>
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>
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>
file. If that is not specified, then xm will pass the XAUTHORITY
environment variable back to xend instead. This is not sufficient,
since it is possible that XAUTHORITY is not set at all. This doesn't
cause a problem for most X apps, because xlib will use the fall-back of
$HOME/.Xauthority. But the viewer is started from xend, which almost
certainly doesn't have a reasonable HOME variable.
We fix this by always passing some value for
XAUTHORITY. In order of preference, that value is:
1. Use the value from the config file, if specified.
2. Use the value from the XAUTHORITY env variable, if set.
3. Use $HOME/.Xauthority, if HOME is set.
4. Look up the user's home directory via getpwuid, and append
"/.Xauthority"
Signed-off-by: Charles Coffing <ccoffing@novell.com>
cannot use the socket.
This closes a security hole, and fixes the intermittent failure
of xm-test/06_list_nonroot.test.
c.f. xen-unstable changeset 9205:faa1eb1621b9 (same bug, different socket).
Signed-off-by: Ewan Mellor <ewan@xensource.com>
such domain) inside each of the public-facing functions. This fixes the
Internal errors seen when specifying an invalid domain.
domain_pincpu takes cpumap, which is a list, not a string, so there's no need
to try and split it up. Fixes xm vcpu-pin.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
under Python 2.3; traceback.format_exc was introduced in 2.4, so we can't use
it.
Added some exception logging.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
XEND_INVALID_DOMAIN faultType.
2) Fix exception logic in XMLRPCServer
3) Fix TCP server
4) Remove catching of ProtocolError in main.py. ProtocolErrors only occur
when there is an exception in the exception handling code which shouldn't
ever happen. I've reproduced the error cases described by Ewan with
xend_domain_setTargetMemory and once I fixed the exception logic, I get a
normal faultType of 1 as would be expected.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
when a domain is specified by the user that does not exist. Added a few
error codes -- many more to come, I expect.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
UnixXMLRPCRequestHandler through to TCPXMLRPCServer.
Do not log requests -- this fills up xend-debug.log uselessly.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
This changeset introduces a new XML-RPC service that runs in Xend and the
required changes to have xm use this new service by default.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
dom0. This allows you to bind devices to the backend driver *after*
dom0 has booted. You are no longer required to specify the devices to
hide on the kernel command-line. Using the bind/unbind driver
attributes (see /sys/bus/pci/drivers/pciback), you can specify which
devices that the PCI backend will seize. There are three new driver
attributes in that directory:
slots - lists all of the PCI slots that
the PCI backend will try to seize
new_slot - write the name of a slot here
(in 0000:00:00.0 format) to have the PCI
Backend seize the device in this slot
remove_slot - write the name of a slot here to have
the PCI Backend no longer try to seize a
device in this slot
Note that writing to new_slot/remove_slot does not actually change
whether the PCI Backend is actually bound to the device in that slot or
not. Instead, it tells the PCI backend which slots it should be
interested in. The sysfs attributes "bind" and "unbind" (which are
common to all drivers, not just the PCI Backend) must be used to
actually add or remove a device from the PCI backend driver. Note that
the syntax for specifying a device to bind and unbind is very strict (do
not append a newline).
For Example:
# Add a new slot to the PCI Backend's list
echo -n 0000:01:04.d > /sys/bus/pci/drivers/pciback/new_slot
# Now that the backend is watching for the slot, bind to it
echo -n 0000:01:04.d > /sys/bus/pci/drivers/pciback/bind
# Unbind a PCI network card from its network driver
echo -n 0000:05:02.0 > /sys/bus/pci/drivers/3c905/unbind
# And now bind it to the PCI Backend
echo -n 0000:05:02.0 > /sys/bus/pci/drivers/pciback/new_slot
echo -n 0000:05:02.0 > /sys/bus/pci/drivers/pciback/bind
Unfortunately, Linux makes it possible to remove (unbind) a PCI device
from the PCI backend while that device is attached to a driver domain.
It is also possible to unload the PCI Backend module while a PCI
Frontend is attached. DON'T DO EITHER OF THESE ACTIONS. This patch will
output warnings if you do try and do these. Be aware that while access
to the configuration space of the device has been revoked, the driver
domain can still access the I/O resources of the device as they have not
been revoked (although I *hope* to explore adding support for this
soon). Before unloading the module or unbinding a device, shutdown your
driver domain.
These patches also convert a few function and variable declarations to
static (no sense in polluting the global namespace with local function
names) and rename a few structures in drivers/xen/pciback/pci_stub.c.
Signed-off-by: Ryan Wilson <hap9@epoch.ncsc.mil>
and watch teardown being run concurrently from multiple threads, silencing
the No such file or directory error when tearing down the control/shutdown
watch, and reducing load on the store.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
cause: qemu network related info is not saved in xenstore, so after
reboot, this information is missing, and qemu can not start network.
Signed-off-by: Haifeng Xue <haifeng.xue@intel.com>
- Aligned output and help to fit within 80 char limit
- User now deals in milliseconds instead of nanoseconds
- Fixed some missing parens in tests (I had pushed stale versions)
- Updated tests to deal with period/slice/latency in ms
root@bebop:~/xm-test.sedf/tests/sedf # xm sched-sedf
Name ID Period(ms) Slice(ms) Lat(ms) Extra Weight
Domain-0 0 20.0 15.0 0.0 1 0
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
interface parameters are always used, so there's no need for them to be named
parameters with defaults.
Remove unused httpserver.getRoot and getPort, and simplify the main request
loop. This means that socket errors do not have to be squelched.
Coalesce the two identical bind methods, one in UnixHttpServer, one in
UnixListener. Fix this bind method to set the permissions on the socket
explicitly. This closes a security hole, and fixes the intermittent failure
of xm-test/06_list_nonroot.test.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
params.XEND_DEBUG value itself. This removes the need for addLogStderr and
removeLogStderr. Remove the maxBytes and backupCount parameters to init, as
they are unused and we only use the hardcoded values anyway.
Signed-off-by: Ewan Mellor <ewan@xensource.com>