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

VIX API - There was an error in communication

$
0
0

Hi,

 

I cannot execute any VIX API vmrun command once the Virtual Machine is powered on.

I can list all virtual machines, and power the machines on, but once the machine is powered on, every vmrun command fails with the error "There was an error in communication"

 

The VIX API is installed on a different computer of the Vmware Server (Host) .

Both firewalls are turned off.


Does anybody know what can be the problem?

Thanks.


LoginInGuest fails the first time (Unable to install tool)

$
0
0

LoginInGuest fails the first time when powering up VM.

This is a branch off of  (Unable to install tools?)

http://www.vmware.com/community/thread.jspa?messageID=660883)

 

 

History:[/b][/u]

 

 

pdovy[/b]

I'm able to log in once the VM has booted and is sitting at the login screen -

however if I have the API power on the VM and then call VixVM_WaitForToolsInGuest,

it returns immediately and the subsequent login attempt fails with the error

message that tools is not running.

 

Is this expected behavior? I have no real other way of programmatically

determining when the OS has booted other than attempting to log in

continuously until it eventually succeeds because the machine has finally

booted.

 

 

 

 

mattrich[/b]

Are you getting back any error from VixVM_WaitForToolsInGuest()?

 

Also, would you mind posting the code where you call VixVM_WaitForToolsInGuest()?

 

 

 

 

zerovoid[/b]

I too have experienced this... my solution was...

     log("waitForToolsVM")

     returnVal = waitForToolsVM()

     If (returnVal=True) Then

          log("Success")

     Else

          log("Error: " & functionErrorMessage) : exit sub

     End If          

      

 

     log("Note: loginVM is expected to fail once if vm was not previously" & vbcrlf _

       & "      powered on, will retry up to 2 times after first failure")

     logincount = 0 : returnVal = False

     do while (returnVal = False)

          if logincount > 2 then log("Error: Unable to Login") :  : exit sub

          log("loginVM : attempt " & logincount)

          returnVal = loginVM()

          If (returnVal=True) Then

               log("Success")

          Else

               log("Error: " & functionErrorMessage)

          End If

          logincount = logincount+1

     loop

/code

 

 

As my comment states...

Note: loginVM is expected to fail once if vm was not previously powered on,

will retry up to 2 times after first failure.

 

The second time it attempts, it connects fine.

 

This excerpt is from VixCOM and WSF/VBS

 

 

 

mattrich[/b]

Ok, that shouldn't  be necessary. If you call WaitForToolsInGuest() while

watching the guest in the service console, at what point in the boot process

does it seem that WaitForToolsInGuest() finishes?

 

Can you post you implementation of waitForToolsVM()?

 

 

 

zerovoid[/b]

WaitForToolsInGuest() finishes after windows explorer seems to be loaded, in

the time prior to the profile being fully loaded, like desktop icons and custom

backgrounds. Around the normal time for windows services to be loaded.

    ' Needs nothing

     Function waitForToolsVM()

        'Checks for prereq based off of stage

        prereqReturn = checkPrereq(4)

        If Not (prereqReturn = True) Then waitForToolsVM = prereqReturn : exit function

 

        set job = vm.WaitForToolsInGuest(0, Nothing)

        myerr = job.WaitWithoutResults()

        If VixLibA.ErrorIndicatesFailure(myerr) Then

               on error resume next

               waitForToolsVM = false

               functionErrorCode = "-100" : functionErrorMessage = "error" : errMsg = VixLibA.GetErrorText(myerr, Nothing) : functionErrorCode = myerr :     functionErrorMessage = errMsg

            isToolsLoaded = False

               waitForToolsVM = false : exit function

        End If

        isToolsLoaded = True

        waitForToolsVM = True

    End Function

/code

 

 

Like I said, it calls the function when it should, but the first time reports an

error, and the second time works perfectly if the machine is booted from an

