summaryrefslogtreecommitdiffstats
path: root/genome-autostarter/genome-autostarter.sh
blob: 1555d0522d74a7d26d71a5d19f3c310dfc25520f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash
uname -a | grep -i xen
if [ $? == 0 ]; then
       	# We're using Xen
	find /etc/xen/auto -name "*" -type l | xargs -n1 basename 2> /dev/null | xargs -n1 virsh start &> /dev/null
else
	# We're using kvm
	for vm_xml in `find /etc/libvirt/qemu/autostart -name "*" -type l`; do
           vm=`basename $vm_xml .xml` # Chop of the extension
           virsh start $vm &> /dev/null
	done
fi