Discover Packages
github.com/microsoft/wmi
pkg
cluster
compute
internal
package
Version:
v0.38.0
Opens a new window with list of versions in this module.
Published: Oct 13, 2025
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
GetVMID This function is a hack to obtain VM ID.
There could be a better pure WMI way to obtain the ID which requires more investigation
We are currently using the XML from the embedded instance to obtain the VM ID
type Instance struct {
XMLName xml .Name `xml:"INSTANCE"`
ClassName string `xml:"CLASSNAME,attr"`
Properties []Property `xml:"PROPERTY"`
PropertiesObject []PropertyObject `xml:"PROPERTY.OBJECT"`
PropertiesArray []PropertyArray `xml:"PROPERTY.ARRAY"`
}
type Property struct {
XMLName xml .Name `xml:"PROPERTY"`
Name string `xml:"NAME,attr"`
ClassOrigin string `xml:"CLASSORIGIN,attr"`
Type string `xml:"TYPE,attr"`
Value string `xml:"VALUE"`
}
type PropertyArray struct {
XMLName xml .Name `xml:"PROPERTY.ARRAY"`
Name string `xml:"NAME,attr"`
ClassOrigin string `xml:"CLASSORIGIN,attr"`
ReferenceClass string `xml:"REFERENCECLASS,attr"`
Value Values `xml:"VALUE.ARRAY"`
}
type PropertyObject struct {
XMLName xml .Name `xml:"PROPERTY.OBJECT"`
Name string `xml:"NAME,attr"`
ClassOrigin string `xml:"CLASSORIGIN,attr"`
ReferenceClass string `xml:"REFERENCECLASS,attr"`
Value ValueObject `xml:"VALUE.OBJECT"`
}
type ValueObject struct {
XMLName xml .Name `xml:"VALUE.OBJECT"`
Name string `xml:"NAME,attr"`
Instance *Instance
}
type Values struct {
Value []string `xml:"VALUE"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.