powered down state. If the system is already running, everything works fine.

 

    ' Needs vmUser and VMPass passed to it

     Function loginVM()

          'Checks for prereq based off of stage

        prereqReturn = checkPrereq(5)

        If Not (prereqReturn = True) Then loginVM = prereqReturn : exit function

        set job = vm.LoginInGuest(vmUser, VMPass, 0, Nothing)

        myerr = job.WaitWithoutResults()

        If VixLibA.ErrorIndicatesFailure(myerr) Then

               on error resume next

               loginVM = false

               functionErrorCode = "-100" : functionErrorMessage = "error" : errMsg = VixLibA.GetErrorText(myerr, Nothing) : functionErrorCode = myerr :     functionErrorMessage = errMsg

            isLoggedIn = False

               loginVM = false : exit function

        End If

        isLoggedIn = True

        loginVM = True

    End Function

/code

 

 

As you can probably tell, it was written as a class in another language and

ported eventually to VBS. Hence variables are assigned in the setters and

getters rather than being passed to the function... atleast for the

non-override ones, which were removed from the VBS version due to some

language limitations.

 

It works great with the work-around though.

BTW the Guest is Win2K3, if that helps.

 

 

 

 

mattrich[/b]

Are you logging in as an actual user on the virtual machine, or are you using

one of the constants from vix.h/the type library (such as

VIX_CONSOLE_USER_NAME)?

 

 

 

zerovoid[/b]

Actual user of the Virtual Machine.

 

I am going to break this thread off into its own, so people can quickly

reference it as a different question.

 

 

 

\----


 

 

And so we are here...

perl vix api looping

$
0
0

I set up a loop to continuously take a snaphot, run a program in guest, copy a file and then revert to snapshot and repeat the process by running the program in guest (with new arguments).  however, my program hangs on the ReleaseHandle/HostDisconnect functions (end of first iteration).  I tried to exclude them from my while loop but that didnt work.

 

se VMware::Vix::Simple;

use VMware::Vix::API::Constants;

 

open(fileHandle, "malwarefiles.txt");

open(fileHandle2, "directories.txt");

my $flag = 0;

