2024年4月12日发(作者:)
VM虚拟机开机启动需要运行五个服务项,对于偶尔使用虚拟机的朋友运行占用电脑
资源,开机拖慢速度。这里我找出了vmware开机会启动的服务项,运用批处理命令将其
设置为开机禁止启动并在需要用虚拟机的时候快捷便利手动开启其所需服务。我安装的虚
拟机是9.02版本的,其他版本对照改一下服务名称。
下面是CMD命令:
echo 进行服务设置
sc config VMwareHostd start= AUTO
sc config VMAuthdService start= AUTO
sc config "VMware NAT Service" start= AUTO
sc config VMnetDHCP start= AUTO
sc config VMUSBArbService start= AUTO
echo 服务设置成功
echo 开始启动服务
net start VMwareHostd
net start VMAuthdService
net start "VMware NAT Service"
net start VMnetDHCP
net start VMUSBArbService
echo 服务启动成功
echo OK 运行完毕
echo 按任意键退出
exit
上面是开启服务的命令,下面再附上关闭服务的命令,用于在不用虚拟机时关闭服务
节省电脑资源。
关闭服务CMD命令:
echo 开始停止服务
net stop VMwareHostd
net stop VMAuthdService
net stop "VMware NAT Service"
net stop VMnetDHCP
net stop VMUSBArbService
echo 停止服务成功
echo 进行服务设置
sc config VMwareHostd start= DISABLED
sc config VMAuthdService start= DISABLED
sc config "VMware NAT Service" start= DISABLED
sc config VMnetDHCP start= DISABLED
sc config VMUSBArbService start= DISABLED
echo 服务设置成功 结束 进程
taskkill /f /t /im
echo OK
echo 按任意键可退出
exit
命令使用方法:打开CMD命令窗口复制上面代码粘贴即可。
为了每次使用方便,强烈建议大家将命令做成bat批处理文件。方法很简单,讲上面
命令复制粘贴在文本文档中,然后将文本后缀名“txt”改成“bat”即可,下次直接双击
运行此文件,win7系统的用户需要使用管理员身份进行运行。


发布评论