We are attempting to call 'VixVirtualMachine.Logon' using a domain account (eg. '<domain>\<domain account>') because we need domain credentials within the VM. This results in the following exception:
LogIn failed, error = 3015 : 'Authentication failure or insufficient permissions in guest operating system'
We are Googling like mad, and it seems like people used to use 'VIX_CONSOLE_USER_NAME' back in the day to achieve this, but it's since been removed due to security concerns. What is the recommended procedure in the latest version of VMWare workstation?
I'm using the following:
VMWare Workstation version 8.02
VMWare Tools version 8.8.2
Running on Windows 7 64 bit
Thanks,
Aaron Stibich
Agilent Technologies
Can you call LoginInGuest instead? Looking at the documentation I do not see any reference to VixVirtualMachine.Logon but I do see
LoginInGuest
HRESULT LoginInGuest([in] BSTR userName, [in] BSTR password, [in] LONG options, [in] ICallback* jobDoneCallback, [out,retval] IJob** loginJob);
This function establishes a guest operating system authentication context that can be used with guest functions for the given virtual machine handle.
https://www.vmware.com/support/developer/vix-api/vix111_reference/
I just tested this and was able to start notepad.exe on a Windows server 2008 R2 Domain controller. Maybe are you not passing the \ correctly? For example I am using C# and i need to use \\
here is what I ran. I am using http://vmwaretasks.codeplex.com/
private void button1_Click(object sender, EventArgs e)
{
// declare a virtual host
using (VMWareVirtualHost virtualHost = new VMWareVirtualHost())
{
// connect to a local VMWare Workstation virtual host
virtualHost.ConnectToVMWareWorkstation();
using (VMWareVirtualMachine virtualMachine = virtualHost.Open(vmPath))
{
// power on this virtual machine
virtualMachine.PowerOn();
// wait for VMWare Tools
//virtualMachine.WaitForToolsInGuest();
// login to the virtual machine
virtualMachine.LoginInGuest(vmUser, vmPass);
// run notepad
virtualMachine.RunProgramInGuest("notepad.exe", string.Empty);
}
}
}