/usr/lib/xcp/bin/xe-set-iscsi-iqn is in xcp-xapi 1.3.2-5.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #!/bin/bash
#
# Copyright (c) Citrix Systems 2008. All rights reserved.
#
# Set the local non-pooled host to use a specific iSCSI IQN
set -e
XE="/usr/lib/xcp/bin/xe"
configmap="other-config"
configkey="iscsi_iqn"
if [ ! -f /etc/xcp/inventory ]; then
echo Error: Not a XenServer host
exit 1
fi
usage () {
echo Usage: $0 iscsi_iqn
echo Set the local non-pooled host to use a specific iSCSI IQN
exit 1
}
if [ -z "$1" ]; then
usage
else
iqn="$1"
fi
. /etc/xcp/inventory
${XE} host-param-remove uuid=${INSTALLATION_UUID} param-name=${configmap} param-key=${configkey} || true
${XE} host-param-set uuid=${INSTALLATION_UUID} ${configmap}-${configkey}=${iqn}
|