I tried using VBoxManage guestproperty wait <vmname> ... but what looked like obvious patterns didn't work. I'm writing a script which imports a new VM, configures it, launches it, takes a snapshot, and then closes it, and obviously I need to know when the VM is running before taking the final two steps.

Thanks.

有帮助吗?

解决方案

You can use showvminfo output:

for Linux:

VBoxManage showvminfo "vm_name" | grep State

for Windows:

VBoxManage showvminfo "vm_name" | findstr State

See the thread below:

https://unix.stackexchange.com/questions/28611/how-to-automatically-start-and-shut-down-virtualbox-machines

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top