601 Commits
Author SHA1 Message Date
Keir Fraser 2023e7a5c4 Fix xend config typos
Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
2008-05-01 09:50:58 +01:00
Keir Fraser 0f26d15c7b Add SSL/TLS support to relocation
* SSL/TLS support is disabled by default, as other server did.

 * If "xend-relocation-server-ssl-key-file" and
   "xend-relocation-server-ssl-cert-file" exist, SSL/TLS is enabled
   automatically.

 * "xend-relocation-tls" is used by relocation client only.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
2008-05-01 09:50:16 +01:00
Keir Fraser 5f14a87ceb x86, hvm: Guest CPUID configuration.
CPUID's replies are now pre-calculated in libxc and given to the
hypervisor via a new domctl.

There are two parts to this feature:
   - We can overwrite cpuid's replies.
   - We can check that a vm is compatible with a host's processor.

Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-25 13:44:45 +01:00
Keir Fraser 978e9bef8c hotplug scripts: Fix sharing check for blktap
Run check_blktap_sharing() only when a disk is added to guest with blktap.
A check_blktap_sharing() doesn't have to be run when a disk is removed.

Signed-off-by: Hirofumi Tsujimura <tsujimura.hirof@jp.fujitsu.com>
Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com>
2008-04-22 10:29:32 +01:00
Keir Fraser 54cdc383f1 Split the meaning of "dom0-min-mem = 0" to a new option.
I have written a patch to split the current meaning of
"dom0-min-mem = 0" to a new option "enable-dom0-ballooning".

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-07 15:01:26 +01:00
Keir Fraser 1fa1369d8a ioemu: SDL rendering using OpenGL
Add opengl support for rendering the guest framebuffer in the SDL
window. SDL is needed anyway to open the window and handle the
events. Opengl rendering is optional and can be turned off at both
compile time and in the vm configuration file.

Some of the benefits of using opengl are:

 - faster rendering, less CPU intensive, especially with good graphic
   cards;
 - makes the window resizing possible and hardware accelerated, thus
   very efficient and smooth;
 - allows other optimizations like sharing directly a buffer in vram
   with the guest (not yet implemented).

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2008-03-18 11:47:58 +00:00
Keir Fraser 6184985ce7 vtpm: script function for identifying vTPM by its UUID
I am adding some functions for external tools to call the vTPM scripts.
It also contains a fix for the functions that previously used to be
called by domain name, but now are using the vTPM's uuid as parameter.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-02-26 14:34:50 +00:00
Keir Fraser e63b739dff Add 'coredump-destroy' and 'coredump-restart' actions for crashed domains.
Xen-API already specifies these actions for the 'on_crash' domain exit
event. This patch makes them available for use in traditional domU
config files and through the xm tool as well.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2008-02-07 09:28:55 +00:00
Keir Fraser e9e114d5f4 Fix to Xen NAT network scripts for Debian.
Xen recently (changeset 16873:86c32269ba60) started looking for a
DHCP defaults file in /etc/sysconfig/dhcpd or /etc/defaults/dhcp.
Debian (lenny) puts this file in a different place though:
/etc/default/dhcp3-server.  I added this location to Xen's search
path.

From: Michael Abd-El-Malek <mabdelmalek@cmu.edu>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-02-02 10:55:25 +00:00
Keir Fraser d1ce2fc26b Remove outdated comments concerning Xen API in xend configuration file.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2008-01-25 13:29:31 +00:00
Keir Fraser c98471a3aa Fix losetup -r flag when we specify 'w!' for the disk mode.
From: Zhigang Wang <zhigang.x.wang@oracle.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-25 13:22:52 +00:00
Keir Fraser f33a7ba91c block scripts: use fatal() in xen-hotplug-common.sh if the file does not exist.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-01-24 14:41:26 +00:00
Keir Fraser 9577157dc4 network-nat: Fix NAT scripts.
Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
2008-01-24 14:37:53 +00:00
Keir Fraser 7d25fcefa9 Revert network-nat script changes introduced by 16739:33dcf04d77152.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-18 13:40:22 +00:00
Keir Fraser db13a968f5 network scripts: SUSE has sensible use of ifup nowadays
While wading through the patches made to Xen by OpenSUSE in their
[s]rpm, I found that they have removed various special casing for ifup
on ther distribution.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-01-17 15:14:17 +00:00
Keir Fraser aac518b954 tools/docs: Fix example and default IP addresses.
In various places in documentation and code, IP addresses are provided
as examples, defaults, or dummy configuration.  In general the
specific IP addresses used in Xen are not always appropriate.  (For
example, 1.2.3.4 is used in a few places!)

