簡體   English   中英

chef ohai 沒有獲取任何操作系統屬性

[英]chef ohai does not fetch any os attributes

我在 Windows 服務器 2016 上運行命令ohai -l debug應該 output 服務器屬性。

在一個 VM 上,它在最重要的屬性上返回空 arrays:

"kernel": {

},
"memory": {
  "swap": {

  }
},
"network": {
  "interfaces": {

  }
},
"counters": {
  "network": {

  }
},
"os": "windows",
"os_version": null,
"platform": "windows",
"platform_version": null,
"platform_family": "windows",
"dmi": {

},
"virtualization": {
  "systems": {

  }
},

虛擬機是微軟 Azure 雲中的 Windows。 Azure 實例元數據 API返回必要的值。 其他 Azure windows 服務器工作正常,問題僅出在一台服務器上。

我對 ruby 不是很熟悉。 但是,我假設負責 kernel 數據檢索的 ohai 代碼在這里collect_data(:windows) 所以我想用WMI Diag tool來診斷 WMI,但是這個工具似乎不再可用了。

這對我來說有點死胡同。 有沒有辦法檢查為什么 ohai 不返回屬性? 如果它與WMI有關,調試它或查看Powershell中的output?

我嘗試了這些版本的 ohai:

  • 15.16.4
  • 16.4.41
  • 16.13.0

由於 Azure 中的 WMI 服務出現故障,未收集數據。

重建 WMI 存儲庫后問題已修復。

更多信息在這里: https://community.spiceworks.com/how_to/21413-rebuilding-the-wmi-repository

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM