使用 GuestInfo 變數查詢資訊
Last Updated January 26, 2025

您可以使用「guestinfo」變數來查詢資訊,例如版本說明、版本字串、組建編號等。
下表列出用於查詢資訊的「guestinfo」變數:
VMware Tools「guestinfo」變數
命令
說明
Windows 客體:
vmtoolsd --cmd "info-get guestinfo.vmtools.description"
rpctool.exe "info-get guestinfo.vmtools.description"
Linux 客體:
vmtoolsd --cmd "info-get guestinfo.vmtools.description"
vmware-rpctool "info-get guestinfo.vmtools.description"
報告版本說明。
Windows 客體:
vmtoolsd --cmd "info-get guestinfo.vmtools.versionString"
rpctool.exe "info-get guestinfo.vmtools.versionString"
Linux 客體:
vmtoolsd --cmd "info-get guestinfo.vmtools.versionString"
vmware-rpctool "info-get guestinfo.vmtools.versionString"
報告版本字串。
Windows 客體:
vmtoolsd --cmd "info-get guestinfo.vmtools.versionNumber"
rpctool.exe "info-get guestinfo.vmtools.versionNumber"
Linux 客體:
vmtoolsd --cmd "info-get guestinfo.vmtools.versionNumber"
vmware-rpctool "info-get guestinfo.vmtools.versionNumber"
報告版本號碼。
Windows 客體:
vmtoolsd --cmd "info-get guestinfo.vmtools.buildNumber"
rpctool.exe "info-get guestinfo.vmtools.buildNumber"
Linux 客體:
vmtoolsd --cmd "info-get guestinfo.vmtools.buildNumber"
vmware-rpctool "info-get guestinfo.vmtools.buildNumber"
報告組建編號。
Windows 客體:
vmtoolsd --cmd "info-get guestinfo.toolsInstallErrCode"
rpctool.exe "info-get guestinfo.toolsInstallErrCode"
Linux 客體:
vmtoolsd --cmd "info-get guestinfo.toolsInstallErrCode"
vmware-rpctool "info-get guestinfo.toolsInstallErrCode"
報告最後一個 VMware Tools 安裝的錯誤代碼。
Windows 上的 VMware Tools 安裝和升級通常需要將客體作業系統重新開機,如此變更才會生效。如果需要重新開機但尚未進行,則 guestinfo 變數
guestinfo.toolsInstallErrCode
會設定為 3010。
Windows 客體:
vmtoolsd --cmd "info-get guestinfo.driver.[driver name].version"
rpctool.exe "info-get guestinfo.driver.[driver name].version"
Linux 客體:
vmtoolsd --cmd "info-get guestinfo.driver.[driver name].version"
vmware-rpctool "info-get guestinfo.driver.[driver name].version"
報告執行中的驅動程式版本。
例如:
vmtoolsd --cmd "info-get guestinfo.driver.pvscsi.version"
會傳回
1.3.10.0
Windows 客體:
vmtoolsd --cmd "info-get guestinfo.ip"
rpctool.exe "info-get guestinfo.ip"
Linux 客體:
vmtoolsd --cmd "info-get guestinfo.ip"
vmware-rpctool "info-get guestinfo.ip"
報告客體作業系統的 IP 位址。
Windows 客體:
vmtoolsd --cmd "info-get guestinfo.appInfo"
rpctool.exe "info-get guestinfo.appInfo"
Linux 客體:
vmtoolsd --cmd "info-get guestinfo.appInfo"
vmware-rpctool "info-get guestinfo.appInfo"
報告在客體內所執行應用程式的相關資訊。
對於自訂變數,您可以使用命令:
vmtoolsd --cmd "info-set guestinfo.foo bar