This file is indexed.

/usr/lib/xen-4.4/bin/xen-migrate-xend-managed-domains is in xen-utils-4.4 4.4.0-0ubuntu5.

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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/sh
SRCDIR="/var/lib/xend/domains"
TGTDIR="/etc/xen"

if [ ! -d "$SRCDIR" ]; then
	exit 0
fi
if [ -f /var/lib/xend/migration-done ]; then
	exit 0
fi

XENPROC="/proc/xen/capabilities"
if [ ! -f $XENPROC ] || [ "$(cat $XENPROC)" != "control_d" ]; then
	if [ "$(find $SRCDIR -name config.sxp 2>/dev/null)" != "" ]; then
		echo "---"
		echo "--- INFO: Cannot migrate xend domains when not"
		echo "---       running under Xen hypervisor!"
		echo "---"
		echo "Boot into the Xen hypervisor and run"
		echo "$0 inside dom0."
	fi >&2
	exit 0
fi

PATH="$(/usr/lib/xen-common/bin/xen-dir)/bin:$PATH"
export PATH

N=0
LOG=""
for DOMUUID in $(ls -1 "$SRCDIR"); do
	CFGFILE="$SRCDIR/$DOMUUID/config.sxp"
	if [ -f "$CFGFILE" ]; then
		LOG="$LOG\n$(xen-sxp2xm $CFGFILE $TGTDIR)"
		if [ $? -eq 0 ]; then
			N=$(($N + 1))
		fi
	fi
done

if [ $N -gt 0 ]; then
	echo "---"
	echo "--- INFO"
	echo "---"
	echo "The xm toolstack is deprecated and the default was changed to"
	echo "xl. However the xl toolstack does not support the managed"
	echo "domains of xend. $N domain(s) were converted into the xen-xm"
	echo "format and can be found under /etc/xen/<domain name>.cfg."
	echo "The conversion might be incomplete. Please make sure to review"
	echo "the result."
	echo "Note that those might only be meaningful if using the xl/xen"
	echo "commands directly. Access through libvirt will get (or has"
	echo "been) migrated separately."
	echo "$LOG"
	touch /var/lib/xend/migration-done
fi >&2