while($progName = ;

 

$directory = "\"".$directory."\"";

$progName = "\"".$progName."\"";

$line = 'C:
malwareAutorun.py '.$directory.' '.$progName;

print $line;

 

 

 

my $endChar = index($progName, '.');

my $outFileName = substr($progName, 1, $endChar-1);;

my $destFileName = 'C:
Documents and Settings
Sean
Desktop
workLogs
'.$outFileName.'.'.'CSV';

print "\n$destFileName\n";

 

 

($err, $hostHandle) = HostConnect(1,

                      VIX_SERVICEPROVIDER_VMWARE_SERVER,

                      undef,

                      0,

                      undef,

                      undef,

                      0,

                      VIX_INVALID_HANDLE);

 

die "HostConnect() fialed, $err ", GetErrorText($err), "\n" if $err != VIX_OK;

 

 

$err = RegisterVM($hostHandle, "c:
Program Files
Qemu
WindowsXP.vmx");

die "RegisterVM() failed, $err ", GetErrorText($err), "\n" if $err != VIX_OK;

 

print "Done registering vm\n";

($err, $vmHandle) = VMOpen($hostHandle, "c:
Program Files
Qemu
WindowsXP.vmx");

die "VMOpen() failed, $err ", GetErrorText($err), "\n" if $err != VIX_OK;

 

 

print "Done vmOpening\n";

$err = VMPowerOn($vmHandle, VIX_VMPOWEROP_LAUNCH_GUI, VIX_INVALID_HANDLE);

die "VMPowerOn() failed, $err ", GetErrorText($err), "\n" if $err != VIX_OK;

 

print "Done powering on\n";

$err = VMWaitForToolsInGuest($vmHandle, 300);

die "VMWaitForToolsInGuest() failed, $err ", GetErrorText($err), "\n" if $err != VIX_OK;

 

 

$err = VMLoginInGuest($vmHandle, "Sean", "qwerty", 0);

die "VMLoginInGuest() failed, $err ", GetErrorText($err), "\n" if $err != VIX_OK;

 

 

print "done logging in guest\n";

($err, $snapshotHandle) = VMCreateSnapshot($vmHandle,

                                   undef,

                                   undef,

                                   VIX_SNAPSHOT_INCLUDE_MEMORY,

                                   VIX_INVALID_HANDLE);

die "CreateSnapshot() failed, $err ", GetErrorText($err), "\n" if $err != VIX_OK;

 

print "done creating snapshot\n";

$err = VMRunProgramInGuest($vmHandle,

                         "C:
Python25
python.exe",

                         #'C:
malwareAutorun.py '."\"$directory\" "."\"$progName\"",

                         #"C:
malwareAutorun.py \"$directory\" \"$progName\"",

                         $line,

                         0,

                         VIX_INVALID_HANDLE);

                               

die "VMRunProgramInGuest() failed, $err ", GetErrorText($err), "\n" if $err != VIX_OK;

 

print "Done running prog in guest\n";

 

$err = VMCopyFileFromGuestToHost($vmHandle,

               "C:
logFile.CSV",

               $destFileName,

               0,

               VIX_INVALID_HANDLE);

die "VMCopyFileFromGuestToHost() failed, $err ", GetErrorText($err), "\n" if $err != VIX_OK;

 

print "done copying file\n";

 

$err = VMRevertToSnapshot($vmHandle,

                      $snapshotHandle,

                      0,

                      VIX_INVALID_HANDLE);

die "VMRevertToSnapshot() failed, $err ", GetErrorText($err), "\n" if $err != VIX_OK;

 

print "done reverting to snapshot\n";

ReleaseHandle($vmHandle);

HostDisconnect($hostHandle);

}

die "Done\n" if 1;

VMPowerOn fails with 3008

$
0
0

Hello,

 

I am using the following PERL script against a WS 5.5.1 build 18463 installed on WinXP. VMPowerOn has always been failing for me with error "3008 Cannot connect to the virtual machine". I have tried all sorts of combinations, keeping WS already open/not open, the VM inside it open/not open, etc. I also looked up some discussions already on this site but it just wont work for me. Could you please help me get it working?

 

All steps before VMPowerOn succeed. (Note that the code below appears messed in some places after posting to this site but basically all syntax is correct on my machine and its a working script.)

 

Please find the logs below.

 

Thanks

adive

 

-


my $vmFullPath = "E:
VMs
WinXP
WinXPPro.vmx";

 

use VMware::Vix::Simple;

use VMware::Vix::API::Constants;

 

my $err = VIX_OK;

my $hostHandle = VIX_INVALID_HANDLE;

my $vmHandle = VIX_INVALID_HANDLE;

my $powerOnOption = VIX_VMPOWEROP_NORMAL; # VIX_VMPOWEROP_LAUNCH_GUI;

 

 

 

 

  1. connect to the host VMware server layer (Workstation/VMware Server)

print "Attempting to connect to the VMware Workstation host...\n";

($err, $hostHandle) = HostConnect(VIX_API_VERSION,

VIX_SERVICEPROVIDER_VMWARE_WORKSTATION, #VIX_SERVICEPROVIDER_DEFAULT, #

 

VIX_SERVICEPROVIDER_VMWARE_SERVER

undef, # hostName

0, # hostPort

undef, # userName

undef, # password

0, # options

VIX_INVALID_HANDLE); # propertyListHandle

 

die "HostConnect() failed, $err ", GetErrorText($err), "\n" if $err != VIX_OK;

 

  1. ...Do everything in your program...

print "Connected successfully\n";

 

print $vmFullPath;

print "\n\n";

 

print "Attempting to open ";

print "\n";

 

($err, $vmHandle) = VMOpen($hostHandle, $vmFullPath);

 

die "VMOpen() failed, $err ", GetErrorText($err), "\n" if $err != VIX_OK;

 

print "Opened VM successfully\n";

 

print "Attempting to power on the VM\n";

 

$err = VMPowerOn($vmHandle,

powerOnOption, # 0, # VIX_VMPOWEROP_LAUNCH_GUI, # powerOnOptions

VIX_INVALID_HANDLE); # propertyListHandle

die "VMPowerOn() failed, $err ", GetErrorText($err), "\n" if $err != VIX_OK;

 

print "Powered on successfully\n";

 

ReleaseHandle($vmHandle);

HostDisconnect($hostHandle);

-


 

 

Logs:

Nov 01 17:33:59.130: app| Log for Vix pid=2068 version=2 build=build-45731 option=Release

Nov 01 17:33:59.130: app| Hostname=dearcreek

Nov 01 17:33:59.130: app| Foundry Init: setting up global state (0 threads)

Nov 01 17:33:59.426: app| HOSTINFO: Seeing Intel CPU, numCoresPerCPU 1 numThreadsPerCore 2.

Nov 01 17:33:59.426: app| HOSTINFO: numPhysCPUs is 0, bumping to 1.

Nov 01 17:33:59.426: app| HOSTINFO: numCores is 0, bumping to 1.

Nov 01 17:33:59.426: app| HOSTINFO: This machine has 1 physical CPUS, 1 total cores, and 1 logical CPUs.

Nov 01 17:33:59.630: app| VMHS: Failed to load vmnetMgr.dll

Nov 01 17:33:59.630: app| Foundry Init: version 2, hostType 3, hostName (null), hostPort 0, options 0x0

Nov 01 17:33:59.645: app| CreateFile on pipe
.\pipe\E:\VMs\WinXP\WinXPPro.vmx failed 2.

Nov 01 17:33:59.661: app| Using 'C:\Program Files\VMware\VMware Workstation\vmware.exe' as path to GUI

Nov 01 17:34:09.692: app| CreateFile on pipe
.\pipe\E:\VMs\WinXP\WinXPPro.vmx failed 2.

Nov 01 17:34:20.755: app| CreateFile on pipe
.\pipe\E:\VMs\WinXP\WinXPPro.vmx failed 2.

Nov 01 17:34:31.817: app| CreateFile on pipe
.\pipe\E:\VMs\WinXP\WinXPPro.vmx failed 2.

Multithreading in VIX API: more crashes, any news on fixes?

$
0
0

I've been trying to extend our test automation to parallelize against multiple virtual machines. I am using VMWareTasks. I make a connection to a different VM on two threads, then use the handle(s) returned, etc. This is a collection of crash messages followed by access violations that I got recently. I'll edit with more as i see them

 

 

Most of the issues happen on connect or disconnect.

 

    • ** (RemoteInstaller.exe:5572): WARNING **: ???: object class `GVmomiSession' has no property named `state'

    • ** ERROR *: g_type_plugin_() invalidly modified type GVmomiSession' aborting (popup)

 

Is there any news on a 1.6.3 that might fix these problems? I'd be really happy to try a beta too.

 

Thx

dB.

Can removable devices connect or disconnect with VIX API?

$
0
0

Hi,

 

I want to be able to connect a USB device (currently being connected to the host) to the guest with command-line or program.

 

Is this possible in some way?

 

Menu -> VM -> Removable Devices -> Connect USB Device or Disconnect USB Device

 

 

I want to be albe to execute this command in some way.

 

 

if it is impossible, I want to answer that is word "It's impossible"

 

 

help me, please.

Getting RetrieveProperties to resolve ManagedObjectReferences

$
0
0

 

I'm using the SDK sample code to get properties for all VMs using the RetrieveProperties method. I want to get host name which is accessible via the host property of the runtime property of the VM. However I can't specify runtime.host.name in the property spec because that gives an error, I think because the runtime.host property is a ManagedObjectReference. I have added some code to do another call to RetrieveProperties to get the name but that is very, very slow because there is one additional call per VM (takes 39 seconds!!)

 

 

So is there any way to have the one call to RetrieveProperties resolve the object references for me?

 

 

 

 

 

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

 

 


vmrun in ESX server console

$
0
0

 

Is there an equivalent tool to "vmrun" that will let you make VIX API calls from the ESX console?

 

 

 

 

 

thanks,

 

 

-h

 

 

Configuring Output from vmrun runProgramInGuest

$
0
0

 

Hello,

 

 

I am using vmrun to run an MSDOS batch file inside a Windows vm as follows:

 

 

vmrun -T vc -h https://<vcenterservername>:443/sdk -u username -p password -gu Administrator -gp administratorpassword runProgramInGuest "[datastoreLUNname] vmfoldername/vmname.vmx" C:\batchfilename.bat 

 

 

 

 

 

So this code works - I start if from my Windows XP laptop and it starts a batch file runnining inside a Windows virtual machine.  However, the output displays inside the virtual machine and not at the command line of tmy Windows xp laptop - where I need it to display.  As each line of the MSDOS file executes inside the Windows VM, I need the output directed to my WindowsXP laptop so I can confirm each command is successful.  Can this be done?

 

 

thanks

 

 

Unable to install bundle for VIX 1.10.2...

$
0
0

Hi,

I downloaded this on to my linux box. But it does nto install and givens me an error message.

Are there any documented steps for this installation? Am I doing something incorrect?

...kt

 

 

[root@ktdev1]:=> sh VMware-VIX-1.10.2-331862.i386.bundle
VMware-VIX-1.10.2-331862.i386.bundle: line 108: syntax error near unexpected token `newline'
VMware-VIX-1.10.2-331862.i386.bundle: line 108: `<html>'

Run Program in Guest as an Administrator

$
0
0

I'm attempting to automate some machine set-up tasks using the VIX API with VMware Workstation v9 using VBS. I have hit a blocker when attempting to use the "RunProgramInGuest" option on Windows 8, the program is failing as it is not being run as an administrator.

 

Set job = vm.RunProgramInGuest("C:\windows\system32\cmd.exe", "/c C:\test\test.bat", 0, Nothing, Nothing)

 

Any ideas how I can force this to run as an administrator? UAC is currently turned off.

 

Thanks

Difference between VIX API TO VSPHERE API

$
0
0

Hello

i am a very "green" in vm world and i am trying to create some simple implication c# that will read the data from vcenter about machine and will deploy machine in a future .

rom what i have learned until now that my option is using vsphere api for this task is best option .Now i found that there is one more vix api can u pls explain me what is the difference between them and do i need to install addition packets on the esx that is hosting the vcenter?

thank you!!!!

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!

 

 

"Invalid user name or password for the guest OS" error in vmrun runProgramInGuest Operation

$
0
0

 

Hi all,

 

 

i have this script

 

 

"%ProgramFiles(x86)%\vmware\VMware VIX\vmrun.exe" -T ws revertToSnapshot "C:\_virtual-machines\vmware virtual machines\windows xp hry\windows xp hry.vmx" "testovani instalace 3"

"%ProgramFiles(x86)%\vmware\VMware VIX\vmrun.exe" -T ws start "C:\_virtual-machines\vmware virtual machines\windows xp hry\windows xp hry.vmx"

"%ProgramFiles(x86)%\vmware\VMware VIX\vmrun.exe" -T ws -gu user -gp aaaa copyFileFromHostToGuest "C:\_virtual-machines\vmware virtual machines\windows xp hry\windows xp hry.vmx" E:\lgo\software\tes4-oblivion-isles\_actual\Output\lgooblivionshiveringislesczech100.exe c:\temp\lgooblivionshiveringislesczech100.exe

"%ProgramFiles(x86)%\vmware\VMware VIX\vmrun.exe" -T ws -gu user -gp aaaa runProgramInGuest "C:\_virtual-machines\vmware virtual machines\windows xp hry\windows xp hry.vmx" -activeWindow -interactive c:\temp\lgooblivionshiveringislesczech100.exe /silent

 

 

all operations is ok but last operation is write this error message: Invalid user name or password for the guest OS

 

 

i am not understand this. if you see for console output:

 

 

E:\lgo\software\tes4-oblivion-isles\_actual&gt;"C:\Program Files (x86)\vmware\VMware VIX\vmrun.exe" -T ws

+ -gu user -gp aaaa copyFileFromHostToGuest "C:\_virtual-machines\vmware virtual machines\windows+

+ xp hry\windows xp hry.vmx" E:\lgo\software\tes4-oblivion-isles\_actual\Output\lgooblivionshiveringisl+

esczech100.exe c:\temp\lgooblivionshiveringislesczech100.exe

 

 

E:\lgo\software\tes4-oblivion-isles\_actual&gt;"C:\Program Files (x86)\vmware\VMware VIX\vmrun.exe" -T ws

+ -gu user -gp aaaa runProgramInGuest "C:\_virtual-machines\vmware virtual machines\windows xp hr+

y\windows xp hry.vmx" -activeWindow -interactive c:\temp\lgooblivionshiveringislesczech100.exe /silent

 

 

Error: Invalid user name or password for the guest OS

 

 

first guest operation is run ok and second with same username and password not run for username and password problems

 

 

host: windows vista ultimate english x64 sp2

guest: windows xp professional sp3

vmproduct: vmware workstation 7 rtm

 

 

Any idea for this problem?

thanks for any help

 

 

michal zobec

 

 


Exception:System.Runtime.InteropServices.COMException (0x80010105)

$
0
0

 

Hi , guys.I'm a newbie about VM.

 

 

  I work with Vestris.VMWareLib1.4  in VS.Net2008.

 

 

I want  to  make a windows form app to control VMWare  Workstation7.0 and VMWare Server2.0.   The workstation has been installed in localhost  and the Server in the other computer(192.168.0.53) on which WinXP OS runs.  In my codes, I use ListBox control to list the workstation's name and the server's name. When user selects one item in the listbox,  the app will automaticly connect to  the according host.       Some code:

 

 

VMWareVirtualHost host=new VMWareVirtualHost();

 

 

switch (vm_product_type)

{

       case (int)(VMPRODUCTTYPE.Server2):

       #region server2.0

 

 

        string connStr = null;

        if (consolePort != null && consolePort.Length &gt; 0)

        {

                connStr = hostIP + ":" + consolePort;

         }

         else

         {

                connStr = hostIP+ ":8333";

           }

host.ConnectToVMWareVIServer(connStr, account, password, 10);

 

 

            #endregion

            break;

           case (int)(VMPRODUCTTYPE.WorkStation):

host.ConnectToVMWareWorkstation(10);

             break;

            default:

                   breakl;

 

 

}

 

 

:Everytime when user select the other item in the listbox ,I  have  called host. Disconnect() for the previous select  and disposed  the previous host object.

 

 

Problems:

 

 

(1)After the app starts, when user select  the Workstation item ,the app will connect to workstation sucessfully.But after that, when user click the server item,An exception is thrown:

 

 

System.Runtime.InteropServices.COMException (0x80010105): The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))

 

 

