Monday, 19 January 2015

Can't start a VM with Ganeti - Debian 7

So you just installed a Debian 7 Wheezy Ganeti managed Xen cluster node and it won't start up your VM with this error:
# gnt-instance start goat.cs
Waiting for job 1277134 for vminstance ...
Job 1277134 for goat.cs has failed: Failure: command execution error:
Could not start instance: Hypervisor error: Failed to start instance goat.cs: exited with exit code 1 (Using config file "/etc/xen/goat.cs".
Error: Device 0 (vif) could not be connected. /etc/xen/scripts/vif-bridge failed; error detected.
)
If look in the log file xen-hotplug.log and see this error:
# tail /var/log/xen/xen-hotplug.log
/etc/xen/scripts/vif-bridge: line 84: setup_bridge_port: command not found
Then edit the /etc/xen/scripts/xen-network-common.sh script removing the _ (underscore) from the _setup_bridge_port command. This should fix the problem and allow you to start your VM.

Saturday, 17 January 2015

Friday, 16 January 2015

Revert to a previous Boot Environment - Solaris 11

Revert to a previous Boot Environment:
beadm list
beadm activate solaris-backup-1
reboot

Thursday, 15 January 2015

Wednesday, 14 January 2015

Unattended Updates - Debian

To set up auto updates on Debian, do the following:
apt-get install unattended-upgrades apt-listchanges
Edit /etc/apt/apt.conf.d/50unattended-upgrades and uncomment the line:
Unattended-Upgrade::Mail "root";
Edit /etc/apt/apt.conf.d/20auto-upgrades, and add the following:
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
Or run the following command as root:
dpkg-reconfigure -plow unattended-upgrades

Tuesday, 13 January 2015

Creating an encrupted password for kickstart - CentOS

Use OpenSSL to generate an MD5 crypt:
# openssl passwd -1 "password here"
$1$e/5d7DEs$bhFiuOQp8MMe785dzvBPv.
Use grub-crypt to generate a SHA256 crypt:
# grub-crypt --sha-256
Password:
Retype password:
$5$W/DyB05xk2UIZz6k$YyBl36yKHVmaFmJHNS1m/b2/viRa6KnQe3dDQVZZ5n3
Put the password hash in your kickstart file:
rootpw --iscrypted password_hash
Make sure your authconfig configuration matches the crypt:
authconfig --enableshadow [--enablemd5|--passalgo=sha256]

Monday, 12 January 2015

INIT: Id “1” respawning too fast: disabled for 5 minutes

Console error message:
INIT: Id “1” respawning too fast: disabled for 5 minutes
What causes this problem? Apparently, this is due to this line in my /etc/inittab file:
1:2345:respawn:/sbin/getty 38400 tty1
Which says to spawn a terminal on a non existant serial port. You get a respawning too fast error when an inittab line makes no sense. So simptly comment it out:
#1:2345:respawn:/sbin/getty 38400 tty1