aboutsummaryrefslogtreecommitdiffstats
path: root/tools/examples
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-07-03 13:39:06 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-07-03 13:39:06 +0100
commit08a42ca0b58c1932ee14bd23e1454a1a93fa95bc (patch)
tree9a7ffa03bb004e79a9edec30efc9a371bbd5ff18 /tools/examples
parentd2831c8ba98dd73322b2c14f86f66386bdb63d62 (diff)
downloadxen-08a42ca0b58c1932ee14bd23e1454a1a93fa95bc.tar.gz
xen-08a42ca0b58c1932ee14bd23e1454a1a93fa95bc.tar.bz2
xen-08a42ca0b58c1932ee14bd23e1454a1a93fa95bc.zip
pvSCSI: xend changes
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com> Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
Diffstat (limited to 'tools/examples')
-rw-r--r--tools/examples/vscsi22
-rwxr-xr-xtools/examples/xen-backend.agent3
-rw-r--r--tools/examples/xen-backend.rules1
-rw-r--r--tools/examples/xmexample.hvm23
-rw-r--r--tools/examples/xmexample.vti22
-rw-r--r--tools/examples/xmexample123
-rw-r--r--tools/examples/xmexample222
7 files changed, 116 insertions, 0 deletions
diff --git a/tools/examples/vscsi b/tools/examples/vscsi
new file mode 100644
index 0000000000..5ac26147ec
--- /dev/null
+++ b/tools/examples/vscsi
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# Copyright (c) 2007, FUJITSU Limited
+# Based on the block scripts code.
+#
+
+dir=$(dirname "$0")
+. "$dir/xen-hotplug-common.sh"
+
+findCommand "$@"
+
+case "$command" in
+ add)
+ success
+ ;;
+ remove)
+ # TODO
+ exit 0
+ ;;
+esac
+
+exit 0
diff --git a/tools/examples/xen-backend.agent b/tools/examples/xen-backend.agent
index f043854ad0..5cb536a6a9 100755
--- a/tools/examples/xen-backend.agent
+++ b/tools/examples/xen-backend.agent
@@ -19,6 +19,9 @@ case "$XENBUS_TYPE" in
vif)
[ -n "$script" ] && $script "$ACTION"
;;
+ vscsi)
+ /etc/xen/scripts/vscsi "$ACTION"
+ ;;
esac
case "$ACTION" in
diff --git a/tools/examples/xen-backend.rules b/tools/examples/xen-backend.rules
index 33064acdb6..fe21fc1357 100644
--- a/tools/examples/xen-backend.rules
+++ b/tools/examples/xen-backend.rules
@@ -3,6 +3,7 @@ SUBSYSTEM=="xen-backend", KERNEL=="vbd*", RUN+="/etc/xen/scripts/block $env{ACTI
SUBSYSTEM=="xen-backend", KERNEL=="vtpm*", RUN+="/etc/xen/scripts/vtpm $env{ACTION}"
SUBSYSTEM=="xen-backend", KERNEL=="vif*", ACTION=="online", RUN+="$env{script} online"
SUBSYSTEM=="xen-backend", KERNEL=="vif*", ACTION=="offline", RUN+="$env{script} offline"
+SUBSYSTEM=="xen-backend", KERNEL=="vscsi*", RUN+="/etc/xen/scripts/vscsi $env{ACTION}"
SUBSYSTEM=="xen-backend", ACTION=="remove", RUN+="/etc/xen/scripts/xen-hotplug-cleanup"
KERNEL=="evtchn", NAME="xen/%k"
KERNEL=="blktap[0-9]*", NAME="xen/%k"
diff --git a/tools/examples/xmexample.hvm b/tools/examples/xmexample.hvm
index f5b21b576c..94f5b92eef 100644
--- a/tools/examples/xmexample.hvm
+++ b/tools/examples/xmexample.hvm
@@ -282,3 +282,26 @@ serial='pty'
# '0' -> the bit must be '0'
# 'x' -> we don't care (do not check)
# 's' -> the bit must be the same as on the host that started this VM
+
+
+#-----------------------------------------------------------------------------
+# Configure PVSCSI devices:
+#
+#vscsi=[ 'PDEV, VDEV' ]
+#
+# PDEV gives physical SCSI device to be attached to specified guest
+# domain by one of the following identifier format.
+# - XX:XX:XX:XX (4-tuples with decimal notation which shows
+# "host:channel:target:lun")
+# - /dev/sdxx or sdx
+# - /dev/stxx or stx
+# - /dev/sgxx or sgx
+# - result of 'scsi_id -gu -s'.
+# ex. # scsi_id -gu -s /block/sdb
+# 36000b5d0006a0000006a0257004c0000
+#
+# VDEV gives virtual SCSI device by 4-tuples (XX:XX:XX:XX) as
+# which the specified guest domain recognize.
+#
+
+#vscsi = [ '/dev/sdx, 0:0:0:0' ]
diff --git a/tools/examples/xmexample.vti b/tools/examples/xmexample.vti
index 1aed0db090..9493bae130 100644
--- a/tools/examples/xmexample.vti
+++ b/tools/examples/xmexample.vti
@@ -161,3 +161,25 @@ serial='pty'
# 'windows' - All Windows variants (Windows Server 2003/2008)
#
#guest_os_type='default'
+
+#-----------------------------------------------------------------------------
+# Configure PVSCSI devices:
+#
+#vscsi=[ 'PDEV, VDEV' ]
+#
+# PDEV gives physical SCSI device to be attached to specified guest
+# domain by one of the following identifier format.
+# - XX:XX:XX:XX (4-tuples with decimal notation which shows
+# "host:channel:target:lun")
+# - /dev/sdxx or sdx
+# - /dev/stxx or stx
+# - /dev/sgxx or sgx
+# - result of 'scsi_id -gu -s'.
+# ex. # scsi_id -gu -s /block/sdb
+# 36000b5d0006a0000006a0257004c0000
+#
+# VDEV gives virtual SCSI device by 4-tuples (XX:XX:XX:XX) as
+# which the specified guest domain recognize.
+#
+
+#vscsi = [ '/dev/sdx, 0:0:0:0' ]
diff --git a/tools/examples/xmexample1 b/tools/examples/xmexample1
index 1a5c4d999e..fe382d43f6 100644
--- a/tools/examples/xmexample1
+++ b/tools/examples/xmexample1
@@ -185,4 +185,27 @@ extra = "4"
#on_reboot = 'restart'
#on_crash = 'restart'
+#-----------------------------------------------------------------------------
+# Configure PVSCSI devices:
+#
+#vscsi=[ 'PDEV, VDEV' ]
+#
+# PDEV gives physical SCSI device to be attached to specified guest
+# domain by one of the following identifier format.
+# - XX:XX:XX:XX (4-tuples with decimal notation which shows
+# "host:channel:target:lun")
+# - /dev/sdxx or sdx
+# - /dev/stxx or stx
+# - /dev/sgxx or sgx
+# - result of 'scsi_id -gu -s'.
+# ex. # scsi_id -gu -s /block/sdb
+# 36000b5d0006a0000006a0257004c0000
+#
+# VDEV gives virtual SCSI device by 4-tuples (XX:XX:XX:XX) as
+# which the specified guest domain recognize.
+#
+
+#vscsi = [ '/dev/sdx, 0:0:0:0' ]
+
#============================================================================
+
diff --git a/tools/examples/xmexample2 b/tools/examples/xmexample2
index 12b9b0f6ca..53ee3aa98e 100644
--- a/tools/examples/xmexample2
+++ b/tools/examples/xmexample2
@@ -221,4 +221,26 @@ extra = "4 VMID=%d usr=/dev/sda6" % vmid
#on_reboot = 'restart'
#on_crash = 'restart'
+#-----------------------------------------------------------------------------
+# Configure PVSCSI devices:
+#
+#vscsi=[ 'PDEV, VDEV' ]
+#
+# PDEV gives physical SCSI device to be attached to specified guest
+# domain by one of the following identifier format.
+# - XX:XX:XX:XX (4-tuples with decimal notation which shows
+# "host:channel:target:lun")
+# - /dev/sdxx or sdx
+# - /dev/stxx or stx
+# - /dev/sgxx or sgx
+# - result of 'scsi_id -gu -s'.
+# ex. # scsi_id -gu -s /block/sdb
+# 36000b5d0006a0000006a0257004c0000
+#
+# VDEV gives virtual SCSI device by 4-tuples (XX:XX:XX:XX) as
+# which the specified guest domain recognize.
+#
+
+#vscsi = [ '/dev/sdx, 0:0:0:0' ]
+
#============================================================================