mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
a device from two guests, or from dom 0 and a guest, can destroy the filesystem, and this check prevents that. This should ensure that the xm tests 11_block_attach_shared_dom0 and 12_block_attach_shared_domU should pass. Closes bug #331. Devices may be shared only if all uses are read-only. If anyone has read-write access to a device, then no sharing is allowed. The mode in the config file may now have an exclamation mark appended, to indicate that devices may be shared (i.e. that this new check should be bypassed). This supports some network block devices, but is clearly dangerous and should only be used when you know what you are doing. The mode specified in the config file is now written explicitly to the store, To implement this, the blkback driver has been changed to create two entries in /sys describing each device in use. This means that we can determine which devices are in use without crawling through the store. The physical-device node has been changed to give the major and minor of the device, separated by a colon. This means that we do not need to pack these numbers into one, removing the restriction to 8 bit minors that we had in place before. The mode specified in the config file is now written explicitly to the store, rather than using the presence or absence of a read-only node. This supports the write-sharing override above. If the device is in use, a new hotplug status of "busy" is written to the store, and a message is written to a new hotplug-error node. Xend uses these things for diagnosis. The block scripts do not need to handle online or offline events, so this support has been removed. These scripts can be called twice, depending upon the hotplug config, so they now identify the second run and do not attempt to set up the device again. The device directories in the store are cleaned out before new details are written there. This prevents stale information from messing up block device hotplugging. This will be one cause of "blkback: changing physical device not supported" messages. Signed-off-by: Ewan Mellor <ewan@xensource.com>
Xen Control Tools - Examples
===================================
This directory contains example scripts and configurations for Xen.
For many operations you will either be able to use these scripts directly, or
incorporate code from them into your own scripts.
If you write a useful script and would like to share it, please do
send it (preferably with a little summary to go in this file) to
<xen-devel@lists.sourceforge.net> so we can add it to this directory.
block - called by xen-backend.agent to bind/unbind dev
block-common.sh - sourced by block, block-*
block-enbd - binds/unbinds network block devices
block-nbd - binds/unbinds network block devices
network-bridge - xen network start/stop script when using bridging
network-nat - xen network start/stop script when using NAT
network-route - xen network start/stop script when using routing
vif-bridge - virtual network start/stop script in bridged mode
vif-common.sh - sourced by vif-bridge
vif-nat - xen virtual network start/stop script in NAT mode
vif-route - xen virtual network start/stop script in routed mode
xen-backend.agent - calls block, vif-* scripts to add, remove, hotplug
devices
xen-backend.rules - hotplug script rules
xend-config.sxp - default xend configuration file
xen-hotplug-common.sh - sourced by vif-common.sh
xen-network-common.sh - sourced by vif-common.sh
xen-script-common.sh - sourced by network-bridge, xen-hotplug-common.sh
xmexample1 - example configuration script for 'xm create'
xmexample2 - a more complex configuration script for 'xm create'
xmexample3 - an advanced configuration script for 'xm create'
that utilizes the vmid
xmexample.nbd - configuration script that uses NBD filesystems
xmexample.vmx - a configuration script for creating a vmx domain with
'xm create'
xmexample.vti - a configuration script for creating a domain on vti