Commit Graph
385 Commits
Author SHA1 Message Date
awilliam@xenbuild.aw 18d5bf1fec [IA64] Change of VTi guest firmware name and default directory in xmexample
This trivial patch changes VTi guest firmware default name and directory
in xmexample to new directory /usr/lib/xen/boot/guest_firmware.bin. This
aligns with IA32 firmware directory and good to integrate into Fedora
Core.

Signed-off-by Fenghua Yu <fenghua.yu@intel.com>
2006-06-23 16:10:32 -06:00
awilliam@xenbuild.aw 51cd0d362b merge with xen-unstable.hg 2006-06-23 15:33:25 -06:00
awilliam@xenbuild.aw d382cb62a0 [IA64] Update xmexample.vti
This simple patch is just to update xmexample.vti
 1. Add "vcpus" for supporting SMP VTI.
 2. Add serial='pty' for using "xm console" of VTI.
 3. Add usb device supporting for VTI.
 4. Use cirrus logic accelerated VGA.

Signed-off-by: You Yongkang <yongkang.you@intel.com>
2006-06-21 10:40:20 -06:00
kaf24@firebug.cl.cam.ac.uk ac85f84b53 [TOOLS] Clean up the network setup scripts. Create some
setup functions and use them everywhere.
Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
2006-06-17 08:40:50 +01:00
kaf24@firebug.cl.cam.ac.uk c8c61a2fd3 [TOOLS][HVM] Enhance the HVM config file to show prototypes for the USB options.
Signed-off-by: Don Dugger <donald.d.dugger@intel.com>
2006-06-17 08:34:54 +01:00
kfraser@dhcp93.uk.xensource.com 1a59e1d7a7 network-bridge: fix syntax error
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-01 11:25:02 +01:00
kfraser@dhcp93.uk.xensource.com 9ddb2b5be9 network-bridge: Fall back to eth0/xenbr0 if no default route.
From: Dave Lively <dave.lively@gmail.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-01 11:18:26 +01:00
awilliam@xenbuild.aw 7e713108be merge with xen-unstable.hg 2006-05-22 14:13:38 -06:00
awilliam@xenbuild.aw 56bad25d65 [IA64] Enable VTi network by defalt
Due to dom0_vp open, we can enable VTi's network in configuration file now.

From: Zhang Xiantao <xiantao.zhang@intel.com>
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2006-05-22 08:53:26 -06:00
cl349@firebug.cl.cam.ac.uk e9f340a6bc Don't require sed to support the -r option.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-05-19 22:08:32 +01:00
cl349@firebug.cl.cam.ac.uk 8a7ecff138 Make the latest network-bridge tweaks work in a busybox environment too.
Signed-off-by: David Lively <dlively@virtualiron.com>
2006-05-19 22:00:28 +01:00
kaf24@firebug.cl.cam.ac.uk 1c9887d59b Document the UUID domU configuration parameter in example configurations.
Signed-off-by: Andrew D. Ball <aball@us.ibm.com>
2006-05-16 09:15:19 +01:00
kaf24@firebug.cl.cam.ac.uk 8d73a7e949 Update the readme for tools/examples/scripts.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-05-12 15:21:12 +01:00
cl349@firebug.cl.cam.ac.uk 8cc76e4aee Fix network bridge script to select the right interface when bridge already exists.
If the bridge is already configure, the default route will point
to a xenbr interface and not an eth interface.  Handle this case.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-05-11 22:39:44 +01:00
kaf24@firebug.cl.cam.ac.uk 3f37f70c65 Clean up and refactor some parts of the vTPM and migration-related scripts.
In the external device migration script I am introducing a subtype
(-subtype <subtype>) from which the script's name is formed. Also all
unparsed parameters are passed to the called script.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-05-10 16:01:34 +01:00
cl349@firebug.cl.cam.ac.uk 3bd47fb5b6 Fix code which finds the default interface if there are static routes.
The current code will break if there are multiple scope global routes
since the "ip route list default" command doesn't use "default" as a
filter, and will output multiple devices which breaks the rest of the
script.
Also make the vif/xenbr/eth naming consistent, i.e. if your default
network interface is eth1, you get vif1 and xenbr1.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-05-08 10:36:13 +01:00
awilliam@xenbuild.aw aaf9402dab merge with xen-unstable.hg 2006-04-25 23:35:55 -06:00
emellor@leeni.uk.xensource.com 23920c55d4 The attached patch allows external devices to migrate. The patch
contains code that allows to at least detect local migration of a
virtual machine and handles this for the virtual TPM (results in a no-op
for local migr.). If migration of a virtual machine with attached vTPM
to another machine is attempted, XenD will return an error.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-04-21 11:54:12 +01:00
stekloff@dyn9047022152.beaverton.ibm.com 05a89012eb Add small memory warning message to domain configuration examples.
Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
2006-04-19 22:58:24 +01:00
emellor@leeni.uk.xensource.com 00ee1f9b78 Under FC5 multi-line commands in bash script language have to be wrapped
in $(...) instead of '`...`', otherwise the parser seems to get
confused.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-04-19 22:54:49 +01:00
awilliam@xenbuild.aw dc1c0a8170 merge with xen-unstable.hg 2006-04-18 09:35:40 -06:00
emellor@leeni.uk.xensource.com abd30192c0 This patch enables external devices, such as for example a mounted hard
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>
2006-04-14 21:22:09 +01:00
awilliam@xenbuild.aw b4fa7c40e9 merge with xen-unstable.hg 2006-04-11 18:54:18 -06:00
kaf24@firebug.cl.cam.ac.uk b5fa90ac8e build: Clean up use of .PHONY
* 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>
2006-04-10 17:02:49 +01:00
apeace@paploo.uk.xensource.com 4d9b8db9fc Fix the example xend init.d script so it correctly detects when it is running
in a guest.

