CentOS电源管理-利用ACPID直接关闭虚机主机

504 words in this article. # ACPID , CentOS电源管理 , CentOS , VirtualBox/ a

先在CentOS上安装ACPID服务

yum -y install acpid
systemctl enable acpid
systemctl start acpid

# CentOS 6
# chkconfig acpid on

然后,建立Windows bat文件,内容如下:

@echo off

d:

cd "D:\Program Files\Oracle\VirtualBox"

VBoxManage.exe controlvm "CentOS" acpipowerbutton

echo.
echo CentOS电源已经关闭
echo.
echo 【按任意键退出】

pause>nul

exit

代码中cd后是virtualbox安装目录,"CentOS"是虚拟主机名,需要实际情况进行修改即可。

All rights are reserved and users must seek my permission before making any other use of material contained in this site.

Add comments

No comment yet.