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

VIX Error 3009 when powering off VMware Player 3.0

$
0
0

Hi!

 

I'm testing VIX API 1.8 with VMware Player 3.0. But sometimes when calling VixVM_PowerOff() I get the error code 3009 - VIX_E_POWEROP_SCRIPTS_NOT_AVAILABLE, with the message "Cannot execute scripts."

 

Any idea what could be causing this?

 

(A possible reason I see is that the PowerOn and PowerOff calls are close to each other.)


Error: The specified service provider was not found

$
0
0

hi all,

 

I just installed vix 1.6.2 and ran the vmrun which gave me the error "Error: The specified service provider was not found"

 

details:

vmware workstation 6.5.1

trying to connect to workstation named "Ubuntu" using vix

 

command ran:

 

c:\Program Files\VMware\VMware VIX> vmrun -T ws  snapshot "C:\U

sers\\Documents\Virtual Machines\Ubuntu\Ubuntu.vmx" mySnapshot

Error: The specified service provider was not found

 

 

the error occurs if i run any command using vmrun

 

can anyone please help me solve this?

Find guest operating system type

$
0
0

 

Hello everyone!!!

 

 

I'm looking for a way to find the guest operating system type using vix api. I saw that was possible using VI but didn't experiment it yet... If I don't find a "clean" way to get it done, I think I'm going to pass it through a vm property:

 

 

vmware-guestd --cmd "info-set guestinfo.guestos linux"

 

 

for instance, running such a little script within my virtual machine as a daemon, but I don't really like that...

 

 

Could somebody help me?

 

 

VIX with Freebie ESXi

$
0
0

Hi all,

 

I'm trying to use VIX 1.7 remotely against a test ESXi 3.5 server (VMware ESX Server 3i, 3.5.0, 153875).

 

It fails from the API when connecting (no errors) so I've tried going to basics and using the vmrun.exe with the following command as root.

 

  U:\vmrun -T esx -h https://10.*.**.223:443/sdk -u ****** -p ****** start "[[datastore1]] XYZ-XP02/XYZ-XP02.vmx"

 

When I do this I get the following error "Error: This operation is not supported with the current license"

 

Do I need a different licence? or am I missing something obvious?

 

Many thanks,

Sam.

Programming VIX in Python

$
0
0

Hello:

 

I need to program some funtions with VIX API but I need do it in python. For this purpose I need to import dll, etc to python... and call vix functions from a python script...

 

someone can helps me??

 

thanks!

VIX APIs are VERY SLOW with VMware Server 2.0.2

$
0
0

I using vix api to automate the VM operations with vmware server.  The  VixHost_RegisterVM, VixHost_OpenVM, VixHost_UnregisterVM are very slow. Each of these functions are taking 8 to 10 mins to complete.

 

The same VIX api programs works perfectly fine with Workstation.

 

Is there any way to figureout the cause?  I think VIX DLLs bundled with VMware server are damn - dman slow. Not sure why ?? I hope some one has faced the same problem.

 

I run VMRUN command, exe comes out in 10-15 sec, but actual registerstration takes lot of time. My API open was taking lot of time.

 

This delay is observered for the first VM registered using VIX. For immediate next VM, it happens in 2-3 min....Any guesses....pointers....

help with logs from runProgramInGuest hang

$
0
0

Greetings,

 

I'm seeing occasional problems where vmrun runProgramInGuest hangs without explaination. I turned up logging and found that when it hangs, the end of the log file looks like the following. Could anyone explain what the VixVIMProxyVmDisabledMethodChange entries mean and why they might be followed by long delays?

 

