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>
occurs in xend. Currently, the parsing is hard-coded; it expects that
the desired number is on the first line. My patch is more robust; it
lets values be retrieved by a label. It also exposes a few functions to
retrieve the current allocation and the target allocation.
By abstracting this a little better, I'll be able to address a few
other issues in subsequent patches. Mostly, this allows for better
error checking and guidance for the user. For example, by exposing
get_dom0_current_alloc(), we can (elsewhere, in a later patch) calculate
how large of a VM could potentially be started. This is useful, as it
lets simple VM-creation GUIs guide the user towards reasonable memory
values for new VMs.
Signed-off-by: Charles Coffing <ccoffing@novell.com>
-Displays current parameters for running domains ala xm list
-Allow users to set one or more parameters without having to
provide values for parameters they do not wish to change
-Adds additional testing of sched-sedf via new xm-test testcases.
With this patch applied, test 02_sedf_period_lower_neg.py exposes a
bug. I'll follow up this email with a patch for the bug.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
where an interrupt (irq) can be specified in the configuration file
and permission to bind to that interrupt will be given to a driver
domain.
This functionality could be used when trying to give a legacy device
to a driver domain. For example, by specifying the i/o ports and the
interrupt of your serial controller, you can use this patch to put a
serial port in a driver domain. This was discussed briefly on
xen-users in regards to using an external modem in a domU:
http://article.gmane.org/gmane.comp.emulators.xen.devel/20573http://article.gmane.org/gmane.comp.emulators.xen.user/8754
Also adds the ability to specify irqs on the xm command-line when
creating a domain (the following examples show a serial port being
given to a domU):
xm create serial-dd irq=4 ioports=03f8-03ff
or in a flat config-file:
irq = [4]
ioports = ['03f8-03ff']
or in an SXP config file:
(device (irq (irq 4)))
(device (ioports (from '0x03f8')(to '0x03ff')))
The ioports functionality is already in xen, but this patch also fixes a
bug with it that I assume cropped up due to changes in xend since it was
submitted ('dev' doesn't exist in iopif.py, returning 'None' seems to be
the solution).
Also adds some in-line documentation in tools/python/xen/xm/create.py
to be more accurate regarding adding pci devices and i/o ports on the
command-line.
Signed-off-by: Ryan Wilson <hap9@epoch.ncsc.mil>
turn detail off when doing vcpu-list. This avoids calls to xenstore just to
get the list of domains for the vcpu-list call, significantly increasing
performance of that command on loaded systems.
Closes bug #545.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
list of domains each time XendDomainInfo.refresh is called, and spawning
threads for each shutdown still in progress, we watch the control/shutdown
node and spawn just the one thread immediately. When the daemon starts (say
after a crash) all domains are checked for entries in the store indicating a
reboot in progress.
This avoids a large cost on the store and in threads when the list of domains
is refreshed. This happens every time the server is queried, so the cost can
be quite high. It's especially a high cost when using xm shutdown -a -w --
this operation should perform a lot better now.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
does expose a bug in xenstored when it is killed & restarted, but that
is not caused by this code.
My sincere appology to Ke Yu for the long wait and assuming his code
was broken. His code was perfectly fine. Its just that my test scripts
did something for a historical reason that I should have removed a long
time ago.
Signed-Off-By: Leendert van Doorn <leendert@watson.ibm.com>
an incorrect path to a file-backed VBD (disk image) or the file-backed
VBD does not exist.
Without this patch, if someone mis-types the path to the disk image,
he/she would have no indication as to what's wrong when the domain
fails to get created.
Signed-off-by: Khoa Huynh <khoa@us.ibm.com>
Guest configuration files may now contain a features= declaration
listing the features which should be enabled in a | separated
list.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
This option is disabled by default, only if we have "pae=1" in config
file, cpuid will return PAE available to VMX guest, and Linux PAE VMX
guest need this. Once the PAE VMX guest support is stable, we will
enable it by default.
Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Replace the old pciif DevController class with a new one that
configures the PCI backend. A util class detects the resource usage of
the specified PCI devices and pciif interacts with Xen to permit a
driver domain to directly access those physical I/O resources.
Signed-off-by: Ryan Wilson <hap9@epoch.ncsc.mil>
avoid message "Error creating domain: (0, 'Error')" in the case
domU version is too old or too new.
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
able to detect the reason why a frontend is created, which can be either
due to domain creation or a restore. The attached patch now puts this
functionality into XenD and allows driver implementations in Xend to
read the state and see whether a domain is currently being resumed or
created and write this value into the xenstore for hotplug scripts to
read it. The state of a domain being resumed is set when a
XendDomainInfo object is created and reset at the end of the restore
function.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>