The following addresses should be used:
 * For examples and documentation, 192.0.2.0/24.  (See RFC3330.)
 * For defaults for private networks, a random network from RFC1918.
   I have randomly selected 172.30.206.0/24 for this purpose and
   documented this in at the only registry I know of,
   www.ucam.org/cam-grin.  This network should henceforth be used for
   default configurations of local bridges, test networks, etc. in
   Xen tools.

The following addresses should NOT be used:
 * 10.0.*.*, 10.1.*.*, 192.168.0.*, 192.168.1.*, etc.  Using these
   addresses gives greatly increased likelihood of collision, as
   ignorant network administrators and reckless middlebox vendors
   often pick networks from the bottom of 10/8 and 192.168/16.
 * 169.254.*.*.  These are reserved for zeroconf (ad-hoc networking)
   and should not be used for Xen private networks, bridges, etc.,
   etc.  Use of these addresses by Xen scripts causes trouble on hosts
   (eg laptops) which find themselves in ad-hoc networking
   environments.  I think this is not hypothetical (!) since at least
   one Linux distribution have specific code to detect this case and
   cause Xen startup to fail iff the host already has an external
   zeroconf address.
 * 1.2.3.4.  WTF !?

I have also used 127.0.255.255 in one place where apparently a dummy
address is needed (some Linux kernels won't accept a lack of an NFS
server address).  If 127.0.255.255 is mistakenly used it is unlikely
to do any damage to real traffic even if it does escape into the
network at large.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-01-17 15:13:40 +00:00
Keir Fraser 8c1b80e42d Fix network-bridge shell quoting.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-01-10 15:30:46 +00:00
Keir Fraser 83501deecf Handle netdev secondary addresses and labels
Fix the network-bridge logic to correctly transfer secondary IP
address from $netdev to $bridge.

e.g. if you add an secondary address/label/alias with:

  $> ip addr add 172.31.0.200/24 dev eth0 label eth0:00

then, "ip addr show dev eth0" gives e.g.:

  inet 172.31.0.10/24 brd 172.31.0.255 scope global eth0
  inet 172.31.0.200/24 scope global secondary eth0:00

and transfer_addrs() tries to execute:

  ip addr add 172.31.0.10/24 brd 172.31.0.255 scope global dev tmpbridge
  ip addr add 172.31.0.200/24 scope global secondary dev tmpbridge:00

which causes the sript to fail because:

  1) The device tmpbridge:00 doesn't exist
  2) The "secondary" flag isn't valid

This patch fixes the sed commands to instead give:

  ip addr add 172.31.0.10/24 brd 172.31.0.255 scope global dev tmpbridge label tmpbridge
  ip addr add 172.31.0.200/24 scope global dev tmpbridge label tmpbridge:00

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2008-01-08 09:43:44 +00:00
Keir Fraser 53f48ca221 Fix some build system error handling.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2007-12-20 13:16:21 +00:00
Keir Fraser db9b8625cc tools/examples/block better use of losetup -r
Use losetup -r when the vbd is specified to be readonly, but only if
-r is supported (rather than always creating a writeable losetup
mapping if possible).

