I would like to shutdown a VM which is running Ubuntu 12.04LTS, and bring it up again after 5 mins.
Can this be done using command line ?
I would like to shutdown a VM which is running Ubuntu 12.04LTS, and bring it up again after 5 mins.
Can this be done using command line ?
This answer is for ubuntu. It won't run if your host os is Windows (as muru said).
I would suggest:
watch -n 300 <yourvmcommand> && sleep 300 && pkill <yourvmprocessname>
The watch
command will repeat every 300 secs the following:
Start the vm. If it started successfully then:
Wait 300 seconds. If it did wait 300 seconds then:
Kill the vm
Then watch takes over and will wait the 300 secs, then launch it again.