at  Interop.VixCOM.VixLibClass.Connect(Int32 apiVersion,Int32 hostType,String hostName,Int32 hostPort,String userName,String password,Int32 options,IVixHandle propertyList,ICallback jobDoneCallback)       

 

 

at Vestris.VMWareLib.VMWareVirtualHost.Connect(ServiceProviderType serviceProviderType,String hostName,Int32 hostPort,String username,String password,Int32 timeout)         

 

 

at Vestris.VMWareLib.VMWareVirtualHost.ConnectToVMWareVIServer(Uri hostUri,String user)name,String password,Int32 timeoutInSeconds

 

 

...........................

 

 

(2)After the app starts,if user click Server item,the app will automaticly connect to the Server sucessfully.But  after that,if user click the Workstation item,the app will throw an exception :

 

 

The procedure entry point gvmoni_session_set_useragent could not be located in the dynamic link library gvmoni.dll.

 

 

 

 

 

so Coulde anyone help me? I have struggled with it for nearly one week.

 

 

Any help will be appreciated. Thanks in advance.

 

 

my email: 424wrl@163.com

 

 

vix api remote automation

$
0
0

Hi

i am now using esxi and i have automation that creats vcnter on this host and afterwards creats vm's and add them to vcenter.and i can run

my up over network since the vsphere api is based on web service.

Now we have new system that will run vmware work station over ubuntu.

From what i understand i need to switch to vix api for automation task's so my question is will i be able to use the api over network (remotly by ip)  or i will need to run my app localy on same host where the vmware work station is running?

Thx

vmware work station version 10

vix api 1.13

Using VIXCOM 1.1 with VB Express 2005?

$
0
0

I am trying to create a simple app using the VIXCOM 1.1 API and Visual Basic 2005 Express however I keep getting a COM error I can't seem to fix.  The error is "Type mismatch. (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))" when I try to execute the below code:

 

        libv = CreateObject("VixCOM.VixLib")

        job = libv.Connect(VixCOM.Constants.VIX_API_VERSION, VixCOM.Constants.VIX_SERVICEPROVIDER_VMWARE_WORKSTATION, Nothing, 0, Nothing, Nothing, 0, Nothing, Nothing)

 

Has anyone succesfully connected to VIXCOM using VB.NET?

reverttosnapshot question

$
0
0

 

I currently have an executable that I want/need to have up and running when the VM starts up.  I have it in the Windows "c\documents and settings\all users\start menu\programs\startup," folder.  When I "VixVM_PowerOn," it is running.  However, when I "VixVM_RevertToSnapshot," it isn't running because Windows XP operating system isn't hitting the startup folder code I am guessing.

 

 

