VMware {code} Community
dalexeenko
Contributor
Contributor
Jump to solution

Interactive VixVM_LoginInGuest works on one machine, doesn't work on another

I have four desktops with Windows Vista Business SP1 and VMware Workstation 6.5.1 (build 126130) on it. Guest machine has Windows Vista Business with the latest VMware Tools installed (7.8.4, build 126130).

Recently I have noticed that interactive VixVM_LoginInGuest call works only on my machine — it logins correctly and then spawns a program in interactive session using VixVM_RunProgramInGuest. On the other host machine which has the same VM bits it runs the same program in non-interactive session.

I wrote a sample which loads a virtual machine, reverts to a specified snapshot, logs in using VIX_LOGIN_IN_GUEST_REQUIRE_INTERACTIVE_ENVIRONMENT option and spawns a calc.exe. I ran this sample on four desktops and it worked only on half of them. On those two "wrong" machines I got no VIX errors, no unhandled exceptions, no nothing. Everything goes smooth except they end up with calc.exe running in non-interactive session.

Sample's source code is available at http://pastebin.com/m86f3c4f.

What could be wrong with that?

Thanks in advance.

0 Kudos
1 Solution

Accepted Solutions
admin
Immortal
Immortal
Jump to solution

Then you need to make sure that either the right DLL is in the working directory of your program, or that the path to the current version of VIX (probably C:\Program Files\VMware\VMware VIX\Workstation-6.5.0\32bit) is in PATH environment variable.

View solution in original post

0 Kudos
12 Replies
admin
Immortal
Immortal
Jump to solution

Do all the VMs have the same version of Tools installed?

0 Kudos
dalexeenko
Contributor
Contributor
Jump to solution

Yeah, I just copied the VMs between desktops. The VMs are the same, the snapshots are the same, VMware Tools are the same. As well as VMware Workstation installed on those desktops.

0 Kudos
dalexeenko
Contributor
Contributor
Jump to solution

Hey Matt,

Do you have any update on this?

Thanks.

0 Kudos
admin
Immortal
Immortal
Jump to solution

I'm kind of at a loss to explain why identical setups would behave differently.

If you ProcessExplorer on the dysfunctional guest, what is the parent process for calc.exe when you launch it through your program?

0 Kudos
dblock
Enthusiast
Enthusiast
Jump to solution

I would first try reducing the problem, maybe by removing the return immediately option and making the launching of the process synchronous. The VMWare API says that it might take a few seconds for the process to actually launch, who knows what they are doing underneath that call. I've had reliable synchronous behavior.

0 Kudos
dalexeenko
Contributor
Contributor
Jump to solution

Matt, the parent is VMwareService.exe (see the screenshot attached) vs. VMwareUser.exe when it works on another desktop.

BTW, is it supposed to be working with VMware Infrastructure VMs as well (since they share VIX API with VMware Workstation)?

dblock, I ran it asynchronously (without VIX_RUNPROGRAM_RETURN_IMMEDIATELY) and it just waits until the process finishes. But the process spawned by VMwareService.exe which means UI is invisible to a user.

0 Kudos
admin
Immortal
Immortal
Jump to solution

Can you post the VIX logs from the host where this happens? They should be in C:\Users\.log. The should also be a vixWrapper log that goes with that log. Could you post that as well?

Last, could you post the vmware.log from the virtual machine's working directory?

0 Kudos
dalexeenko
Contributor
Contributor
Jump to solution

0 Kudos
admin
Immortal
Immortal
Jump to solution

OK, your program is using an older version of VIX (specifically the version that shipped with Workstation 6.0.4).

Is your program linked directly with the VIX library, or does it use vixAllProducts.lib?

dalexeenko
Contributor
Contributor
Jump to solution

It is linked directly with the VIX library.

0 Kudos
admin
Immortal
Immortal
Jump to solution

Then you need to make sure that either the right DLL is in the working directory of your program, or that the path to the current version of VIX (probably C:\Program Files\VMware\VMware VIX\Workstation-6.5.0\32bit) is in PATH environment variable.

0 Kudos
dalexeenko
Contributor
Contributor
Jump to solution

Thanks, that's solved it. There were some outdated dlls at Windows\System32.

0 Kudos