douqiu0796 2018-03-09 02:54
浏览 411

我如何操纵Hyper-v WMI类和方法

Hyper-v is integrated into openstack via the hyper-v wmi interface.The hyper-v wmi interfaces is invoked in the same way as the code in this link shows: https://github.com/openstack/os-win/blob/master/os_win/utils/baseutils.py

97 vs_man_svc = self._compat_conn.Msvm_VirtualSystemManagementService()[0]

Msvm_VirtualSystemManagementService is a hyper-v wmi classes:https://msdn.microsoft.com/en-us/library/cc136940(v=vs.85).aspx.

The question is that the above example is implemented in python, how does the golang do this?

  • 写回答

1条回答 默认 最新

  • douguangxiang0363 2018-03-09 14:01
    关注

    WMI is a part of Windows APIs, available through the COM[+] layer, so there's no real difference in which language you're accessing WMI, provided that language has a way to access COM[+].

    Still, there's a dedicated package to deal with WMI for Go: github.com/StackExchange/wmi.

    So, after having that package installed, you have a task of discerning calls to WMI subsystem from the Python code and reimplementing those in terms of that package.

    Oh, and studying the results of this search should mostly have you up to speed with this stuff.

    评论

报告相同问题?

悬赏问题

  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制
  • ¥20 usb设备兼容性问题
  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊
  • ¥15 安装svn网络有问题怎么办