If I send a vix api command to runprograminguest it will run, but the work it does, doesn't get performed, because it is now appearing to the VM Windows XP OS that a local machine is accessing remotely and I lose the privileges. 

 

 

Does anyone have any ideas how I can get my .exe to run on the VM when reverting from snapshot and not lose the privileges?  Is there a startup programs registry key that will still get called when reverting from snapshot?

 

 

 

 

 

Thanks,

 

 

Rod

 

 

ERROR CODE 3 :VIX_E_INVALID_ARG while connecting using sample programs

$
0
0

 

Hi all,

 

 

I am newbie, I am  using VMware WS 6 on cent OS (2.6 kernel) and VIX API v1.1.5.

 

 

I am getting an error when trying to execute the sample programs given with the VIX APIs. Using the powerOn.c , an error is generated while connecting

 

 

(Error code 3 : VIX_E_INVALID_ARG).

 

 

I am not able to figure problem since the code has not been edited by me.

 

 

Please me out with possible suggestions and solutions

 

 

Following is the code snippet

 

 

&lt;CODE&gt;

 

 

int

main(int argc, char **argv)

{

    VixError err;

    char *vmxPath;

    VixHandle hostHandle = VIX_INVALID_HANDLE;

    VixHandle jobHandle = VIX_INVALID_HANDLE;

    VixHandle vmHandle = VIX_INVALID_HANDLE;

 

    progName = argv[0];

    if (argc &gt; 1) {

        vmxPath = argv[1];

    } else {

        usage();

        exit(EXIT_FAILURE);

    }

printf("BREAKPOINT 1");

    jobHandle = VixHost_Connect(VIX_API_VERSION,

                                CONNTYPE,

                                HOSTNAME, // *hostName,

                                HOSTPORT, // hostPort,

                                USERNAME, // *userName,

                                PASSWORD, // *password,

                                0, // options,

                                VIX_INVALID_HANDLE, // propertyListHandle,

                                NULL, // *callbackProc,

                                NULL); // *clientData);

    err = VixJob_Wait(jobHandle,

                      VIX_PROPERTY_JOB_RESULT_HANDLE,

                      &#38;hostHandle,

                      VIX_PROPERTY_NONE);

    if (VIX_FAILED(err)) {

         printf("ERROR   %d",err);                         // THE ERROR CODE 3  :VIX_E_INVALID_ARG

 

 

goto abort;

    }

&lt;/CODE&gt;

 

 

 

 

 

 

 

 

 

 

 

Thanks

 

 

&lt;/CODE&gt;

Viewing all 34639 articles
Browse latest View live


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