Signed-off by: Andrew Peace <andrew@xensource.com>
2006-04-06 14:58:55 +01:00
kaf24@firebug.cl.cam.ac.uk a6ac8cd281 Remove some unnecessary code from the vTPM hotplug scripts.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-04-06 09:40:15 +01:00
emellor@leeni.uk.xensource.com 26c829aa89 Don't use abbreviated ip subcommands -- these are not accepted by iproute2.
Closes bug #478.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-31 00:09:42 +01:00
kaf24@firebug.cl.cam.ac.uk 20603fcf9a The attached trivial patch fixes cases where a block device is mounted
read-only in domain 0, but still fails to be shared with a domU, because
it is mis-identified as being mounted writable.  (On SUSE, CDs and DVDs
are auto-mounted not with merely permissions "ro", but
"ro,nosuid,nodev", hence the mis-identification.)

Signed-off-by: Charles Coffing <ccoffing@novell.com>
2006-03-30 16:53:37 +01:00
awilliam@xenbuild.aw aba2f778df merge with xen-unstable.hg 2006-03-28 08:54:58 -07:00
harry@localhost.localdomain 5ebad7be89 Fix bug 515 by adding a global lock around the hotplug scripts in the non-udev hotplug case only.
There are two possible root causes for 515, both of which are only problems in the non-udev hotplug case because udev uses udevsend which already implements the required serialisation.

1) Script concurrency.
2) Kernel reordering hotplug events.

This changeset fixes (1) but not (2).  Since (1) is the problem that seems to be happening this is probably OK.

A fix for (2) for the hotplug case might be to add extra serialisation using state changes in the store but this would impact all the drivers and the code and extra complexity would be redundant once everyone had moved to udev.  This doesn't seem worthwhile unless we actually start to see (2) happening.
2006-03-24 14:31:20 +01:00
awilliam@xenbuild.aw 94510c79f1 [IA64] avoid networking in VTI
It's currently not working.

From: Zhang Xiantao <xiantao.zhang@intel.com>
2006-03-23 14:14:20 -07:00
emellor@leeni.uk.xensource.com af19ef96d4 Added example config entries for xend-tcp-xmlrpc-server and
xend-unix-xmlrpc-server.  Deprecate the SXP-based servers, and disable them
by default.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-23 11:55:56 +01:00
kaf24@firebug.cl.cam.ac.uk 8fa9ee9178 Prevent a stray error message in the case that either DISTDIR or
DESTDIR is empty, by preventing readlink from being called in that
case.

Another option would be to use readlink -s, but that has the
undesirable effect of staying silent in situations other than empty
DISTDIR/DESTDIR

Signed-off-by: Aron Griffis <aron@hp.com>
2006-03-21 22:57:47 +01:00
kaf24@firebug.cl.cam.ac.uk 8c489ac453 The following patch adds support to vmxassist for SYSLINUX/ISOLINUX. This
enables you to install SLES-10 as an unmodified guest.

Notice that at this time, vmxassist does not support the graphic bootstrap
loader (gfxboot), so be sure the set "stdvga=1" in your configuration file
to prevent gfxboot from kicking in (or hit SHIFT really fast).

Signed-Off-By: Leendert van Doorn <leendert@watson.ibm.com>
2006-03-21 22:50:48 +01:00
awilliam@xenbuild.aw 9dc734c3ad [IA64] VT-i Domains should use same hvm builder as VT-x
Signed-off-by: Fred Yang <fred.yang@intel.com>
2006-03-17 14:26:24 -07:00
emellor@leeni.uk.xensource.com 988c0cb02e Cope when the filename returned by losetup for an existing loop device is not
fully qualified.  In this case, the readlink -f call to canonicalise that name
fails.

