大规模分发 VMware Tools 配置
您可以从 GuestStore 存储库在多个虚拟机之间分发 VMware Tools 配置文件。
GlobalConf
功能将使用 GuestStore 存储库中可用的配置自动更新 VMware Tools 配置。默认情况下会禁用 GlobalConf
功能。启用此功能后,vSphere 管理员可以在 vSphere 环境中的多个虚拟机之间分发全局 VMware Tools 配置。 GlobalConf
功能依赖于 GuestStore 存储库中存在的 VMware Tools 配置。默认情况下,可以从 GuestStore 存储库 "/vmware/configurations/vmtools/windows/tools.conf"
(对于 Windows GOSes)和 "/vmware/configurations/vmtools/linux/tools.conf"
(对于 Linux GOSes) 中获取 VMware Tools 配置,除非此行为被客户机内的本地 VMware Tools 配置中的设置所覆盖。使用此功能之前,应当将所需的 VMware Tools 配置作为 GlobalConf
功能要求的资源添加到 GuestStore 存储库中。启用
GlobalConf
功能后,VMware Tools 系统服务会定期检查 GuestStore 存储库中的 tools.conf
文件。 - 如果存在tools.conf文件,则会在运行时下载该文件并在本地应用。在此过程中,只会应用客户机内的本地tools.conf文件中未指定的设置。
- 如果 GuestStore 存储库中没有tools.conf文件,则先前下载的任何配置文件都将从客户机的本地文件系统中删除。
默认情况下,VMware Tools 中的
GlobalConf
模块会每 60 分钟检查一次 GuestStore 存储库。在虚拟机内,客户机管理员可以手动编辑 tools.conf
文件,以配置与 GlobalConf
模块相关的各种设置。GlobalConf
功能具有以下配置设置:[globalconf]
- enabled=true:启用模块。
- poll-interval=3600:应指定时间间隔值(以秒为单位)。默认值:3600 秒。最小值:1800 秒。
- resource=/path/to/tools/conf/in/gueststore:对于 Windows GOSes,默认值为"/vmware/configurations/vmtools/windows/tools.conf",对于 Linux GOSes,默认值为"/vmware/configurations/vmtools/linux/tools.conf"。
- 如果在本地tools.conf文件中更新了上述任何设置,则必须重新启动 VMware Tools 系统服务 (vmsvc)。
- 从 VMware Tools 11.3.0 版本开始,在tools.conf文件中修改GlobalConf相关设置后,无需再重新启动 VMware Tools 系统服务 (vmsvc)。
您可以使用 VMware Tools 工具箱命令行实用程序来执行以下操作:
- 查询GlobalConf模块的状态。
- WindowsVMwareToolboxCmd.exe globalconf status
- Linuxvmware-toolbox-cmd globalconf status
- 启用GlobalConf模块。
- WindowsVMwareToolboxCmd.exe globalconf enable
- Linuxvmware-toolbox-cmd globalconf enable
- 禁用GlobalConf模块。
- WindowsVMwareToolboxCmd.exe globalconf disable
- Linuxvmware-toolbox-cmd globalconf disable
- 从 GuestStore 存储库触发 VMware Tools 配置的即时更新,而无需等待轮询时间间隔。
- WindowsVMwareToolboxCmd.exe globalconf refresh
- Linuxvmware-toolbox-cmd globalconf refresh
您可以使用
globalconf
enable
或 globalconf disable
命令来启用或禁用 GlobalConf
功能,而无需编辑 tools.conf
。