This was inspired by (but not derived from) a diff from the Fedora 8
patchset which uses -r iff the vbd is specified as readonly.  We need
to be cleverer upstream because not all systems have losetup -r.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2007-12-19 15:05:15 +00:00
Keir Fraser dc5b64fd61 Check block file existence.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
2007-12-05 17:28:59 +00:00
Alex Williamson 1ea2ab2fe8 [IA64] Implement guest_os_type for ia64
This makes use of the domain config option guest_os_type for
ia64 and removes the backing for the previous ACPI based
mechanism used previously.  A user wanting optimal performance
for a specific type of OS guest running in an HVM domain should
make use of this new option.  See updated xmexmaple.vti for
available options.  All supported OSes should always work using
the default option or leaving the option unspecified.  Originally
based on patch from Zhang Xin.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2007-11-29 12:15:43 -07:00
Keir Fraser 93aac49128 network-bridge: Make detection of gateway device more robust.
Signed-off-by: Guillaume Rousse <Guillaume.Rousse@inria.fr>
2007-11-07 16:55:13 +00:00
Keir Fraser b2f3f8e649 Enable loopback disk image files on readonly nfs filesystem.
When we losetup a file on readonly nfs filesystem, it fails with:
# losetup /dev/loop7 /data/vm/xen_el5_i386_para/system.raw
/data/vm/xen_el5_i386_para/system.raw: Permission denied

New version of losetup has add a "-r" option for readonly loop, which
Linux kernel has supported for a long time. Some distribution (EL5
update, Fedora 8, etc.) have shipped it. This patch benefit this
option while doesn't break the old versions of losetup.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
2007-11-07 09:22:31 +00:00
Keir Fraser 818a831762 qemu vnc auth 4/4: XenD config for VNC TLS protocol
This patch adds support to XenD for configuring the previously added
TLS encryption and x509 certificate validation. At this time I have
only enabled this config to be done system-wide via
/etc/xen/xend-config.sxp. Since it requires the admin to add
certificates on the local FS, there's not much point in making it per
VM. The x509 certificates are located in /etc/xen/vnc. Since this
requires a special VNC client program (GTK-VNC,
virt-viewer/virt-manager or VeNCrypt viewer) the use of TLS is
disabled by default. Admins can enable it if they are using a suitable
client.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2007-10-30 09:32:10 +00:00
Keir Fraser 5ef7bed4e4 xend, acm: Trigger a script when a resource's label changes
This patch triggers a script when a resource's label changes. The xend
config file should provide a variable 'resource-label-change-script'
that can then be launched.

Signed-off-by; Stefan Berger <stefanb@us.ibm.com>
2007-10-29 08:46:34 +00:00
Keir Fraser 753df0d608 ia64: configure VHPT size per domain: common part
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2007-10-19 09:27:55 +01:00
Keir Fraser 6e91413a40 [NW scripts] Choose alternative interface if NFSroot is used.
Allow the network bridging setup script to choose an alternative
network interface if it is determined that the root is mounted using
NFS, which is assumed to be done over the NIC serving the default
gw. In this case the prefix of the device is used to find other
devices, i.e., if eth0 is the default device an alternative device may
be an other ones starting with 'eth'.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-10-05 10:31:25 +01:00
Keir Fraser b470f96ea7 [hotplug scripts] Unlock the 'block' lock before bailing.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-10-04 09:37:33 +01:00
Keir Fraser 36f49d79ff Fix external-device-migrate infinite loop.
For some (yet) unknown reason extern-device-migrate is called
twice, once with a missing domname argument.

The following invocation loops forever:
 external-device-migrate -domname
