// NewVMManager returns a new Manager type
NewVMManager returns a new Manager type
// NewVMManager returns a new Manager type
func NewVMManager() (*Manager, error) {
	w, err := wmi.NewConnection(".", `root\virtualization\v2`)
	if err != nil {
		return nil, err
	}
	svc, err := w.GetOne(VMManagementService, []string{}, []wmi.Query{})
	if err != nil {
		return nil, err
	}
	sw := &Manager{
		con: w,
		svc: svc,
	}
	return sw, nil
}
func NewVMManager ( ) ( * Manager , error ) { w , err := wmi . NewConnection ( " " , `root\virtualization\v2` ) if err != nil { return nil , err } svc , err := w . GetOne ( VMManagementService , [ ] string { } , [ ] wmi . Query { } ) if err != nil { return nil , err } sw := & Manager { con : w , svc : svc , } return sw , nil }
NewVMManager returns a new Manager type
NewVMManager returns a new Manager type
// Get virtual machine management service