Commit Graph
1177 Commits
Author SHA1 Message Date
kaf24@firebug.cl.cam.ac.uk 55179ce8a5 Fix 'xm vcpu-list'. List cpumap as 'CPU Affinity'. Use
special descriptive strings for empty and full cpu maps.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-22 10:33:26 +01:00
kaf24@firebug.cl.cam.ac.uk 900a11e8ed cpumap cleanups -- Python now deals with lists of cpus
rather than cpu bitmaps.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-22 08:35:03 +01:00
jrb44@plym.cl.cam.ac.uk 1bd54c9db6 Temporary workaround to xend start problem.
Signed-off-by: James Bulpin <james@xensource.com>
2005-10-21 18:51:42 +01:00
emellor@leeni.uk.xensource.com 3896d075f8 Explicitly delete xc instance, which will hopefully solve the intermittent
failure to start up.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-21 15:31:51 +01:00
emellor@leeni.uk.xensource.com b625626aa7 Merged. 2005-10-21 12:07:14 +01:00
emellor@leeni.uk.xensource.com fb22028e11 Tidy xend-config.sxp, removing entries that haven't been used since the
hotplugging stuff was introduced (block-*, console-port-base, console-address)
and introducing entries for options that have been present for ages
(xend-{http,unix,relocation}-server, xend-unix-path, xend-relocation-address,
enable-dump).  Remove vif-antispoof, as Vifctl no longer passes this option
down.

Made the xend-relocation-server default to no, as this is a potential security
hole and so must be turned on explicitly.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-21 12:04:30 +01:00
emellor@leeni.uk.xensource.com 3a2351fdda Removed xen.util.process, as no-one is using it, and it leaves defunct processes
behind.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-21 11:22:48 +01:00
emellor@leeni.uk.xensource.com aec60dc083 Remove unused Vifctl.vifctl and Vifctl.set_vif_name. Remove the bridge and
antispoof parameters from Vifctl.network -- these are already handled by the
script, so it is redundant to have a separate override for these parameters
coming from outside.  Don't use xen.util.process.runscript, because we don't
need to return the output, and therefore can just use os.spawnl.

Remove XendRoot.get_vif_antispoof, matching change above.

Prefix XendRoot.network_script_dir onto the return value for
XendRoot.get_network_script(), removing that burden from callers.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-21 11:21:05 +01:00
emellor@leeni.uk.xensource.com 174e923813 Output the Xen changeset in the logs at start of day.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-21 11:08:48 +01:00
jrb44@plym.cl.cam.ac.uk d52306f795 Avoid specifying bogus DISPLAY=None when spawning device model.
Signed-off-by: James Bulpin <james@xensource.com>
2005-10-20 19:37:41 +01:00
emellor@leeni.uk.xensource.com dd319571b5 Fix the recently-introduced failure to preserve uuid across a guest reboot.
Store the uuid in string form inside XendDomainInfo, to aid this.

Add restart-squelching logic to ensure that runaway domains to restart
indefinitely.  The logic here could be cleverer, say including a backoff for
retrying, in case a network block device has gone away, but for now this will
do to stop the pathological behaviour.  Fixes bug #275.
 
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-20 12:34:50 +01:00
emellor@leeni.uk.xensource.com e68e8c51d2 This patch fixes the problem that VMX guest can not get brought up on
current tip (changeset 7425).

Signed-off-by: Xin Li <xin.b.li@intel.com>
2005-10-19 18:18:30 +01:00
emellor@leeni.uk.xensource.com a77149f8e4 New network-bridge script and associated gubbins.
This is Kurt Garloff's reworked network-bridge script:

* we got rid of ifconfig
* it works for netdev != eth0
* arp on and off are symmetric as are ifdown and ifup
* ifup will be passed the ifcfg config file name if needed
  (the ifup may otherwise figure that the veth0 hardware is
   NOT the same as the original ${netdev} and not use the same
   config -- this happens on SUSE. Charles Coffing tracked this
   one down.)

