Commit Graph
567 Commits
Author SHA1 Message Date
cl349@firebug.cl.cam.ac.uk b9a5e01c19 The following patch is a major restructuring of main.py to be more straight forward, and remove as much code as possible.
It does a number of things:

* It implements the standardized options proposed via my RFC for xm
* It restructures the calling of these functions to be function pointers out
  of a dictionary, instead of subclasses found through inspection
* It consolidates all help info, making it easier to see that the help
  screen looks consistent across commands.  (Per command help isn't yet in
  this patch just global help)
* It moves object importing into the functions that require them only,
  allowing commands like "xm help" to be runable as non root
* It adds command aliasing to provide backwards compatibility with many
  commands (i.e. xm balloon)
* It provides more useful error messages is most fail cases
* It implements a short help by default (which takes < 24 screen lines) as
  requested by Mark W at OLS
* It attempts to trap more exceptions than before and provide useful errors
  based on them (this requires more testing)

This patch makes no changes to any other elements of xen/xm, and works with
all other objects and libraries as is.

Signed-off-by: Sean Dague <sean@dague.net>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-08-09 12:50:22 +00:00
cl349@firebug.cl.cam.ac.uk b06a5d76b9 Don't expose xenstore daemon-only permission bits through python bindings.
These bits are daemon-only, never come though to userspace.  We already
changed them once and broke compilation: better they had never been
referenced.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-08-09 08:44:29 +00:00
kaf24@firebug.cl.cam.ac.uk 2ba532d767 Rename console binaries to xenconsole and xenconsoled.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-08-07 09:12:55 +00:00
kaf24@firebug.cl.cam.ac.uk 652bdea7c1 xend prints out some messages when starting, which is annoying. This
patch send those to xend log file instead - people want them always
know where to find them.

Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com>
2005-08-06 15:45:41 +00:00
kaf24@firebug.cl.cam.ac.uk a5af5704b2 This patch changes the vcpu-hotplug handler from using control message
over to using xenstore for triggers.  Dropping the control messages also
fixes the issue with not being able to use xm vcpu-hotplug on dom0.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
2005-08-06 09:50:51 +00:00
kaf24@firebug.cl.cam.ac.uk 32060bbf97 This patch changes the shutdown driver and xend to use strings instead
of codes for signaling a shutdown request.

Also, we fix the return code for the shutdown notifier, so other
notifiers will get to run ;)

