2 Replies Latest reply on Mar 12, 2012 11:29 AM by khogan

    'VixVirtualMachine.Logon' is failing when passed domain account

    astibich Lurker

      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




      Aaron Stibich

      Agilent Technologies

        • 1. Re: 'VixVirtualMachine.Logon' is failing when passed domain account
          Hot Shot

          Can you call LoginInGuest instead? Looking at the documentation I do not see any reference to VixVirtualMachine.Logon but I do see






          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.


          userName - The name of a user account on the guest operating system. password - The password of the account identified by userName. options - Must be 0 or one of the following values:
          directs guest commands invoked after the call to LoginInGuest() to be run from within the session of the user who is interactively logged into the guest operating system. See the remarks below for more information about VIX_LOGIN_IN_GUEST_REQUIRE_INTERACTIVE_ENVIRONMENT. jobDoneCallback - An ICallback instance that will be called when the operation is complete. loginJob - Returns an IJob object that describes the state of this asynchronous operation.

          Return Value





          • 2. Re: 'VixVirtualMachine.Logon' is failing when passed domain account
            Hot Shot

            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/


                    string vmPath = @"C:\_path\to\the\vmx.vmx";
                    string vmUser = "DOMAIN\\Administrator";
                    string vmPass = "Password123";



                   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




                            using (VMWareVirtualMachine virtualMachine = virtualHost.Open(vmPath))


                                // power on this virtual machine


                                // wait for VMWare Tools


                                // login to the virtual machine

                                virtualMachine.LoginInGuest(vmUser, vmPass);

                                // run notepad

                                virtualMachine.RunProgramInGuest("notepad.exe", string.Empty);