Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我看了又看,但可能被忽略了。我有一个包含300 多个虚拟机的vsphere 云。在 vsphere 客户端中显示的每台机器名称实际上是每台机器的主机名(我已手动完成此操作)。这些机器有时必须更改它们的主机名。这时候我希望有办法从机器本身获取/获取/读取来宾机器名,然后如果不匹配,那么我会知道并在需要时修改机器名。
那么,vmware-toolbox-cmd或者其他工具(来自 linux open-vm-tools)可以检索该信息,机器名称?
vmware-toolbox-cmd
open-vm-tools
我通常不直接使用 ESXi 主机来检索有关来宾 VM 的信息,但您应该能够执行以下操作:vmware-toolbox-cmd config get guestinfo hostname
vmware-toolbox-cmd config get guestinfo hostname
这来自GuestInfo的 API 文档