because "shift 2" never shifts ($# < 2) and $# is always 1.

From: Pascal Bouchareine <pascal@gandi.net>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-02 09:56:53 +01:00
Keir Fraser 1106867cc9 network-bridge: default to eth0 if no default gateway.
From: Luke Szymanski <Lukasz.Szymanski@unisys.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-21 17:22:15 +01:00
Keir Fraser d16f4f5f67 Fix typo in blktap script.
Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
2007-09-20 10:39:10 +01:00
Tim Deegan e58cf9dbf9 Xend: "shadow_memory" setting in xm config is in MiB, not bytes.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-09-11 12:30:39 +01:00
kfraser@localhost.localdomain c40696b705 Add line termination to 'echo' usage in network-bridge script.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-08-31 14:09:05 +01:00
kfraser@localhost.localdomain c0e85ece47 Fix blktap script for versions of readlink command that do not handle
regular files.
Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
Signed-off-by: Josh Nicholas <jnicholas@virtualiron.com>
2007-08-31 11:10:21 +01:00
kfraser@localhost.localdomain 270415d327 Add sharing-check for blktap
Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com>
Signed-off-by: Hirofumi Tsujimura <tsujimura.hirof@jp.fujitsu.com>
2007-08-17 10:02:52 +01:00
kfraser@localhost.localdomain f0a8a3f3fb [VTPM] Make vTPM hotplug scripts use the UUID of the vTPM instance
Make the vTPM hotplug script use the UUID of the vTPM instance for
associating it with its instance number rather than the name of the
domain.
Also change the cleanup in the xm test to use the atexit mechanism
rather than explicitly calling a function to clean up.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-07-17 10:33:26 +01:00
kfraser@localhost.localdomain c4d1247d00 hvm: Add global default keymap setting
Add global default keymap setting to be used when a VM does not have
a keymap configuration set.

Signed-off-by: Pat Campbell <plc@novell.com>
2007-07-06 16:16:57 +01:00
kfraser@localhost.localdomain 9848d66b4e xendomains: Better sanity checking of potetntial save records.
Signed-off-by: Gawain Lynch <gawain.lynch@gmail.com>
2007-07-03 10:12:22 +01:00
Keir Fraser 1b3a517175 Make network-bridge fail on NFS or iscsi root.
Since setting up bridging involves bringing down the network interface,
bridging clearly isn't compatible with the likes of NFS or iSCSI root.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2007-07-01 22:20:46 +01:00
Keir Fraser caa6c26fb3 xendomains: Ignore 'lost+found' when finding saved dom images.
Signed-off-by: Gawain Lynch <gawain.lynch@gmail.com>
2007-07-01 22:16:41 +01:00
kfraser@localhost.localdomain 477ac069bc tools: Allow xendomains to handle domain names >16 characters
The xendomains init script parses the output of "xm list", and
since xm list restricts the length of domains to 16 characters the
xendomain script cannot handle long domain names.

This patch makesit parse the output of "xm list -l" instead.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2007-06-19 16:29:22 +01:00
kfraser@localhost.localdomain fbb49d2b0d Synchronise xend-config file comments w.r.t. networking.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-06-05 17:05:13 +01:00
kfraser@localhost.localdomain 06809a93ad [NET] Remove netloop from network bridge init scripts.
The scripts are partly based on work by Daniel P. Berrange.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2007-06-04 11:01:46 +01:00
Ewan Mellor 1b0a8bb57e Added xeninfo.pl, a script for collecting statistics from Xen hosts using the
Xen-API.  This also serves as a good example of the use of XML::RPC::Client
with the Xen-API.

By Ingard Mevåg <ingard [at] mevaag [dot] no>.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2007-05-16 23:12:16 +01:00
kfraser@localhost.localdomain 07f8d1fdbf Fix TPM support in HVM domains
Signed-off-by:  Joseph Cihula <joseph.cihula@intel.com>
Signed-off-by:  Peter Yang <peisen.yang@intel.com>
2007-05-15 10:50:09 +01:00
kfraser@localhost.localdomain 96a333869f Add INIT INFO block to example init.d/xend file.
Without it SuSE (and others?) will start xend before the
network.
Signed-off-by: Robert Valentan <R.Valentan@solid-soft.at>
2007-04-27 16:21:20 +01:00
kfraser@localhost.localdomain 40bb2e5fea HVM: Allow qemu monitor to be configured in domain config file.
From: Yongkang You <yongkang.you@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-04-12 13:21:26 +01:00
Christian Limpach 58fcf598b5 [setup] Fix old style bridge setup.
Also only warn that we ran out of veth interfaces if we have any at all.

Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2007-04-11 19:04:10 +01:00
Christian Limpach 2bdbd3e193 [hvm] Keep track of time offset between domain time and dom0 time.
On each rtc time update from the hvm domain, we send an ioreq request
to qemu which then updates the time offset xenstore entry.  The time
offset is preserved across reboot and can be set on domain creation
by setting the rtc_timeoffset variable in a config file.

From: Andrei Petrov <andrei.petrov@xensource.com>
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2007-04-03 13:22:37 +01:00