func (v *VM) RevertToSnapshot(snapshot *Snapshot, options VMPowerOption) error {
	var jobHandle C.VixHandle = C.VIX_INVALID_HANDLE
	var err C.VixError = C.VIX_OK

	jobHandle = C.VixVM_RevertToSnapshot(v.handle,
		snapshot.handle,
		0,                    // options
		C.VIX_INVALID_HANDLE, // propertyListHandle
		nil,                  // callbackProc
		nil)                  // clientData

	defer C.Vix_ReleaseHandle(jobHandle)

	err = C.vix_job_wait(jobHandle)

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

	return nil
}
func (v *VM) RevertToSnapshot(snapshot *Snapshot, options VMPowerOption) error {
	var jobHandle C.VixHandle = C.VIX_INVALID_HANDLE
	var err C.VixError = C.VIX_OK

	jobHandle = C.VixVM_RevertToSnapshot(v.handle,
		snapshot.handle,
		0,                    // options
		C.VIX_INVALID_HANDLE, // propertyListHandle
		nil,                  // callbackProc
		nil)                  // clientData

	defer C.Vix_ReleaseHandle(jobHandle)

	err = C.vix_job_wait(jobHandle)

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

	return nil
}
// RevertToSnapshot restores the virtual machine to the state when the specified snapshot was
// created.
//
// Parameters:
//
//   snapshot: A Snapshot instance. Call VVM.GetRootSnapshot() to get a snapshot
//   instance.
//
//   options: Any applicable VMPowerOption. If the virtual machine was powered on
//   when the snapshot was created, then this will determine how the
//   virtual machine is powered back on. To prevent the virtual machine
//   from being powered on regardless of the power state when the
//   flag. VMPOWEROP_SUPPRESS_SNAPSHOT_POWERON is mutually exclusive
//   to all other VMPowerOpOptions.
//
// Remarks:
//
//   * Restores the virtual machine to the state when the specified snapshot was
//     created. This function can power on, power off, or suspend a virtual machine.
//     The resulting power state reflects the power state when the snapshot was
//     created.
//
//   * When you revert a powered on virtual machine and want it to display in the
//     Workstation user interface, options must have the VMPOWEROP_LAUNCH_GUI
//     flag, unless the VMPOWEROP_SUPPRESS_SNAPSHOT_POWERON is used.
//
//   * The ToolsState property of the virtual machine is undefined after the
//     snapshot is reverted.
//
//   * Starting in VMware Workstation 6.5, snapshot operations are allowed on
//     virtual machines that are part of a team.
//     Previously, this operation failed with error code PROPERTY_VM_IN_VMTEAM.
//     Team members snapshot independently so they can have different and
//     inconsistent snapshot states.
//
//   * This function is not supported when using the VMWARE_PLAYER provider
//
//   * If the virtual machine is open and powered off in the UI, this function
//     now closes the virtual machine in the UI before reverting to the snapshot.
//     To refresh this property, you must wait for tools in the guest.
//
//   * After reverting to a snapshot, you must call VM.WaitForToolsInGuest()
//     before executing guest operations or querying guest properties.
//
// Since VMware Server 1.0
//