vm.go
func (v *VM) PowerState() (VMPowerState, error) {
	var err C.VixError = C.VIX_OK
	var state C.VixPowerState = 0x0

	err = C.get_property(v.handle,
		C.VIX_PROPERTY_VM_POWER_STATE,
		unsafe.Pointer(&state))

	if C.VIX_OK != err {
		return VMPowerState(0x0), &Error{
			Operation: "vm.PowerState",
			Code:      int(err & 0xFFFF),
			Text:      C.GoString(C.Vix_GetErrorText(err, nil)),
		}
	}

	return VMPowerState(state), nil
}
func (v *VM) PowerState() (VMPowerState, error) {
	var err C.VixError = C.VIX_OK
	var state C.VixPowerState = 0x0

	err = C.get_property(v.handle,
		C.VIX_PROPERTY_VM_POWER_STATE,
		unsafe.Pointer(&state))

	if C.VIX_OK != err {
		return VMPowerState(0x0), &Error{
			Operation: "vm.PowerState",
			Code:      int(err & 0xFFFF),
			Text:      C.GoString(C.Vix_GetErrorText(err, nil)),
		}
	}

	return VMPowerState(state), nil
}
// PowerState returns power state of the virtual machine.