Hi
it's possible schedule a shutdown to a single VM?
I try with a bash script in crontab but doesn't work.
startvm() {
/usr/sbin/qm start $VM_ID
}
stopvm() {
/usr/sbin/qm stop $VM_ID
}
shutdownvm() {
/usr/sbin/qm shutdown $VM_ID
}
case "$1" in
start) startvm ;;
stop) stopvm ;;
shutdown) shutdownvm ;;
restart) stopvm; startvm ;;
*) echo "usage: $0 start|stop|shutdown|restart vm-id" >&2
exit 1
;;
esac
thanks in advance
Maurizio
it's possible schedule a shutdown to a single VM?
I try with a bash script in crontab but doesn't work.
startvm() {
/usr/sbin/qm start $VM_ID
}
stopvm() {
/usr/sbin/qm stop $VM_ID
}
shutdownvm() {
/usr/sbin/qm shutdown $VM_ID
}
case "$1" in
start) startvm ;;
stop) stopvm ;;
shutdown) shutdownvm ;;
restart) stopvm; startvm ;;
*) echo "usage: $0 start|stop|shutdown|restart vm-id" >&2
exit 1
;;
esac
thanks in advance
Maurizio