【问题标题】:How to find ESXi host serial number using pyvmomi?如何使用 pyvmomi 查找 ESXi 主机序列号?
【发布时间】:2019-08-27 05:02:01
【问题描述】:

以前对于 VCenter 软件版本 6.0.0,我使用的是 vim.host.SystemIdentificationInfo,它在 identifierValue 中为我提供了所需的值 但是对于 VCenter 软件版本 6.5.0 vim.host.SystemIdentificationInfo 正在返回一个空列表

输出:

'hardware': (vim.host.HardwareInfo) {

dynamicType = <unset>,

dynamicProperty = (vmodl.DynamicProperty) [],

systemInfo = (vim.host.SystemInfo) {

 dynamicType = <unset>,

 dynamicProperty = (vmodl.DynamicProperty) [],

 vendor = 'Cisco Systems Inc',

 model = 'UCSB-B200-M4',

 uuid = '16fa7876-059e-e711-0000-00000000001f',

 otherIdentifyingInfo = (vim.host.SystemIdentificationInfo) []

 }

但是我从 ESXi 主机 cli 中检查,我使用以下命令获取序列号:

esxcfg 信息 | grep "序列号 N"

|----序列号....................................... ....FLM1950CK2X

所以,该值是可用的,但 pyvmomi 目前没有返回。

谁能帮我找出来?

【问题讨论】:

    标签: esxi vcenter pyvmomi


    【解决方案1】:

    host.hardware.systemInfo.serialNumber

    【讨论】:

      猜你喜欢
      • 2019-03-27
      • 2023-04-07
      • 2020-03-07
      • 2014-08-21
      • 2017-05-01
      • 1970-01-01
      • 2020-10-20
      • 1970-01-01
      • 2019-11-12
      相关资源
      最近更新 更多