Commit Graph
516 Commits
Author SHA1 Message Date
Keir Fraser cd3b21408f Check phy: block device existence
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-07-18 12:44:58 +01:00
Keir Fraser fbc96ef66e pvscsi: Install vscsi script.
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
2008-07-18 11:22:12 +01:00
Keir Fraser 2d7612f2fe blktap scripts: deletion of double check and permission of using /dev/sdxx
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
2008-07-18 11:21:06 +01:00
Keir Fraser ddebb2820e stubdom: add example config file
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-18 11:19:17 +01:00
Keir Fraser 96f900ef40 Choice of network interface for establishing a bridge on if NFSROOT is used
This patch fixes a problem related to machines that are booted using
nfsroot ( '/' provided via nfs). Previously the code was assuming that
nfsroot would be provided via eth0. Now this additional code checks
over which interface the nfsroot is provided after detecting that
nfsroot is actually being used. To determine from where nfsroot is
mounted I am reading the kernel command line (/proc/cmdline) and
filter for an argument starting with 'nfsroot=' and determine the nfs
server's IP address by assuming the format 'nfsroot=<ip
adddress>:<path to root>' - if there's a better way of doing this,
please let me know.  After that I determine the interface over which
this IP address would be accessed using 'ip route get <address>'. Then
I compare that interface against a previously determined default
interface and if they are equal return a value that causes an
alternative interface to be chosen.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-07-14 10:04:41 +01:00
Keir Fraser 08a42ca0b5 pvSCSI: xend changes
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
2008-07-03 13:39:06 +01:00
Keir Fraser 8d574cc772 vtpm: Add two missing quotes in the vTPM hotplug script.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-07-03 11:31:40 +01:00
Keir Fraser da67ff89f7 xend: improve the rotation of qemu-dm logfiles.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-07-01 10:58:43 +01:00
Keir Fraser 5201eb72cb doc: Describes a generic 686 via the cpuid configure.
Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
2008-06-18 09:37:40 +01:00
Keir Fraser 30be3112c6 rools/examples: Fix 'make install'.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-23 10:47:16 +01:00
Keir Fraser d6f7e230eb Make ssl relocation server listen on different port
This patch makes ssl relocation server listen on 8003 if enabled.

Whether to start ssl relocation server now controlled by
xend-relocation-ssl-server. So ssl and non-ssl relocation server can
run simultaneously. You can also only start ssl server or only start
non-ssl relocation server.

When mix deploy xen 3.2 server (has no ssl support) and 3.3 servers,
start ssl and non-ssl relocation server simultaneously can keep
backward compatibility.

It's also more reasonable to have separate ports for ssl and non-ssl.

In this patch, also renames xend-relocation-tls to xend-relocation-ssl.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
2008-05-23 10:41:44 +01:00
Keir Fraser 80a73755d2 Remove xend-config-xenapi.sxp and xm-config-xenapi.xml
The contents of these two files are duplicate of xend-config.sxp and
xm-config.xml. They only add maintaining burdens to developers.

This patch removes them permanently.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
2008-05-23 09:47:45 +01:00
Keir Fraser da6d5145a5 Add extra CPUID config examples to sample HVM config file.
From: Jean Guyader <jean.guyader@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-13 09:58:18 +01:00
Keir Fraser 0653286ebb Fix xmexamples to reflect new meaning of cpus= config option.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-05-12 10:13:15 +01:00
Keir Fraser 175929a3b4 Fixed typos in xmexamples.
Signed-off-by: Hiroya INAKOSHI <inakoshi.hiroya@jp.fujitsu.com>
2008-05-08 11:13:51 +01:00
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