Virtualbox 正在运行“VBoxManage startvm…”:如何判断VM何时正在运行?

Virtualbox 正在运行“VBoxManage startvm…”:如何判断VM何时正在运行?,virtualbox,Virtualbox,我尝试使用VBoxManage guestproperty wait…,但看起来很明显的模式不起作用。我正在编写一个脚本,它导入一个新的虚拟机,配置它,启动它,拍摄快照,然后关闭它。显然,在执行最后两个步骤之前,我需要知道虚拟机何时运行 谢谢。您可以使用showvminfo输出: 对于Linux: VBoxManage showvminfo "vm_name" | grep State 对于Windows: VBoxManage showvminfo "vm_name" | findstr S

我尝试使用
VBoxManage guestproperty wait…
,但看起来很明显的模式不起作用。我正在编写一个脚本,它导入一个新的虚拟机,配置它,启动它,拍摄快照,然后关闭它。显然,在执行最后两个步骤之前,我需要知道虚拟机何时运行


谢谢。

您可以使用
showvminfo
输出:

对于Linux:

VBoxManage showvminfo "vm_name" | grep State
对于Windows:

VBoxManage showvminfo "vm_name" | findstr State
请参见下面的线程: