我目前正在testingUbuntu 10.04,并安装了VirtualBox软件。 我还将Ubuntu 10.04安装为在主机系统上运行的VirtualBox guest虚拟机。
我已经将VirtualBox Utils安装到客户操作系统中,如下所示:
sudo apt-get install virtualbox-ose-guest-utils
我想要做的就是使用VBoxManage命令从主机系统启动对guest虚拟机的受控closures。
我第一次尝试这个命令:
VBoxManage controlvm guest poweroff
哪些工作,但没有启动一个控制关机,它有效地拉住了客人的插头。
我从那以后发现这个命令应该做的窍门是:
VBoxManage controlvm guest acpipowerbutton
但这似乎没有做任何事情。
谁能告诉我我做错了什么?
ps我不想使用SSH和证书来做到这一点,因为我也要运行Windows客户端,我希望解决scheme适用于所有客人。
编辑:刚刚发现这个post ,build议安装acpid进来的客人,但刚刚做到这一点,并重新启动系统,它似乎没有任何区别,因为主机仍然似乎接受命令,但没有发生客人。
第二编辑:acpi powerbutton事件configuration如下:
# /etc/acpi/events/powerbtn # This is called when the user presses the power button and calls # /etc/acpi/powerbtn.sh for further processing. # Optionally you can specify the placeholder %e. It will pass # through the whole kernel event message to the program you've # specified. # We need to react on "button power.*" and "button/power.*" because # of kernel changes. event=button[ /]power action=/etc/acpi/powerbtn.sh
上面的shell脚本(/etc/acpi/powerbtn.sh)存在
我讨厌发布自己的问题的答案,但我find了解决scheme…
只需将acpi-support安装到guest虚拟机中即可。
apt-get install acpi-support
我觉得acpid已经够了,但看起来好像不是。
我现在可以发出VBoxManage命令从主机发送一个ACPIPowerButton事件,该事件现在干净地在客户机上执行关机。
感谢大家的build议。
您的客人configuration为当它获取acpipowerbutton信号关机?