Quantcast
Channel: VMware Communities : Popular Discussions - VIX API
Viewing all 34639 articles
Browse latest View live

vixvm_logininguest

$
0
0

 

Lots of folks create XP accounts without passwords.  vixvm_logininguest doesn't allow empty string for password, is there a way to login into guest vm for user w/out a password?

 

 

 

 

 

Thanks,

 

 

Rod

 

 


LoginInGuest() Error

$
0
0

 

Hi buddies

 

 

I'm using VIX API 1.1.5 together with VMWare Workstation 6.0.3. But I found the LoginInGuest() API doesn't work. It always results into error and the error string is 'Authentication failure or insufficient permissions in guest operating system' even if I provided the correct username and password:-( Any ideas to solve the problem?

 

 

Really Thanks!

 

 

Problem with Java threads on Linux VM

$
0
0

 

I am running a multithreaded Java Propreitary application on VMWare with 2 processors.  My application is getting errored out randomly , which i debugged is because it tries to execute a program snippet before its prerequisite program snippet completes its job.

 

 

I do not get any of these errors when I run the Virtual machine with one processor.

 

 

I have stumbled upon a discussion in this community

 

 

http://communities.vmware.com/message/399924;jsessionid=6AA155B8D74D1F62BE0F1F48A73B095E

 

 

 

 

 

In post 3 , it is mentioned that  "Try setting memory shares to 'High'. *There appears to be some

sensitivity in the Linux kernel to expecting more rapid memory timing

than some of the latency that creeps into the virtualization*. Setting

the shares to 'high' alleviates this somewhat.

 

There is an open SR on this and I do believe it is a high priority for

VMware to work out with the Linux Kernel folks. I do believe it needs

to be resolved at the kernel level, though."

 

 

 

 

 

could this be the cause of my problem ?

 

 

Is there a resolution/ workaround for this problem?

 

 

 

 

 

Any pointers/ tips would be highly appreciated.

 

 

Thanks in advance.

 

 

Looking for a VMware consultant

$
0
0

 

Hi;

 

 

I am looking for a contractor who can write the following piece of code:

 

  1. Will return if running under VMware.

  2. If running under HyperV, will return a GUID of some type that uniquely identifies the physical box. The true MAC address of a network card on the machine would be fine (but not the MAC address in the virtual machine - as that can be unique for each VM).

  3. It's fine if this GUID changes each time the host computer is rebooted or has a hardware change.

  4. Need both a .NET and Java (for linux, etc) version of the program.

 

If you can do this and are interested in a small contracting job to do this, please contact me.

 

 

thanks - dave

david@windward.net

 

 

 

 

 

VMware Server

$
0
0

 

I installed the VMware Server 2, i got a VMware Server Hompage. When i click the link it tries to bring up a https and http page, but ask's me a username and password which i have never set during the installation.

 

 

i also downloaded the VMware console and all API seperately and installed them. when i run the console i get the "501 Global command GLOBAL server-vmdb to non-host agent targets not supporte"

 

 

any solution ...?

 

 

Launching executables on different vms

$
0
0

 

I have a system for testing that will launch multiple threads to load different virtual machines to execute tests.

 

 

So you have Thread A executing test A on VM1 and Thread B executing test B on vm2.

 

 

The problem is that thread A executes on VM1 and thread B hangs on the "RunProgramInGuest" method until the job.Wait method of the other test finishes. There isn't any reason why this executable shouldn't be able to execute since it's on a different vm.

 

 

Is there any way to get the other thread to continue or is this a limitation in the API?

 

 

I'm running vmware server 1.0.7.

 

 

Any help would be appreciated. Thanks.

 

 

 

 

 

Error in VMRunProgramInGuest for Linux Guest

$
0
0

 

Hi all,

 

 

I am using script (guestcommand.pl) which does a guest login and run a guest command execution using VMRunProgramInGuest and display the command output at the host. If I run the program for a Windows guest, the script could execute a command at the remote system and gives the output, but If I run a command to a linux guest, Login to the guest command is working (VMGuestLogin), but during the function call VMRunPrograminGuest results in a error "VMRunPrograminGuest failed: 3015 Authentication failure or insufficient privileges". I have installed VMWare Tools in the guest(Rehat Enterprise 5).

 

 

Do I have to enable anything at the guest to make this script work?

 

 

Following is the link where I took the guestcommand.pl file from :http://blogs.vmware.com/vix/files/guestcommand.pl

 

 

Thanks,

 

 

Siva.

 

 

'Authentication failure' error thrown from RunProgramInGuest mehod

$
0
0

 

Hey,

 

 

I was trying to run a program with a graphical user interface, but got 'Authentication failure or insufficient permission in guest operation system" error from RunProgramInGuest after log in with Interactive option.

 

 

Here is my code:

 

 

Set job = VM.LoginInGuest(userId, userPassword, VixCOM.Constants.VIX_LOGIN_IN_GUEST_REQUIRE_INTERACTIVE_ENVIRONMENT, Nothing)

 

 

  Set job = VM.ListProcessesInGuest(0,Nothing)

 

 

  Set job = VM.RunProgramInGuest("C:\Tests\Test.exe", "A", VixCOM.Constants.VIX_RUNPROGRAM_ACTIVATE_WINDOW, Nothing, Nothing)   -- i want the application visible to user

 

 

I set up my VM with auto logon, so when VM powered on, an interactive user with the user name and password i provided in the LoginIn method would automatically log on in the guest OS.

 

 

There is no error during the logon, but 'Authentication error" thrown nomatter what program i run from VM.

 

 

Any suggestion?

 

 

Thanks very much.

 

 

J

 

 

   

 

 

 

 

 

 

 

 


Where to download VIX API 1.8?

$
0
0

 

Hi all,

 

 

Some days ago Vmware has announced VIX API 1.8. I have installed Vmware Player 3.0. Inside this installation I could not find the VIX 1.8 which can be used to control VMware Player 3.0. Any idea where to download this new version? Or can this API only be installed with Vmware Workstation 7.0?

 

 

Thanks for a hint.

 

 

F.

 

 

 

 

 

 

 

 

Errors 22002 and 22003 with VixHost_Connect()

$
0
0

I am getting started working with the vmware API's. I wrote a c++ tool that calls them.  It is working fine on my build machine with both VMware Workstation and our ESX server. However when I copy the tool to a test machine that has VMware Player installed, I can't get either player or the esx server working. Is there something additional I have to install on my test box to get this working? Is there something else that I have to change in my linker settings?

 

Build system:

Windows 7

VIX 1.8.1.10141

VMware Workstation 6.5.1.5078

 

Test system:

Windows XP SP2

Vmware Player 3.0.0.9911

 

ESX Server:

VMWare ESX Server 3i, 3.5.0, 111522

 

code:

m_ConnType = VIX_SERVICEPROVIDER_DEFAULT;

m_jobHandle = VixHost_Connect(VIX_API_VERSION, m_ConnType, W2A(lpsHostName), 0, W2A(lpsHostUser) , W2A(lpsHostPassword), 0, VIX_INVALID_HANDLE, NULL, NULL);

m_err = VixJob_Wait(m_jobHandle, VIX_PROPERTY_JOB_RESULT_HANDLE, &m_hostHandle, VIX_PROPERTY_NONE);

 

Runtime results:

Build machine: Both workstation and esx server work fine.

Test machine with esx server: Error 22002 – VIX_E_WRAPPER_VERSION_NOT_FOUND

    The specified version was not found.

Test machine with Player: Error 22003 – VIX_E_WRAPPER_SERVICEPROVIDER_NOT_FOUND

    The specified service provider was not found.

 

I have also tried setting the connection type to either VIX_SERVICEPROVIDER_VMWARE_VI_SERVER, VIX_SERVICEPROVIDER_VMWARE_WORKSTATION, or VIX_SERVICEPROVIDER_VMWARE_PLAYER, but the same error occurs.

 

Test machine Log File:

Feb 03 18:38:42.752: app-3892| Log for VixWrapper pid=3876 version=1 build=build-207905 option=Release

Feb 03 18:38:42.752: app-3892| The process is 32-bit.

Feb 03 18:38:42.752: app-3892| Host codepage=windows-1252 encoding=windows-1252

LOG NOT INITIALIZED | W32Util_IsDirectorySafe: Failed DACL num entries check, "..."

Feb 03 18:38:42.752: app-3892| Error: VIX wrapper config file (null)\vixwrapper-config.txt not found.

Feb 03 18:38:42.752: app-3892| Failed to load wrapper configuration file

Feb 03 18:38:42.752: app-3892| config points to non-existent implementation library '(null)\ws_server_esx-4\32bit\vix.dll'

Feb 03 18:38:42.752: app-3892| config points to non-existent implementation library '(null)\ws_server_esx-4\32bit\vix.dll'

Feb 03 18:38:42.752: app-3892| config points to non-existent implementation library '(null)\ws_server_esx-4\32bit\vix.dll'

Feb 03 18:38:42.752: app-3892| config points to non-existent implementation library '(null)\ws_server_esx-4\32bit\vix.dll'

Feb 03 18:38:42.752: app-3892| config points to non-existent implementation library '(null)\ws-5\32bit\vix.dll'

Feb 03 18:38:42.752: app-3892| config points to non-existent implementation library '(null)\ws-3\32bit\vix.dll'

Feb 03 18:38:42.752: app-3892| config points to non-existent implementation library '(null)\ws-3\32bit\vix.dll'

Feb 03 18:38:42.752: app-3892| config points to non-existent implementation library '(null)\ws-2\32bit\vix.dll'

Feb 03 18:38:42.752: app-3892| config points to non-existent implementation library '(null)\server-1\32bit\vix.dll'

Feb 03 18:38:42.752: app-3892| Player installed version is 3.0.0

Feb 03 18:38:42.752: app-3892| No implementation found for service provider 4, apiVersion -1 installedVersion 3.0.0

Feb 03 18:38:42.752: app-3892| No Vix library found for provider 4 revision -1

Feb 03 18:38:42.752: app-3892| No implementation libraries loaded, cannot call 'VixJob_OnFinishAsynchOpWithHandle'

 

Build machine log file:

Feb 03 19:47:24.747: app-4260| Log for VixWrapper pid=4496 version=1 build=build-207905 option=Release

Feb 03 19:47:24.747: app-4260| The process is 32-bit.

Feb 03 19:47:24.747: app-4260| Host codepage=windows-1252 encoding=windows-1252

Feb 03 19:47:24.747: app-4260| config points to non-existent implementation library 'C:\Program Files (x86)\VMware\VMware VIX
ws_server_esx-4\32bit\vix.dll'

Feb 03 19:47:24.748: app-4260| config points to non-existent implementation library 'C:\Program Files (x86)\VMware\VMware VIX
ws_server_esx-4\32bit\vix.dll'

Feb 03 19:47:24.748: app-4260| config points to non-existent implementation library 'C:\Program Files (x86)\VMware\VMware VIX
ws_server_esx-4\32bit\vix.dll'

Feb 03 19:47:24.748: app-4260| config points to non-existent implementation library 'C:\Program Files (x86)\VMware\VMware VIX
ws_server_esx-4\32bit\vix.dll'

Feb 03 19:47:24.768: app-4260| config points to non-existent implementation library 'C:\Program Files (x86)\VMware\VMware VIX
ws_server_esx-4\32bit\vix.dll'

Feb 03 19:47:24.768: app-4260| config points to non-existent implementation library 'C:\Program Files (x86)\VMware\VMware VIX
ws_server_esx-4\32bit\vix.dll'

Feb 03 19:47:24.768: app-4260| config points to non-existent implementation library 'C:\Program Files (x86)\VMware\VMware VIX
ws_server_esx-4\32bit\vix.dll'

Feb 03 19:47:24.768: app-4260| config points to non-existent implementation library 'C:\Program Files (x86)\VMware\VMware VIX
ws_server_esx-4\32bit\vix.dll'

Feb 03 19:47:24.769: app-4260| passed in VIX_SERVICEPROVIDER_DEFAULT, computed hostType as 10

Feb 03 19:47:24.769: app-4260| Loading Vix implementation library C:\Program Files (x86)\VMware\VMware VIX
VIServer-2.0.0\32bit\vix.dll

Feb 03 19:47:25.276: app-4260| unable to load func VixVM_AddRollingTier from library C:\Program Files (x86)\VMware\VMware VIX
VIServer-2.0.0\32bit\vix.dll (127)

Feb 03 19:47:25.276: app-4260| unable to load func VixVM_RemoveRollingTier from library C:\Program Files (x86)\VMware\VMware VIX
VIServer-2.0.0\32bit\vix.dll (127)

Feb 03 19:47:25.276: app-4260| unable to load func VixVM_ListRollingTier from library C:\Program Files (x86)\VMware\VMware VIX
VIServer-2.0.0\32bit\vix.dll (127)

Feb 03 19:47:25.276: app-4260| unable to load func VixHost_OpenVM from library C:\Program Files (x86)\VMware\VMware VIX
VIServer-2.0.0\32bit\vix.dll (127)

Feb 03 19:47:29.021: app-4260| No such function 'VixHost_OpenVM' for version 4

Guest operations are not allowed for the anonymous user on this virtual machine

$
0
0

 

Hi,

 

 

After a lot of trying i've finally managed to connect to a VM in the VMware Server 2.0.2

 

 

However i get the error "Guest operations are not allowed for the anonymous user on this virtual machine" when i try to run notepad.exe. I think some permissions need to be set. So i set Guest and Guests group of users to be able to administrate the object(VM); but still this error comes.

 

 

Can someone pls help me with getting past this error.

 

 

Thanks a lot.

 

 

VixVM_CaptureScreenImage Login Required???

$
0
0

 

Is there any chance I could convince someone to change VixVM_CaptureScreenImage away from being a login required function?

 

"For security reasons, this function requires a successful call to VixVM_LoginInGuest must be made. "

 

VixVM_LoginInGuest reads:

 

 

"This function validates the account name and password in the guest OS. You must call this function before calling functions that perform operations on the guest OS, such as those below. Otherwise you do not need to call this function. "

 

 

"The following functions require that you call VixVM_LoginInGuest():

 

 

 

 

  • VixVM_RunProgramInGuest()

  • VixVM_ListProcessesInGuest()

  • VixVM_KillProcessInGuest()

  • VixVM_RunScriptInGuest()

  • VixVM_OpenUrlInGuest()

  • VixVM_CopyFileFromHostToGuest()

  • VixVM_CopyFileFromGuestToHost()

  • VixVM_DeleteFileInGuest()

  • VixVM_FileExistsInGuest()

  • VixVM_RenameFileInGuest()

  • VixVM_CreateTempFileInGuest()

  • VixVM_ListDirectoryInGuest()

  • VixVM_CreateDirectoryInGuest()

  • VixVM_DeleteDirectoryInGuest()

  • VixVM_DirectoryExistsInGuest()

  • VixVM_WriteVariable() when writing a VIX_GUEST_ENVIRONMENT_VARIABLE value.

  • VixVM_CaptureScreenImage() "

 

All the other functions make sense to restrict to logged on users. They all require vmware tools to be active to run. CaptureScreenImage does not fall into that category.

 

Keeping it that way "for security reasons" is incorrect because you can Ctrl-Alt-prtscreen without being logged in the guest. This will also work if you're running a guest that isn't running guest tools(eg. WINPE). You can also take screenshots during boot, when login will not work. You're not running the screencap with the user's security credentials which is the reasoning given for keeping it "secure".

 

What about the case of a bug check inside the guest. Then there is no way to validate the user/password. Ctrl-alt-prtscreen works to get the image but I would like to be able to programatically look at the screen without having to program something to press those buttons and parse the most recent image on the desktop.

 

 

Nate

 

 

ESXi the cheapest licence to have api command to revert to snapshot?

Questions regarding VIX and VIX and ANT.

$
0
0

 

Hello,

 

 

I'm curious to know if anyone out there has had experience using VIX to control ANT scripts inside of a Windows XP VM running under VMware Workstation?  I'm trying to figure out the right command structure or syntax that can let me execute an ANT script inside the VM from the host OS.  This is in support of our build process at work.

 

 

Anyway the script xml file is located on the D: drive within the VM, and ant 1.6.5 is installed at D:\ apache-ant-1.6.5.  ANT_HOME and all appropriate environment variables are set.  Normally when I want to run this script by itself I'd open a command window and type in the following:

 

 

D:\ant -f somescript.xml > somescriptlog.txt

 

 

This runs the ANT script that pulls code down from our clearcase environment and performs the build.  I have yet to figure out a use of the vmrun command that will let me switch the context in the VM to D:/ and then run the script and produce the output file.

 

 

In fact the only way I could get this script to run, at all, was to create a bat file and write a vmrun command to call the bat file which then called the script.  The only issue I have now is that after the script completes the bat file doesn't die and the Host OS is left waiting for the return.  The command I've been using has been:

 

 

C:\Program Files\VMware\VMware VIX>vmrun -gu <username> -gp <password> runProgramInGuest "C:\Documents and Settings\All Users\Documents\Virtual Machines\TargetVM\TargetVM.vmx" -ActiveWindow "D:\BuildStart.bat"

 

 

So what am I doing wrong?  There's got to be some way to call that script directly from the host...does anybody have any other tips?

 

 

Also is it just me or does VIX have issues when asking a VM to download data from or copy data up to a maped network drive?  Our clearcase repository appears as a networked drive in the VM and the shared folder where we want to output the results is a network drive as well.  Both are visible and mounted within the guest and for some reason a script that runs fine when manually triggered within the VM will bomb out when we trigger it using vmrun because it can't find the network drive.

 

 

Anyway any light that anyone could shed upon these issues would be greatly appreciated!!!

 

 

Best way to programmatically get installed VIX version

$
0
0

Anyone know the best to to programmatically get the installed version of VMWare VIX and VMWare Workstation on a client machine? I was thinking of looking at the version info on VixCOM.dll for vix and vmware.exe for workstation, but then I don't know what directory it might be installed to on the client machine. I could try the default location, but if they installed to a custom location that would fail.


Copying a directory and contents into a VM using VIX.

$
0
0

 

First off thank you everyone who helped with my earlier question.  Now unfortunately it seems I've hit another snag that I need assistance with.

 

 

Specifically I'm trying to copy down several directories worth of files from the host machine to the VM before triggering the VM to perform a build.  I've beein experimenting with the copyFileToGuestFromHost command and I've managed to get it to work for single files, but I can't get it to work for whole directories.  Is this even possible?  And if so are there any command line parameters or anything I need to pass the command to get it to copy a directory and all of its contents?

 

 

Thanks!

 

 

--Richard

 

 

How to find out that VIX API is installed on any Windows Machine?

$
0
0

 

Hi,

 

 

Is there a way to find out whether or not VIX API is installed or not in Windows Machine via Coding?

 

 

One possible solution is look for this key , it has one subkey InstallKey

 

 

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\VMware, Inc.\VMware VIX

 

 

Another way is to look for VmWare VIX entry in Add/Remove Programs

 

 

C# Wrapper - Not able to connect to VMware server and error code VIX_PROPERTY_JOB_RESULT_HANDLE = 3010

$
0
0

 

I am not able to connect to the Vmware. it returns Vmware error code 16 and VIX_PROPERTY_JOB_RESULT_HANDLE = 3010.

 

 

I have registered VixCOM.dll using regsvr32 successfully, and referenced VixCOM.dll to the C# project. Following is my code snippet.

 

 

VixLibClass vixLib = new VixLibClass();

 

 

public bool Connect(string hostName, string userName, string password)

 

 

{

 

 

int vixVersion = Constants.VIX_API_VERSION;

 

 

vixVersion = 1;

 

 

IJob jobHandle = vixLib.Connect(vixVersion, Constants.VIX_SERVICEPROVIDER_VMWARE_SERVER, null, 0, null, null, 0, null, null);

 

 

int[] propertyIds = { Constants.VIX_PROPERTY_JOB_RESULT_HANDLE };

 

 

object results = new object();

 

 

ulong m_vixError = jobHandle.Wait(propertyIds, ref results);

 

 

if (m_vixError == Constants.VIX_OK)

 

 

{

 

 

object[] objectArray = (object[])results;

 

 

IHost m_hostHandle = (IHost)results;

 

 

return true;

 

 

}

 

 

return false;

 

 

}

 

 

Which VMware Tools version required

$
0
0

 

What's the "official" decree about which VMware Tools version is required for VIX.  Seems some VIX functions (such as VMLoginInGuest) will run only in VMware Tools version 4.0.  For instance, I had a Linux VM with VMware tools v3.5 installed.  Running a test (Perl) script got to the point where I called VMLoginInGuest -- I received the error:

 

 

Authentication failure or insufficient permissions in guest operating system(3015)

 

 

I upgrade the VMware tools version on the target VM and the above worked (as did the rest of my test script).

 

 

I read somewhere that there is a version 3.2 or something of VMware tools that supports VIX?  Is this true?  Is there a resource (web page) somewhere that explains the various versions of ESX, VMware tools, VIX, and/or perhaps a compatability matrix?  If not, someone there at VMware should make one...

 

 

Another thing, when I use the Perl vSphere API to get a VM View, if I look in the config.about section, I see a property "toolsVersion".  Some examples of values I see are:

 

 

7304 (vmware tools v3.5 )

 

 

8194 (this is the one where I installed vmware tools v4.0)

 

 

7299

 

 

How do these correlate to vmware tools versions?

 

 

Any and all information would be greatly appreciated.

 

 

 

 

 

vmware-guestd (VIX) log

$
0
0

 

I have a VIX Perl script I'm using that creates a shell script, copies to a (Linux) VM, runs it, and gets a file with the results.  When I called the VMLoginInGuest function I get the error:

 

 

Authentication failure or insufficient permissions in guest operating system(3015)

 

 

Upgrading the vmware tools version (to v4.0) on the target VM got me past this problem.

 

 

The above error was mostly misleading.  So, I'd like to know if there is a log file somewhere or some switch I could turn on to get more information about why the vmware-guestd (or whatever process it is) rejects a request.

 

 

Any and all information would be greatly appreciated.

 

 

Jonny L.

 

 

 

 

 

Viewing all 34639 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>