获取资源内容
在 ESXi 主机上配置 GuestStore 存储库后,可以使用 VMware Tools 命令行实用程序轻松访问 GuestStore 存储库中的资源。
您可以使用 VMware Tools 工具箱命令行实用程序从 GuestStore 存储库中获取资源内容。
"C:\Program
Files\VMware\VMwareTools\VMwareToolboxCmd.exe" gueststore getcontent
<resource path> <output file>
/usr/bin/vmware-toolbox-cmd
gueststore getcontent <resource path> <output file>
其中,
<resource
path>
是 GuestStore 存储库数据存储根 URL 下的路径。例如:
"C:\Program Files\VMware\VMware
Tools\VMwareToolboxCmd.exe" gueststore getcontent
/vmware/apps/vmtools/windows64/metadata.json
C:\Temp\metadata.json
"C:\Program Files\VMware\VMware Tools\VMwareToolboxCmd.exe" gueststore
getcontent /vmware/configurations/vmtools/windows/tools.conf
C:\Temp\tools.conf
客户机管理员可以使用以下
tools.conf
设置来控制对 GuestStore 存储库的访问。[guestStore]
disabled = false
(默认情况下,在 ESXi 主机端进行配置时启用对 GuestStore 存储库的访问)adminOnly =
false
(默认情况下,无需管理员特权即可访问 GuestStore 存储库)启用 GuestStore 访问 (
disabled = false
) 后,adminOnly =
true
设置会限制仅管理员或 root 用户可以通过运行以下命令来从 GuestStore 存储库获取内容:- Windows"C:\Program Files\VMware\VMwareTools\VMwareToolboxCmd.exe" gueststore getcontent <resource path> <output file>
- Linux/usr/bin/vmware-toolbox-cmd gueststore getcontent <resource path> <output file>