I am writing a simple script that creates a new VirtualBox virtual machine, deploys it, and then connects to it via SSH to execute some commands. The problem is that I have to wait a certain time to load the virtual machine. I am currently just doing sleep 120 in my script to sleep for 2 minutes. However, instead of waiting 2 minutes, I would like to receive some kind of notification when the VM boots up and is ready to accept SSH connections. Is it possible?
PS: Solutions involving guest add-ons will not work - OS on the guest side is vanilla CentOS 5.7, guest add-ons are not installed.
user500944
source share