Feb 22 14:48:03.956: app-140182364636928| Vix: [32424 foundryAsyncOps.c:1996]: FoundryAsyncOp_AllocAsyncOp for VIX_COMMAND_RUN_PROGRAM (4 cookie 11). jobHandle = 36700219, vmHandle = 34603068
Feb 22 14:48:03.956: app-140182364636928| Vix: [32424 foundryAsyncOps.c:2385]: FoundryAsyncOp_StartAsyncOp for VIX_COMMAND_RUN_PROGRAM (4 cookie 11)
Feb 22 14:48:03.956: app-140182364636928| Vix: [32424 foundryCallback.c:962]: VixJob_WaitVargs. Start waiting. jobHandle = 36700219
Feb 22 14:48:03.956: app-140182233630480| Vix: [32425 foundryAsyncOps.c:797]: FoundryAsyncOp_WorkerPollCallback: executing asyncOp VIX_COMMAND_RUN_PROGRAM (cookie 11).
Feb 22 14:48:31.022: app-140182233630480| Vix: [32425 vixVIMProxy.c:3321]: VixVIMProxyVmDisabledMethodChanged
Feb 22 14:48:31.022: app-140182233630480| Vix: [32425 vixVIMProxy.c:3109]: VixVIMProxyVmProcessGuestState: Got guestState of running.
Feb 22 14:48:31.022: app-140182233630480| Vix: [32425 vixVIMProxy.c:3142]: VixVIMProxyVmProcessGuestState: Got toolsRunningStatus of guestToolsRunning.
Feb 22 14:48:31.022: app-140182233630480| Vix: [32425 vixVIMProxy.c:3166]: VixVIMProxyVmProcessGuestState: Got toolsVersionStatus of guestToolsCurrent.
Feb 22 14:48:31.022: app-140182233630480| Vix: [32425 vixVIMProxy.c:3201]: VixVIMProxyVmProcessGuestState: vmToolsState 0x2
Feb 22 14:48:41.232: app-140182233630480| Vix: [32425 vixVIMProxy.c:3321]: VixVIMProxyVmDisabledMethodChanged
Feb 22 14:49:31.083: app-140182233630480| Vix: [32425 vixVIMProxy.c:3321]: VixVIMProxyVmDisabledMethodChanged
Feb 22 14:49:31.083: app-140182233630480| Vix: [32425 vixVIMProxy.c:3109]: VixVIMProxyVmProcessGuestState: Got guestState of running.
Feb 22 14:49:31.083: app-140182233630480| Vix: [32425 vixVIMProxy.c:3142]: VixVIMProxyVmProcessGuestState: Got toolsRunningStatus of guestToolsRunning.
Feb 22 14:49:31.083: app-140182233630480| Vix: [32425 vixVIMProxy.c:3166]: VixVIMProxyVmProcessGuestState: Got toolsVersionStatus of guestToolsCurrent.
Feb 22 14:49:31.083: app-140182233630480| Vix: [32425 vixVIMProxy.c:3201]: VixVIMProxyVmProcessGuestState: vmToolsState 0x2

 

Thanks for any ideas.

 

- Chris

 

PS, I'm running VIX 1.10.1 on Fedora 12 targeting ESX 4.0.

Getting "VMware Tools are not running in the guest" from VIX, but tools are running

$
0
0

I'm having an issue with a Perl VIX script that I am writing. I am connecting to a VM, I wait for the VMWare tools using VMWaitForToolsInGuest, and then I execute a VBScript. After about 15 minutes, I get an 3016 error code "VMWare Tools are not running in the guest", but if I check the VM manually, the tools are running. Does anyone have any clue as to why I might get this error if the tools are running?

 

Below is the code that I am using. I am able to connect to the VM before this in the same script without error. The error occurs during the last VMRunProgramInGuest.

 

Any help would be greatly appreciated.

 

Thanks,

 

Andy


print Time(), "Connecting to host...";
$err, $hostHandle) = HostConnect(      VIX_API_VERSION,      VIX_SERVICEPROVIDER_VMWARE_WORKSTATION,      $hostName, # hostName      0, # hostPort      $userName, # userName      $password, # password      0, # options      VIX_INVALID_HANDLE); # propertyListHandle
CheckError("HostConnect() failed");
print "Connected\n";
print Time(), "Opening VM...";
($err, $vmHandle) = VMOpen(      $hostHandle,       "$vmName");
CheckError("VMOpen() failed");
print "Opened\n";
print Time(), "Powering on VM...";
$err = VMPowerOn(      $vmHandle,      VIX_VMPOWEROP_LAUNCH_GUI, # powerOnOptions      VIX_INVALID_HANDLE);  # propertyListHandle
CheckError("VMPowerOn() failed");
print "Powered on\n";
print Time(), "Waiting for tools...";
$err = VMWaitForToolsInGuest(      $vmHandle,      3600); # timeoutInSeconds
CheckError("VMWaitForToolsInGuest() failed");
print "Ready\n";   
print Time(), "Logging in as $userName...";
$err = VMLoginInGuest(      $vmHandle,      $userName, # userName      $password, # password      0); # options
CheckError("VMLoginInGuest() failed");
print "Logged in\n";   

$err =  VMRunProgramInGuest(      $vmHandle,      $cscript, #executable      "$vmTestsDir\\runAnt.vbs $vmTestsDir\\build.xml $buildTarget", #arguments      0, # options      VIX_INVALID_HANDLE);
CheckError("VMRunProgramInGuest(JUnit tests) failed");
print "Finished\n"; 

Copy file from vCO to guest fails with read time out

$
0
0

vExpert: Christophe Decanini

Hello, i have an issue where vRo can create directories in VM guests but is unable to copy file to guest. Error is below

org.apache.http.conn.ConnectTimeoutException: Connect to x.x.x.x:443 [/x.x.x.x] failed: Read timed out (Workflow:Copy file from vCO to guest / Scriptable task (item1)12)'

vRO server is on a separate network than vCenters and ESXis, in order to connect and perform tasks against the vCenters i had to add the NATed IPs in vRO /etc/hosts file, but if i do the same for the ESXI hosts it doesn't use the NATed IPs, the Copy file to guest workflow uses the "real" IPs, so i suspect it gets the IPs from the vCenters.

Is there any workaround that can be done so that vRo knows that it needs to use the ESXi host NATed IPs ?

Enable / disable unity mode from VIX API, not possible?!

$
0
0

 

Hello!

 

 

I was very surprised to see that it is seemingly impossible (i.e. not supported)  to enable/disable Unity mode from the most recent version of the VIX API. Is this really true? (I'm referring to VMware Workstation 6.5.x, but it doesn't seem to be supported in any VMware version anyway)

 

 

I've been searching quit a lot, so I sadly believe it is true. :-/ Or isn't it?

 

 

Would you please consider adding support for this in the VIX API? Practically all other possible VMware operations are supported, so this feels quite natural to support, and a very big "hole" to leave out, correct? I for one would need it very much.

 

 

If it is left out for a reason (and thus will continue to be left out) , I would be very interested to hear the explanation for it, since it would be a really useful thing to have.

 

 

Thanks!

 

 

Call to RunScriptInGuest hangs without executing anything

$
0
0

Hello,

 

I'm automating several things on VM located at a 4.1 ESX host by using vCO vix plug-in and I've found that executing RunScriptInGuest does not run the script nor returns error. The guest is Linux CentOS 4, not sure if this matters.

 

The script that I run is just a simple shell script to copy a file.

#!/bin/bash

# test.sh

cp file1 file2

 

Any hint?

 

I found this in the log file and correct the path name in the PAM config and the error is solved. But still nothing.

Oct  7 17:27:07 localhost vmtoolsd: PAM unable to dlopen(/lib/security/pam_unix2.so)
Oct  7 17:27:07 localhost vmtoolsd: PAM [error: /lib/security/pam_unix2.so: cannot open shared object file: No such file or directory]
Oct  7 17:27:07 localhost vmtoolsd: PAM adding faulty module: /lib/security/pam_unix2.so
Oct  7 17:27:07 localhost vmtoolsd: PAM unable to dlopen(/lib/security/pam_unix2.so)
Oct  7 17:27:07 localhost vmtoolsd: PAM [error: /lib/security/pam_unix2.so: cannot open shared object file: No such file or directory]
Oct  7 17:27:07 localhost vmtoolsd: PAM adding faulty module: /lib/security/pam_unix2.so
Oct  7 17:27:08 localhost vmtoolsd: PAM unable to dlopen(/lib/security/pam_unix2.so)
Oct  7 17:27:08 localhost vmtoolsd: PAM [error: /lib/security/pam_unix2.so: cannot open shared object file: No such file or directory]
Oct  7 17:27:08 localhost vmtoolsd: PAM adding faulty module: /lib/security/pam_unix2.so

copyFileFromGuestToHost got Error: Unknown Error

$
0
0

Hi,

 

I issued the following command to copy a file from vm to host:

 

 

vmrun.exe" -T esx -h https://host/sdk -u user -p password -gu guser -gp gpassword copyFileFromGuestToHost "\[storage1\] CentOs-5.3-x86-64/CentOs-5.3-x86-64.vmx" "/etc/sysconfig/network-scripts/ifcfg-eth0" "/user/ifcfg-eth0"

 

 

 

 

Error: Unknown error

 

 

 

 

Can someone help me ?

VixVM_LoginInGuest failure

$
0
0

I tried to connect to my VM guest with the VIX API. Unfortunately, it fails every time. I get the following error message :

 

Authentication failure or insufficient permissions in guest operating system.

 

My guest OS is ubuntu 10.04 and it has the VMware tools 4.0.0, build-208167 installed. I use the ESXi 4.0 platform.

 

If someone has a hint for me I'll really appreciate ! thanks

error obtained : vix_e_file_already_exists while doing revert to a snaphot

$
0
0

Hi

 

I have been using Vmware workstation for a few months now. But since last few days I have ben seeing this error: vix_e_file_already_exists.

It is obtained when I try and do revert to snaphot.

The same error is obtained whether I try reverting manually or from the VIX API.

 

Any suggestions or pointers appreciated.

 

Regards

Minu

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.

 

 

 

 

 

 

 

 


Vix API : power state- 72

$
0
0

Hi,

  Host : VMWare server, Windows XP.

 

  I am trying to get the power state of the virtual machine using Vix API from my C test program. I have called the following apis :

 

VixHost_Connect(): connected with server

VixVM_Open(): got the handle of the VM

Vix_GetProperties(vmHandle, VIX_PROPERTY_VM_POWER_STATE, &powerState, VIX_PROPERTY_NONE): to get the power state

 

Result: I am getting (integer) value of powerState = 72 . The VM is powered on, and so I am suppose to get  0x0008. Do you have any idea about it?

 

Note: if the VM is powered off, I am getting the correct value: powerState= 2. I am also getting correct value if it is suspended (powerState = 32(int)).

 

Why I am not getting the correct value in case of powered on? is it a known issue?

LoginInGuest() issue with VIX_LOGIN_IN_GUEST_REQUIRE_INTERACTIVE_ENVIRONMENT option

$
0
0

 

Hi,

 

I'm having problem with the LoginInGuest() function when using the VIX_LOGIN_IN_GUEST_REQUIRE_INTERACTIVE_ENVIRONMENT option. Here's the code written in C#:

 

jobHandle = vmHandle.LoginInGuest(guestUser, guestPassword, Constants.VIX_LOGIN_IN_GUEST_REQUIRE_INTERACTIVE_ENVIRONMENT, null); vixError = jobHandle.WaitWithoutResults(); if (vixLib.ErrorIndicatesFailure(vixError)) { throw new VMRobotException("Error when logging on to guest OS. Error code: " + vixError); }

 

every time this is run, it returns error code 3034 VIX_E_INTERACTIVE_SESSION_NOT_PRESENT (The specified guest user must be logged in interactively to perform this operation.) Any one help please?

 

 

BTW, I'm using VIX 1.6.

 

 

 

 

 

Thanks!

 

 

SOLVED: Insufficient permissions in host OS

$
0
0

I'm trying to use VIX to open a VM on a Server 2.0.  If I set the user as an admin on the server I'm able to open the machine just fine.  However if I remove the user from the admin group I get the "Insufficient permissions in host operating system" error.  I have tried giving the user in question full access to the drive where the .vmx file is stored but to no avail.  Does anyone know the permissions needed to open a vm through VIX?  I would rather not give this user admin rights on the machine.

 

Matt

VIX API question vmrun says a File was not found

$
0
0

 

I am trying to send commands directly to my Windows guest OS. Will the vmrun command come back with the information as if it was on the Windows command prompt?

 

 

I'm getting an error that the file was not found everytime, even when the file exists. 

 

 

thanks,

 

 

-h

 

 

 

 

 

  1. vmrun -T esx -h https://myhostname/sdk -u root -p password -gu Administrator -gp password runProgramInGuest "[configs] vmshe-vm-4-54/vmshe-vm-4-54.vmx" C:\ipconfig

Error: A file was not found

 

 

  1. vmrun -T esx -h https://myhostname/sdk -u root -p password -gu

Administrator -gp password runProgramInGuest "[configs]

vmshe-vm-4-54/vmshe-vm-4-54.vmx" C:\test.bat

 

 

Error: A file was not found

 

 

VIX Error 3009 when powering off VMware Player 3.0

$
0
0

Hi!

 

I'm testing VIX API 1.8 with VMware Player 3.0. But sometimes when calling VixVM_PowerOff() I get the error code 3009 - VIX_E_POWEROP_SCRIPTS_NOT_AVAILABLE, with the message "Cannot execute scripts."

 

Any idea what could be causing this?

 

(A possible reason I see is that the PowerOn and PowerOff calls are close to each other.)

Viewing all 34639 articles
Browse latest View live


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