Signed-off-by: Dan Smith <danms@us.ibm.com>
2005-08-06 09:48:47 +00:00
kaf24@firebug.cl.cam.ac.uk d2f97d17d4 The C interface no longer has a priority arg, but the python interface
still takes one (and just doesn't use it).  Noone uses it anyway, so
nothing should break by taking it away.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2005-08-05 09:02:58 +00:00
kaf24@firebug.cl.cam.ac.uk fe0b8e6e6e The attached patch:
1. Converts the shutdown driver and xend to use the store instead of
   control messages, 

2. Includes Anthony's xenstore notification code, and

3. Changes xend so that sysrq's are no longer sent as "special case"
   shutdown messages.  Store keys are cheap, so making the sysrq
   delivery less obscure is good.

I think I have made all of the appropriate modifications to Xend, but
it is complex, so I may have missed something.  Comments are welcome.

Signed-off-by: Dan Smith <danms@us.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2005-08-05 08:59:41 +00:00
kaf24@firebug.cl.cam.ac.uk 1126965540 Attached are
three patches to fix a problem with Xend starting consoled.  consoled 
depends on xenstored to be running and xenstored is started on demand in 
Xend.  The patches change xenstored to manage its own pidfile, and have 
xend start actually start up xenstored.
2005-08-04 18:51:55 +00:00
kaf24@firebug.cl.cam.ac.uk f6d93de51e The attached patch removes all of the console handling code from Xend
and changes xm to simply exec /usr/libexec/xen/xc_console.

I've done a pretty good amount of testing and this seems to clear up all 
of the Xend console issues in bugzilla.

This is a pretty big change to Xend though with a lot of deleted code so 
I'd appreciate if people more familiar with the Xend codebase could look 
through it critically.

In addition to the patch, the following files are no longer used:

tools/python/xen/util/console_client.py
tools/python/xen/xend/XendConsole.py
tools/python/xen/xend/server/SrvConsole.py
tools/python/xen/xend/server/SrvConsoleDir.py
tools/python/xen/xend/server/console.py

Regards,

Anthony Liguori

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2005-08-04 09:00:16 +00:00
cl349@firebug.cl.cam.ac.uk cfd6b38dc8 Update xenstore python bindings for "Implement watching of nodes which don't exist."
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-08-02 19:19:16 +00:00
cl349@firebug.cl.cam.ac.uk 0603c5d12a Fix typo.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-08-02 18:04:00 +00:00
cl349@firebug.cl.cam.ac.uk d16ff05a08 merge? 2005-08-02 17:13:11 +00:00
cl349@firebug.cl.cam.ac.uk 59f1e250c2 Fix checkpointing - add save/restore support to the xenbus driver.
- Add xenbus driver suspend/resume functions
- Change xenbus irq to not be shared
- Translate store mfn in suspend record to pfn and back
- Make tools re-introduce the domain to the store
Signed-off-by: Rusty Russel <rusty@rustcorp.com.au>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-08-02 17:12:36 +00:00
kaf24@firebug.cl.cam.ac.uk 794c430127 The attached patch converts the balloon driver and xend to use
xenstore instead of control messages.

Note: Because there is no way to set a watch on a non-existent key,
this patch includes a workaround to account for the fact that dom0's
store keys are not initialized by the tools before it boots.

Signed-off-by: Dan Smith <danms@us.ibm.com>
2005-08-02 11:21:11 +00:00
smh22@firebug.cl.cam.ac.uk 8dbafbfdcc * support proper scsi disk name
* xvd now has an official lanana assigned major, use it

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2005-08-02 09:29:56 +00:00
kaf24@firebug.cl.cam.ac.uk ecfbf99a10 This patch renames balloon command to "set-mem", so instead of "xm
balloon", we will use "xm set-mem" (as suggested by TODO list)

Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com>
2005-07-29 10:37:30 +00:00
kaf24@firebug.cl.cam.ac.uk 084dedfee3 This patch does 2 jobs:
- Enforce the number of CPUs dom0 will take. See the new variable
"dom0-cpus" in xend-config.sxp (you will want to set this variable to
1 on SMP systems)

- Balloon out dom0 memory when creating domU, if there is not enough
free memory. The lowest level we will balloon out is configured via
the new variable "dom0-min-mem" in xend-config.sxp


I still have a doubt: where to put the code to enforce dom0-cpus. At
the moment I put it into
python/xen/xend/server/SrvDaemon.py, and hopefully that is resonable
enough. Any comment?



Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com>
2005-07-29 10:36:53 +00:00
kaf24@firebug.cl.cam.ac.uk 12b1a321bd Here is our latest patch to enable the Xen tools to
build and work with IA64 Xen.
Signed-off-by: Matt Chapman <matthewc@hp.com>
Acked-by: Dan Magenheimer <dan.magenheimer@hp.com>
2005-07-29 10:34:45 +00:00
kaf24@firebug.cl.cam.ac.uk 4e6f46cf10 This patch updates the CPU field in xm list for multi-vcpu domains.
When a dom runs on multiple physical cpus, the CPU field doesn't have
much meaning.  The suggested fix was to replace the value with '-'.  
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
2005-07-29 10:27:12 +00:00
cl349@firebug.cl.cam.ac.uk 14302840ff Don't ignore exceptions here - the possible RuntimeError is handled already.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-07-27 18:40:32 +00:00
cl349@firebug.cl.cam.ac.uk 272942eeb3 Introduce dom0 to the store.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-07-27 18:31:18 +00:00
cl349@firebug.cl.cam.ac.uk 001ee4ddde Handle introduce_domain failing when the domain is already introduced.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-07-27 18:31:03 +00:00
cl349@firebug.cl.cam.ac.uk f2cbf339d4 Add xc_init_store python binding.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-07-27 17:06:02 +00:00
cl349@firebug.cl.cam.ac.uk 57103c6152 Fix read of integers from database on event channel restore.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-07-27 17:04:47 +00:00
cl349@firebug.cl.cam.ac.uk 55e1cda4c0 Make XENSTORED_DEBUG create a xenstored trace logfile.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-07-27 17:03:00 +00:00
cl349@firebug.cl.cam.ac.uk 0e358737de Move SIF_BLK_BE_DOMAIN and SIF_NET_BE_DOMAIN definitions to where they are used.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-07-27 17:00:24 +00:00
cl349@firebug.cl.cam.ac.uk 63c82e1bdd Don't auto-add domains we don't know about.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-07-27 16:57:01 +00:00
cl349@firebug.cl.cam.ac.uk 44ff21af8a merge? 2005-07-26 18:41:39 +00:00
kaf24@firebug.cl.cam.ac.uk bd16e616b6 Attached patch removes the empty domain if
xc.memory_increase_reservation fails.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2005-07-26 16:16:39 +00:00
cl349@firebug.cl.cam.ac.uk cec6ff4898 Update python bindings - xs_watch doesn't support a priority anymore.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-07-26 15:57:18 +00:00
kaf24@firebug.cl.cam.ac.uk 71ae53ce26 This patch prevents you from getting a screen full of stack trace when
trying to run commands like xm list as a normal user, and instead provides a
helpful error message.

Signed-off-by: Sean Dague <sean@dague.net>
2005-07-26 15:16:39 +00:00
twilkie@paploo.uk.xensource.com 2145204551 Add XenSV back into the repository.
Now uses Python Server Pages, not twisted.
2005-07-26 13:56:30 +00:00
kaf24@firebug.cl.cam.ac.uk 643aa19009 Allow multiple disk images per guest.
Signed-off-by: Yunfeng Zhao <yunfeng.zhao@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
2005-07-25 21:02:34 +00:00
kaf24@firebug.cl.cam.ac.uk ae7da5d7f3 Don't leave behind zombie device model processes
Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
2005-07-25 21:01:57 +00:00
kaf24@firebug.cl.cam.ac.uk 72098d9304 Device model SXP cleanup
- don't pollute the sxp with unused options
- use the same syntax as paravirtualized domains for disks

Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
2005-07-11 20:09:10 +00:00
kaf24@firebug.cl.cam.ac.uk 8ff31ab726 The 1:1 page table should be a 3 level PAE page table on x86-64
This is needed to support > 4GB machine physical addresses.

Signed-off-by: Chengyuan Li <chengyuan.li@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
2005-07-11 14:39:10 +00:00
kaf24@firebug.cl.cam.ac.uk fb4f1fe815 python wrapper arg fix from aq. 2005-07-08 08:02:45 +00:00
iap10@freefall.cl.cam.ac.uk 8e1bda2932 I updated the vcpu_to_cpu string creation to include a field separator,
which gets rid of the -1 -> # hack and works for cpus > 9.

I ran into some issues with stale vcpu_to_cpu lists when running the
hotplug subprogram.  I would take a vcpu offline, and then issue the
command to bring it back and the vcpu_to_cpu list would not have changed
to indicate the the vcpu actually went down.  If I injected a xm list -v
(which always showed the correct mapping) then subsequent hotplug
commands would see the state change and fire off the hotplug request.  I
don't know that not sending the event when not changing state saves that
much work so I took the state check out and now just send the hotplug
event directly.

> Also the whole hotplug stuff is still missing interrupt re-routing
> when a vcpu is taken down.  To do this, we need an evtchn operation to
> change the vcpu affinity of a port by changing notify_vcpu_id.

I don't fully understand all of the mappings that are happening, so this
part of the patch might be way off.  In any case, I've added a new
evtchn op to set the notify_vcpu_id field of a channel.  I updated the
HOTPLUG_CPU code to use the new routines when bringing cpus up and down.
When taking down a cpu, I route the IPI irq channels to CPU 0, and when
the cpu comes up, it re-routes the channels back to the awakened CPU.

From: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: ian@xensource.com
2005-07-06 22:23:18 +00:00
kaf24@firebug.cl.cam.ac.uk 3f54e6d5ec Attached is a patch that fully 'grant-table-ifies' the block front and
backends.  It is necessary to do a make clean in the tools directory and 
then rebuild the tree.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2005-07-06 08:50:11 +00:00
kaf24@firebug.cl.cam.ac.uk 763c04b318 Rename fields in physinfo_t structure and add sockets/nodes
fields.
2005-07-04 16:02:46 +00:00
arun.sharma@intel.com[kaf24] 03d545ffcd bitkeeper revision 1.1773 (42c3a841nLib9kdSmthr05jouqiNeg)
[PATCH] Device model cleanup.

Device model cleanup.

- Single config file for xen and device models
  (Shell script doesn't source xmdefconfig anymore)
- No more device-model shell script by default. You can
  have one if needed (qemu-dm.debug)
- All logic in the script device-model is moved to python
- $DISPLAY is passed from xm to xend
- Don't fork vncviewer on dryruns
- Add support for killing device models on domain destroy
- info vmxiopage command added to the monitor
- Refactor shared io page into global and per vcpu state
- Remove the hard coding of IOPACKET_PORT
- move the virtual_platform_def up to domain struct from vcpu
- xm create -n:

(vm
    (name ExampleVMXDomain)
    (memory 128)
    (ssidref -1)
    (image
        (vmx
            (kernel /usr/lib/xen/boot/vmxloader)
            (root '/dev/hda1 ro')
            (vcpus 1)
        )
    )
    (memmap )
    (device_model /tmp/foo)
    (hda /var/images/min-el3-i386.img)
    (hdb )
    (hdc )
    (hdd )
    (cdrom )
    (boot c)
    (fda )
    (fdb )
    (localtime 0)
    (serial )
    (macaddr )
    (stdvga 0)
    (isa 0)
    (nographic 0)
    (vnc 0)
    (sdl 0)
    (display localhost:10.0)
)

Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
2005-06-30 08:07:29 +00:00
cl349@firebug.cl.cam.ac.uk a575a4a3a8 bitkeeper revision 1.1766 (42c17071SPDLo7qPlXAiQzrKjMu6Mw)
Add xenbus driver.
XendDomainInfo.py:
  Connect/Disconnect domains to/from store.
Signed-off-by: Rusty Russel <rusty@rustcorp.com.au> (authored)
Signed-off-by: Mike Wray <mike.wray@hp.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-06-28 15:44:49 +00:00
kaf24@firebug.cl.cam.ac.uk 19b63a9f44 bitkeeper revision 1.1757 (42be9ad5TTWQjsCBju5noyzBrTMyjA)
Attached is the patch that changes the default ssid from 0xffffffff to 0 
as discussed in previous emails. 

Signed-off-by: Reiner Sailer <sailer@us.ibm.com>
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2005-06-26 12:08:53 +00:00
kaf24@firebug.cl.cam.ac.uk dc0838d499 bitkeeper revision 1.1753 (42bbe67ePvjh9K0djYf6xRw2rGNreQ)
Properly remove old plan9 builder from xc header fiel and from xend.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-06-24 10:54:54 +00:00
cl349@firebug.cl.cam.ac.uk 8e6ffdae8e bitkeeper revision 1.1747 (42bbc01fY31MfvOqdz4Mq_h_2D4Usg)
Merge firebug.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-unstable.bk
into firebug.cl.cam.ac.uk:/local/scratch/cl349/xen-unstable.bk
2005-06-24 08:11:11 +00:00
cl349@firebug.cl.cam.ac.uk bc3c530470 bitkeeper revision 1.1742.1.1 (42bbc016sc__D7n9oSLMG75cKXdixQ)
XendDomainInfo.py: Fix imports.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-06-24 08:11:02 +00:00
kaf24@firebug.cl.cam.ac.uk b1fe63ce24 bitkeeper revision 1.1746 (42badf41asjaKoYentyODb8CdFEydg)
Cset exclude: arun.sharma@intel.com[kaf24]|ChangeSet|20050623091344|24134
2005-06-23 16:11:45 +00:00
arun.sharma@intel.com[kaf24] dee0a637a4 bitkeeper revision 1.1729 (42ba7d48EFeRBiv6YMxK_aR9binchA)
[PATCH] novnc-dryrun.patch

Don't start VNC on a dry run.

Signed-off-by: Arun Sharma <arun.sharma@intel.com>
2005-06-23 09:13:44 +00:00
smh22@firebug.cl.cam.ac.uk 063a38978a bitkeeper revision 1.1726.2.5 (42ba7c68cP1Z3SmHyVl4grEnN-Yf8g)
minor xense tool updates

Signed-off-by: Steven Hand <steven@xensource.com>
2005-06-23 09:10:00 +00:00