Closes bug #553.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-03 15:32:42 +01:00
emellor@leeni.uk.xensource.com 8920f45cc8 Silence the messages that are emitted when removing nodes that already have
been removed.  This is fine, in a cleanup script.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-02 02:01:17 +01:00
emellor@leeni.uk.xensource.com 4749c682b0 Avoid a race between Xend removing the vm entries corresponding to a domain,
and the hotplug scripts checking whether that domain is still alive.  This
triggers the "xenstore-read: couldn't read path /local/domain/107/vm" message
in /var/log/xen-hotplug.log, followed by "Device XYZ is mounted in a guest
domain and so cannot be mounted now".

Closes bug #514.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-02 01:59:28 +01:00
emellor@leeni.uk.xensource.com 3775cfcd81 Use cleverer sed pattern to avoid use of head -1.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-02-27 17:16:28 +01:00
emellor@leeni.uk.xensource.com f32e156c0e Break out the hotplug cleanup code into xen-hotplug-cleanup. Claim the block
script's lock before doing the cleanup, to avoid a race that causes the message
"xenstore-list: could not list path backend/vbd/40" in /var/log/hotplug.log,
with a subsequent refusal to create the domain, after a domain reboot.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-02-27 17:16:04 +01:00
emellor@leeni.uk.xensource.com 7aa86f0d35 Move files that have appeared in the wrong place due to incorrect patch -p setting.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-02-27 16:28:57 +01:00
emellor@leeni.uk.xensource.com d8a4248e02 The attached patch does the following:
- introduces two basic tests for the virtual TPM (skipped on hardware
where a TPM is not available or vtpm manager has not been started
manually before)
- adapts the Makefiles to make the test cases available
- splits up the hotplug files into two files where the vtpm-common.sh
can be sourced by 'other' scripts as well
- uses echo "$var" to return variables from functions
- gets rid of the 'set +e" work-around
- introduces a script (vtpm-delete) to delete entries from the virtual
TPM directory in /etc/xen/vtpm.db

The xm-tests will skip over the 2nd test on most systems and the patch
has otherwise no effect on existing tests.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-02-27 16:13:05 +01:00
emellor@leeni.uk.xensource.com 46ede6808b The attached patch breaks out
- log() function from xen-hotplug-common.sh -> logging.sh
- locking-related functions from xen-hotplug-common.sh  -> locking.sh

- xen-hotplug-common.sh 'sources' both those files now to not loose
these functions (which should make the break-out atomic)

- adapts the Makefile to install locking.sh and logging.sh at the right
place.

I ran the xm-tests over it and no (additional) errors appear due to this
change.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-02-27 16:11:01 +01:00
emellor@leeni.uk.xensource.com 5c0eb80b10 Merged. 2006-02-27 11:55:11 +01:00
emellor@leeni.uk.xensource.com d7f4473fae Adding a second IP address onto eth0 causes the vif-* hotplug scripts to
fail: ip_of() is returning a LIST of IP addresses, one per line.
The vif-scripts attempt to use the list where single addresses ought to
be, with predictable results. This patch changes ip_of() to return
the first address in the list, which seems to be the first one configured.

Signed-off-by: Jim Dykman <dykman@us.ibm.com>
2006-02-22 21:52:30 +01:00
kaf24@firebug.cl.cam.ac.uk ac2f4cf2ca Add PAE option to HVM config file.
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>
2006-02-21 18:15:49 +01:00
cl349@firebug.cl.cam.ac.uk 55ee36debf tpm: Fixes and cleanup
Fix a recently found problem in tpm.c, move the vtpm sysfs
entry to /sys/device/platform/tpm_vtpm and add locking in
the vtpm hotplug script.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-02-21 17:13:30 +00:00
emellor@leeni.uk.xensource.com 3f3e0cd4be Rather than require config changes if you aren't using eth0, use the
default network device available no matter the name. It can still
be configured if you want a specific network device.

Patch by Bill Nottingham <notting@redhat.com>.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-02-10 02:03:24 +01:00
kaf24@firebug.cl.cam.ac.uk 74bcc224ed /sbin/udev no longer exists in upstream udev, so use udevinfo for
version info.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2006-02-08 00:30:50 +01:00
kaf24@firebug.cl.cam.ac.uk d7e8de1b92 Update the TPM hotplug scripts to determine the reason of a
device creation (create/resume).

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-02-04 10:58:28 +01:00