Commit Graph
243 Commits
Author SHA1 Message Date
emellor@leeni.uk.xensource.com a8a1d48e4c Break the write_dev function out from block into new block-common.sh, where it
can also be used by block-enbd and block-nbd.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-26 14:58:13 +01:00
emellor@leeni.uk.xensource.com 902a84f59f Added copyright notice.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-26 14:57:16 +01:00
emellor@leeni.uk.xensource.com b043099b44 New xendomains init script, courtesy of Kurt Garloff:
It now allows the user to configure what he wants to be done on
xendomains stop: sysrq, migrate, save, or shutdown.
For this to be safe, a timeout has been introduced (optional).
On start, saved domains may be restored, and not yet started
domains from the auto start dir will be started in addition.
status reports missing domains, restart and reload work as well.

The init script is somewhat SUSE-ish, but it should work on LSB
compliant and on RH based distros as well.

I would appreciate this to be put into tools/examples/init.d/

Signed-off-by: Kurt Garloff <garloff@suse.de>
2005-10-26 14:55:32 +01:00
emellor@leeni.uk.xensource.com ccbd11acd6 Added comment.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-26 12:06:58 +01:00
emellor@leeni.uk.xensource.com 617482f058 NBD scripts, courtesy of Kurt Garloff:
For domain migration, unless you use a rootless setup, you need
to have network storage available. For the poor people like me that
have no SAN, one easy possibility to have it is to use nbd.

Find attached the block-nbd script (in /etc/xen/scripts/) and
an example config file. The block-nbd script is based on the -enbd one.
They have been used successfully in the Xen Tutorial at Linux Kongress.

Signed-off-by: Kurt Garloff <garloff@suse.de>
2005-10-25 11:52:56 +01:00
emellor@leeni.uk.xensource.com 1033d025c4 Moved SuSE-specific getcfg call into a preiftransfer call. The semantics of
this aren't beautiful, but this gets the distro-specific code out of the body
of the network-bridge script and into a common place, while still preserving
the existing code behaviour.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-25 11:22:47 +01:00
emellor@leeni.uk.xensource.com 4384b3fc70 Instead of writing errors to
/local/domain/0/backend/<devclass>/<dom>/<devid>/error, write them instead to
/local/domain/0/error/backend/<yada>.  This is not the best place for them
perhaps, but it moves them out of the backend directory, on which the drivers
have a watch.  This fixes the problem whereby writing an error will trigger a
watch, causing the error message to be written again, and repeat.  Fixes bug
#286.
 
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-23 22:34:13 +01:00
emellor@leeni.uk.xensource.com e5edf96441 Break common network code in xen-network-common.sh, and common vif hotplugging
code into vif-common.sh.

Fix the antispoofing in network-bridge to allow forwarding from physical
device to bridge, and vif0.0 to eth0.

Change the interface between netback driver and vif hotplugging scripts.  The
mac address and bridge details are read from the store directly by the script,
so that the kernel driver does not need to get involved.

Remove an awful lot of cruft from vif-bridge.  Move the iptables handling into
vif-common.sh, and fix it so that the new vif can get past the antispoofing
entries.  Merge vif-nat and vif-route into this structure too.

Use ip instead of ifconfig to get necessary details.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-21 12:06:17 +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 e08da109cd Set antispoof default to yes, as this seems safer, and is the current behaviour
in VifCtl.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-20 14:06:07 +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 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 c8a1f1c7fc Some trivial changes for the tool scripts:
- make xen-hotplug-common.sh (un)set locales.
 - use xen-hotplug-common.sh in vif-bridge.

From Gerd Knorr <kraxel@suse.de>.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 13:34:44 +01:00
kaf24@firebug.cl.cam.ac.uk e21acec89d Small cleanup in hotplug script.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-16 12:34:37 +01:00
emellor@leeni.uk.xensource.com da1385d8e8 Use new -t flag on xenstore-rm to keep the store pruned when devices go away.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-15 12:56:07 +01:00
emellor@leeni.uk.xensource.com 86234f86b5 Fix installation decision to make the DISTDIR and DESTDIR absolute before
comparing them.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-15 12:55:03 +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 c27ad917f2 The NAT scripts currently work, but the changes below decrease user
error and allow the netmask to be passed in.

Signed-off-by: Jon Mason <jdmason@us.ibm.com>
2005-10-12 09:28:12 +01:00
emellor@ewan 27d7a34194 Fix completely broken xenstore_read function.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-10 18:58:46 +01:00
emellor@ewan 56a738f7ff Added error logging to the block hotplug script, and support facilities for
that.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-10 14:42:38 +01:00
kaf24@firebug.cl.cam.ac.uk 726081b63b Add installation of the udev rules if appropriate. With a normal 'make
install', the udev rules will be installed if udev version is >= 059;
otherwise, the hotplug rules get installed.

When 'make dist' is done, we set a variable so that both hotplug and
udev rules are installed into the dist tarball.  install.sh then takes
care of picking the proper rules.

Also changes the hotplug check to look for a proper udev version

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2005-10-07 14:47:45 +01:00
kaf24@firebug.cl.cam.ac.uk e3430966b8 Add udev rules that map similar to the hotplug agent. Based off of what
Chris Bainbridge posted the end of last week but doing things as
directly as possible.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2005-10-07 13:15:52 +01:00
kaf24@firebug.cl.cam.ac.uk 44e73911fe Move the block-phy and block-file handling into a common
block script that gets called by the hotplug agent.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2005-10-07 13:13:58 +01:00
kaf24@firebug.cl.cam.ac.uk 6f455ecab6 The hotplug agent sets the path now, but that's not as practical to do
with udev rules.  So instead, make sure that the path is set in the vif
scripts themselves.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2005-10-07 13:11:41 +01:00
kaf24@firebug.cl.cam.ac.uk 8d840be9ee This patch copies the NAT scripts in tools/examples/ to
/etc/xen/scripts/.

Signed-off-by: Jon Mason <jdmason@us.ibm.com>
2005-10-07 11:03:56 +01:00
kaf24@firebug.cl.cam.ac.uk 66041d1b9c Gentoo compatible stuff has to be done *before* the set -e. You could also do
the which in the if with a combination of ! and || after the set -e but I think
it's cleaner to just do it before the set -e.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2005-10-05 19:15:56 +01:00
kaf24@firebug.cl.cam.ac.uk 5b6b39d3e9 Add Gentoo handling to network-bridge. Based on patches
from Jon Mason and Anthony Liguori.
2005-10-05 14:14:04 +01:00
kaf24@firebug.cl.cam.ac.uk 3d8296adbb Currently, the scripts in /etc/xen/scripts won't get overwritten if they
exist which means that changes can easily not get updated.  This makes
it so the scripts always get installed.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2005-10-05 13:54:36 +01:00
emellor@ewan 42fb9678c9 Add the config file parsing for the on_{poweroff,reboot,crash} options, so that
they actually take effect.  Added behaviour "rename-restart" for debugging
purposes, that renames the domain out of the way, preserving it for debugging,
but starts a new domain too.

Add explicit remove of old domain paths when creating a new domain, to avoid
stale information affecting us (by shutting the domain down, for example).

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-30 17:10:20 +01:00
emellor@ewan 8a3d958510 Change rebooting specification so that we can have domains crash and stay
around to be debugged, for example.

Fix problem in XendDomainInfo.eventChannel caused by a mis-merge.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-30 13:59:28 +01:00
kaf24@firebug.cl.cam.ac.uk 2b3f9eda6b Clean up xc_vmx_build():
1. Remove linux parameters.
 2. Remove init ramdisk.
 3. Remove e820 memmap config file parse.
 4. Removed provisional GDT.
 5. Removed some ugly tailing space.

Signed-off-by: Xin B Li <xin.b.li@intel.com>
2005-09-23 12:52:43 +01:00
emellor@ewan 1bb7afe544 Merge. 2005-09-21 15:25:58 +01:00
emellor@ewan d02cb884e0 Disable debugging-level output.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-21 15:13:26 +01:00
kaf24@firebug.cl.cam.ac.uk 5ec9c16433 Parse vcpus for VMX guest.
Vcpus are passed to device model and vmx domain builder.

