func NewVirtualMachine(handle C.VixHandle, vmxpath string) (*VM, error) {
	vmxfile := &VMXFile{
		path: vmxpath,
	}

	// Loads VMX file in memory
	err := vmxfile.Read()
	if err != nil {
		return nil, err
	}

	vm := &VM{
		handle:  handle,
		vmxfile: vmxfile,
	}

	runtime.SetFinalizer(vm, cleanupVM)
	return vm, nil
}
func NewVirtualMachine(handle C.VixHandle, vmxpath string) (*VM, error) {
	vmxfile := &VMXFile{
		path: vmxpath,
	}

	// Loads VMX file in memory
	err := vmxfile.Read()
	if err != nil {
		return nil, err
	}

	vm := &VM{
		handle:  handle,
		vmxfile: vmxfile,
	}

	runtime.SetFinalizer(vm, cleanupVM)
	return vm, nil
}
// NewVirtualMachine creates a new VM instance.