【发布时间】:2021-07-14 14:42:38
【问题描述】:
我在 Windows server 2016 上运行命令 ohai -l debug,它应该输出服务器属性。
在一个虚拟机上,它返回最重要属性的空数组:
"kernel": {
},
"memory": {
"swap": {
}
},
"network": {
"interfaces": {
}
},
"counters": {
"network": {
}
},
"os": "windows",
"os_version": null,
"platform": "windows",
"platform_version": null,
"platform_family": "windows",
"dmi": {
},
"virtualization": {
"systems": {
}
},
虚拟机是 Microsoft Azure 云中的 Windows。 Azure instance metadata API 返回必要的值。其他 Azure windows 服务器工作正常,问题仅出在一台服务器上。
我对红宝石不是很熟悉。但是,我假设负责内核数据检索的 ohai 代码是 here:collect_data(:windows)。
所以我想用WMI Diag tool 诊断WMI,但是这个工具似乎不再可用了。
这对我来说有点死胡同。 有没有办法检查为什么 ohai 不返回属性?如果它与 WMI 相关,要调试它还是在 Powershell 中查看输出?
我尝试了这些版本的 ohai:
- 15.16.4
- 16.4.41
- 16.13.0
【问题讨论】:
标签: windows azure chef-infra wmi ohai-gem