xen guest tuning

fix the serial console

mv -i lala/etc/ttys lala/etc/ttys.dist
vi lala/etc/ttys

xc0     "/usr/libexec/getty Pc"  xterm   onifexists secure

network

vi lala/etc/rc.conf

hostname="freebsd.localdomain"

# esp. required for the cloud image
growfs_enable="YES"

ifconfig_xn0="inet CIDR up"
defaultrouter="GW-IP"
sshd_enable=yes

mv lala/etc/ssh/sshd_config lala/etc/ssh/sshd_config.dist
grep -vE '^#|^$' lala/etc/ssh/sshd_config.dist > lala/etc/ssh/sshd_config
echo permitrootlogin prohibit-password >> lala/etc/ssh/sshd_config

mkdir lala/root/.ssh/
cat ~/.ssh/*pub
vi lala/root/.ssh/authorized_keys

(paste your pub key)

chmod 600 lala/root/.ssh/authorized_keys
chmod 700 lala/root/.ssh/
chmod 700 lala/root/

mv -i lala/etc/hosts lala/etc/hosts.dist
vi lala/etc/hosts

127.0.0.1          localhost.localdomain localhost
::1          localhost.localdomain localhost

10.1.0.9        freebsd.localdomain freebsd

vi lala/etc/resolv.conf

nameserver 10.1.255.19
nameserver 10.1.255.20

environment

ls -lF lala/etc/localtime
ln -s ../usr/share/zoneinfo/Europe/Moscow lala/etc/localtime