Signed-off-by: Yan Li <yanx.li@intel.com>
Signed-off-by: Xin Li <xin.b.li@intel.com>
2005-09-21 09:58:15 +00:00
cl349@firebug.cl.cam.ac.uk 71a28c9e9d Make dom0_enforce_cpus() use vcpu_hotplug rather than directly modifying the sysfs entries.
Directly modifying the sysfs entries causes the xenstore state of
a cpu's availability to be incorrect.  Also slightly modify the
dom0-cpus description in the xend-config.  Rather than specifying which
dom0 vcpus are to be used, it is now a target of how many vcpus to use
as pinvcpu ops are the preferred method for setting which physical cpu a
vcpu uses.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-16 19:08:36 +00:00
kaf24@firebug.cl.cam.ac.uk 25c03baf35 Remove bad lines from start od script. 2005-09-15 07:45:06 +00:00
djm@kirby.fc.hp.com 6be63db55d Merge latest xen-unstable into xen-ia64-unstable to prep
for push back to xen-unstable
2005-09-14 15:36:10 -06:00
kaf24@firebug.cl.cam.ac.uk 7d4d9ab1dd During my attempts to get the latest bridge networking model working on my
system, I often invoked 'network-bridge stop' with total failure.  Attached 
is an updated version that works.

Signed-off-by: Andrew Theurer <habanero@us.ibm.com>
2005-09-14 16:49:23 +00:00
kaf24@firebug.cl.cam.ac.uk d356ca1e93 mem-map.sxp and vmxloader are unaffected by a 64-bit build,
and belong in /usr/lib always (never /usr/lib64). qemu-dm
continues to live under /usr/lib64 on 64-bit systems.
Modify the vmx config script to auto-detect correct path
to qemu-dm, rather than staically configuring at compile
time.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-14 09:14:32 +00:00
kaf24@firebug.cl.cam.ac.uk ce540e0464 This trivial patch makes sure that mem-map.sxp and the qemu bits
get installed in /usr/lib64 on distributions that want things
there.

Signed-off-by: Rik van Riel <riel@redhat.com>
2005-09-13 10:49:04 +00:00
cl349@firebug.cl.cam.ac.uk eccd1bf398 Move block device bind/unbind into hotplug scripts.
Fixes file: devices since unbind now runs after the backend driver
closes the loopback device.
Also moves name -> node translation into the backend domain.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-12 19:49:03 +00:00
cl349@firebug.cl.cam.ac.uk 7cded01029 g/c unused xcs.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-07 19:01:05 +00:00
cl349@firebug.cl.cam.ac.uk e9626ce65f Fix vif scripts for domains with more than one ip.
As reported in bug 218 by christian@prehl.de.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-07 17:26:27 +00:00
cl349@firebug.cl.cam.ac.uk b3e59dd645 Install hotplug script(s) unconditionally.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-02 14:20:12 +00:00
cl349@firebug.cl.cam.ac.uk 074210e720 Restore configurability of vif bring up script and passing arguments to the script.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-02 14:15:49 +00:00
cl349@firebug.cl.cam.ac.uk fdda579ede Fix network setup through hotplug on SUSE.
Move the hotplug script from /etc/hotplug.d/xen-backend/backend.hotplug
to /etc/hotplug/xen-backend.agent, which seems to be a more common place
for the script.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>


--HG--
rename : tools/examples/backend.hotplug => tools/examples/xen-backend.agent
2005-09-01 10:45:50 +00:00
shand@ubuntu.eng.hq.xensource.com 19d427f223 merge? 2005-08-31 15:22:45 -08:00
adsharma@los-vmm.sc.intel.com a8211ec86e Merge. 2005-08-30 13:36:49 -07:00
shand@ubuntu.eng.hq.xensource.com d22746ede9 Provide xend support for setting up TPM front- and back-end interfaces.
Signed-off-by: Steven Hand <steven@xensource.com> 
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2005-08-30 11:28:26 -08:00
kaf24@firebug.cl.cam.ac.uk 16504669c5 Cross-compilation fixes.
Signed-off-by: Michal Ostrowski <mostrows@watson.ibm.com>
2005-08-30 13:15:20 +00:00