Plus Kurt's avoid-dash patch:

the network setup scripts on SUSE have trouble with the bridge
name xen-br0; they don't expect the '-'.
Arguably this should be fixed.
But I assume there's more scripts out there which may not like it,
so I suggest the following patch to rename xen-br0 to xenbr0.

Plus Charles Duffy's patch to support multiple bridges:

The attached patch allows the network-bridge script to be used to
generate multiple bridges corresponding to different physical
interfaces. It adds a new parameter, "vifnum", used to refer both to
the loopback interface to be used and to set defaults regarding the
physical interface and bridge name.

Thus, if one wishes to start xenbr0 on eth0 and xenbr1 on eth1, one
need only call:

network-bridge start ## vifnum is 0 by default
network-bridge start vifnum=1

...well, that and set loopback.nloopbacks=2 in the Dom0 kernel
parameters.

Plus renaming of virtnum to vifnum in Charles' patch, as requested by Ian Pratt.

Plus a fix to DevController to allocate vif IDs starting from 0 (i.e. vif2.0
is now domain 2's first vif, as opposed to vif2.1 in the recent past).

Plus tidying up inside network-bridge using some helper variables.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 16:24:54 +01:00
emellor@leeni.uk.xensource.com a91b3cb6d7 Added diagnosis tool for broken domains.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 13:59:22 +01:00
emellor@leeni.uk.xensource.com f3adfa9dcb Set the console limit for DomUs based on a value set in xend-config.sxp.
Signed-off-by: Dan Smith <danms@us.ibm.com>
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 13:37:16 +01:00
emellor@leeni.uk.xensource.com db6435aaa8 Added sedf_get functionality to XendClient interface. From David Isaac
Wolinsky <davidiw@ufl.edu>.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 13:33:22 +01:00
emellor@leeni.uk.xensource.com 963785e3ee Remove unused parameter from addControllerClass. This became unused when the
BE_DOMAIN flags were removed.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 11:53:00 +01:00
emellor@leeni.uk.xensource.com 6d55f51603 Remove unused shadow_control functionality from the Python layer. This is
handled in xc_linux_save, and no-one in the Python layer uses this functionality
directly.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 11:51:25 +01:00
emellor@leeni.uk.xensource.com 2b99d6e3a9 Take advantage of the new UUID (handle) stored for us in Xen to improve the
recreation semantics.

Remove the unpause at the end of xc_linux_restore, and move it to
XendDomainInfo.  This is necessary because xenstored now allocates the domain
path when the domain is introduced, which means that the new domain cannot
start running until that introduce is performed and the new devices
configured.

Give restore a separate completion phase in which domain details are stored.
This is required because the domain path is no longer available until after
the introduceDomain call.

TODO: Split the domain introduction into two so that the domain path is
available earlier.  At the moment, the domain <-> store channel details are
passed in to xenstored when the domain is introduced, but in the case of
restore it is necessary to wait until the restore is completed before the
channel MFN is available.

Change the interface between XendDomainInfo and XendCheckpoint/image to not
have hideous callbacks through setConsoleRef and setStoreRef.  Instead,
image.createImage explicitly returns those values, and XendCheckpoint passes
them through to completeRestore.

Move the purging of the domain path corresponding to a new domain from Xend
to xenstored, since xenstored is now in charge of this path.  With the domain
path creation moved to xenstored, Xend cannot remove the path, because watches
may have fired on it already.

Fix the printf statement in xenstored in verbose mode that details the
messages being written.  This statement was printing the buffer using %s, but
this buffer has an explicit length field, so we were seeing garbage after the
correct details.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 11:47:51 +01:00
kaf24@firebug.cl.cam.ac.uk e85a40dd36 Remove 'n_vcpu' field from start_info structure. Domain0
simply creates a CPU on every physical CPU. Other domains
read the initial VCPU configuration from xenstore.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-18 19:02:14 +01:00
emellor@leeni.uk.xensource.com a1190ad2e6 Protect __del__ from failure inside __init__ by setting inTransaction before
trying to create a transaction instance.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-18 18:07:11 +01:00
emellor@leeni.uk.xensource.com ac6e05c769 Added uuid unit test.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-18 18:01:14 +01:00
emellor@leeni.uk.xensource.com 1e6d1e90a2 Fix call to getVCpuCount for dom0.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-18 17:45:50 +01:00
kaf24@firebug.cl.cam.ac.uk 0fd482ecd5 There are only six fields in vcpuinfo.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
2005-10-18 10:53:30 +01:00
emellor@leeni.uk.xensource.com fe453929d3 Put back the arg_check calls removed recently -- they aren't as useless as I
thought they were.
 
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-17 20:34:10 +01:00
emellor@leeni.uk.xensource.com 6f4faa61b2 More removal of BE_DOMAIN flags. 2005-10-17 16:33:27 +01:00
emellor@leeni.uk.xensource.com ce4bbfbf11 Merged. 2005-10-17 16:23:26 +01:00
emellor@leeni.uk.xensource.com 706fcdf4de Have xenstored initialise its connections, meaning that xend can be out of
that loop completely -- the xc_init_store, initDomainStore calls can all go.

Have xenstored understand where the local domain information goes.  Xend no
longer has to generate a path and pass it to xenstored through
xs_introduce_domain -- we just allow xenstored to generate the path, and then
call GetDomainPath later.  There is still some work required to tidy this up.

Change the uuid module to generate uuids as lists of bytes, not in the
stringified form.  Added a unit test for that module.

Change the semantics of Xend restart, relying on these changes to the
xenstored semantics and earlier changes to add an opaque handle to the
hypervisor's domain-specific data block.  The semantics are now clearer, as
Xend can validate whether the details in the store match the current live
domain.

Added a usage statement to xenstored.

Some of this code is by Steven Hand.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-17 16:22:05 +01:00
kaf24@firebug.cl.cam.ac.uk dc66fe31f3 Remove useless SIF_XXX_BE_DOMAIN driver flags.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-17 15:54:28 +01:00
kaf24@firebug.cl.cam.ac.uk 3afe806f6f Make the event-channel pending and mask arrays consist of
longs. Thi sensures appropriate alignment for architectures
that require it, and also allows us to naturally support up
to 4096 event channels per 64-bit guest.

Moved 'n_vcpu' field from shared_info to start_info. Really it
ought to disappear altogether as the info can be derived from
xenstore.

Fix a weird bug in XendDomainInfo where 'vcpus' information for
a domain defaults to floating point value 1.0 rather than integer
1. This looks like a Python bug to me, but in any case it is
'fixed' by explicitly converting the default value to an integer.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-17 15:15:17 +01:00
emellor@leeni.uk.xensource.com 238ca03bd4 Replace xm vcpu-enable and xm vcpu-disable with one command, xm set-vcpus,
which sets the number of active CPUs.  Xend then toggles the VCPUs to ensure a
contiguous group of them are enabled.

Added a server command to get VCPU information, and use this info to fix
xm vcpu-list.  That xm command now has extra information, too.  CPU == -1 is no
longer used as an indicator for a VCPU that is disabled -- a separate state
field is available, and the CPU is set merely to '-'.  Individual CPU time is
now available. 

Deprecated xm list -v.  -v is conventionally used for --verbose, so using it
to list vcpus is confusing.  Furthermore, we already have an equivalent command
xm vcpu-list.

Tidied up the horrendous xm list / xm vcpu-list code.

Removed the vcpus field from the dict returned by xc_domain_getinfo, and the
vcpu_to_cpu map from the sxpr returned for xm list.

Move the dom0_enforce_vcpus code into XendDomain.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-17 14:07:47 +01:00
emellor@leeni.uk.xensource.com 37964af428 Added a TRACE log level, for those versions of Python that do not have it, and
moved XendDomainInfo.update's debugging onto that level, as it has become
overly verbose.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-17 13:50:28 +01:00
kaf24@firebug.cl.cam.ac.uk 981d9b117d Plumb GETVCPUINFO dom0_op through to Python. Remove
n_vcpu field from GETDOMAININFO: replaced with
nr_online_vcpus and max_vcpu_id (both plumbed through to
Python).

TODO: Remove 'vcpus' entry in getdomaininfo Python
      dictionary.

TODO: Don't represent 'cpumap' as a bitmap in Python.
      It would be more sensible to represent as a list
      of integer CPU numbers.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-17 11:36:36 +01:00
kaf24@firebug.cl.cam.ac.uk 349d3745d3 In addition to setting opaque handle during domain
creation, allow it to be changed after creation via
DOM0_SETDOMAINHANDLE operation (and libxc
xc_domain_sethandle, and via Pyhton wrapper fn).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-14 16:01:11 +01:00
kaf24@firebug.cl.cam.ac.uk 30ce2a9295 Store an opaque handle (tools uuid) in the domain structure
within Xen. Refactor GETVCPUCONTEXT into an op of the same
name plus a new op GETVCPUINFO. Move the cpumap and cpu info
arrays from GETDOMAININFO and move into new GETVCPUINFO.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-14 15:40:48 +01:00
emellor@leeni.uk.xensource.com 86d80f8f02 Patch for typo causing multiple output in xm list -l, courtesy of Laura Ramirez
<laura.ramirez@hp.com>.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-13 23:16:03 +01:00
emellor@leeni.uk.xensource.com 62164352c8 Revert accidental commit.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-13 17:55:15 +01:00
emellor@leeni.uk.xensource.com 0617a2049d Merged. 2005-10-13 17:51:35 +01:00
emellor@leeni.uk.xensource.com 7e6a2a3288 Remove the diagnostic/recovery when two domains end up with the same name. It
was working around bugs that have gone, and is now more dangerous than useful
-- deadlock is a possibility with this code now.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-13 17:49:56 +01:00
emellor@leeni.uk.xensource.com 633d294bb5 Merge. 2005-10-13 15:26:44 +01:00
emellor@leeni.uk.xensource.com 043da08cae Fix broken test for zombies.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-13 15:25:42 +01:00
kaf24@firebug.cl.cam.ac.uk 8abc2d5b4e Fix multi-cpu save/restore after the max_vcpu patch.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-13 15:19:29 +01:00
kaf24@firebug.cl.cam.ac.uk 98adab9284 Add a option for enabling ne2000 NIC device model
Signed-off-by: Yan Li <yanx.li@intel.com>
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
2005-10-12 17:04:11 +01:00
kaf24@firebug.cl.cam.ac.uk 523636b3b7 New dom0_op to set max vcpus for a domain.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-12 16:34:49 +01:00
emellor@ewan 3e500e67eb Make the error reporting back to xm just a little bit less insane, and fix a
missing import inside blkif.  Fix the command parsing for op_device_destroy and
op_device_configure -- the device IDs should be strings, to allow the user to
specify devices by name as well as number.

This is the second half to the fixes for bug #315.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-12 13:13:32 +01:00
emellor@ewan 5ca91af2f8 Ignore any watches that fire for which we do not have a registration. This can
happen if there are watches in flight at the same time as a deregistration, and
also seems to happen spuriously on xend restart.

This fixes the Invalid token error that has been seen on xend restart.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-12 13:00:55 +01:00
emellor@ewan 0041d06c95 Don't try and call DevController if we can't destroy a device ourselves,
because we are already inside the ValueError exception handler, so we know that
the give device identifier is not an integer, and DevController.destroyDevice
only accepts integers.  Fixes bug #315.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-12 12:56:52 +01:00
emellor@ewan c74a06ff24 Improve error message. 2005-10-12 12:54:43 +01:00
emellor@ewan db778d68dd Explicitly state which architectures are going to use /usr/lib64, to allow for
the fact that Itanium does not.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-12 12:04:45 +01:00
emellor@ewan bd0321055f Added missing __init__.py.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-12 11:51:52 +01:00