devstack/tools/xen/devstackubuntu_latecommand.sh
Bob Ball 5b9adb60de XenAPI: Move some boot-time functions to install-time
The boot-time script (prepare_guest.sh) is one of the less reliable parts
of the install process.  This change enables SSH into the host as well as
reporting of the IP address.  This significantly helps debugging issues
now and enables moving of all other setup code to being executed over SSH.

Change-Id: I1555f1d91353ba8b75e2de4607df33ee20307a6e
2015-02-11 11:15:02 +00:00

15 lines
448 B
Bash

#!/bin/bash
set -eux
# Need to set barrier=0 to avoid a Xen bug
# https://bugs.launchpad.net/ubuntu/+source/linux/+bug/824089
sed -i -e 's/errors=/barrier=0,errors=/' /etc/fstab
# Allow root to login with a password
sed -i -e 's/.*PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config
# Install the XenServer tools so IP addresses are reported
wget --no-proxy @XS_TOOLS_URL@ -O /root/tools.deb
dpkg -i /root/tools.deb
rm /root/tools.deb