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

Future Plans to support Process-Level Information from VM OS via VIX?

$
0
0

Forgive me if this question is naive or misguided -- I'm operating on very little information...

 

While at VMworld last week, a VMware employee and I were chatting about VIX and he indicated that in a soon-to-be-released version of the VIX API, there are functions to interact at a process level with the guest OS.  Of course, there are limited ways to do that now, but he was talking about what sounded like native hooks to WMI via VIX (or something similar).

 

Now this information also came with the deployment hint of "all you need to do is download an extra .jar file and you can get this today", which left me wondering why a C API is providing a .jar file (unless he's referencing a Java wrapper for VIX) and where one might find this mysterious .jar file.

 

Can anybody out there shed some light on the details that drove this cryptic conversation?

 

My apologies if this is well-trod ground.  My searches didn't turn up anything relevant.

 

Thanks -

 

Shane O.


Unable to open VM image

$
0
0

I'm running VMWare ESX server 4.0, and want to automate testing on several major Windows OS' using VIX 1.10. Started off by downloading VIX 1.10, and putting the VI-Server-2.0.0 dlls into my classpath. When i call VixVM_Open after a connect, it returns error 4000 : VIX_E_VM_NOT_FOUND. This seems strange, considering that the event monitor in the vSphere client reports:

 

 

Find virtual machine by datastore path

Completed

root

9/13/2010 11:23:02 AM

9/13/2010 11:23:02 AM

9/13/2010 11:23:02 AM

 

And shows a green tick indicating the process has gone through successfully. As a result of this failed step, i have no vmHandle to perform guest operations in the VM. Any ideas on why this could be failing to find the vmx path specified. I know for sure it does exist. Thoughts ?

 

 

Here is the sample code of my openVM method ...

 

-


        jobHandle = VixGuest.instance.VixVM_Open(hostHandle[0], vmxPath, null, null);

        result = VixGuest.instance.VixJob_Wait(jobHandle, VIX_PROPERTY_JOB_RESULT_HANDLE, vmHandle, VIX_PROPERTY_NONE);

        if (result != VIX_OK) {

            log.error("Error in opening VM: " + result);

        }

        VixGuest.instance.Vix_ReleaseHandle(jobHandle);

        return vmHandle;

-


 

FYI, I'm developing the implementation of the VIX API in Java.

IP address of guest OS (VIX API)

$
0
0

Is there a way to figure out the IP address of guest OS in the VM, using VIX API. I did notice in a couple of discussion threads, mention of trying to read VM specific variables using VixVM_ReadVariable method call as:

 

jobHandle = VixVM_ReadVariable(vmHandle,

                               VIX_VM_GUEST_VARIABLE,

                               "ip",  // Name of IP address variable supposed to be populated by VMWare Tools

                               0, // options

                               NULL, // callbackProc

                               NULL); // clientData);

err = VixJob_Wait(jobHandle,

                  VIX_PROPERTY_JOB_RESULT_VM_VARIABLE_STRING,

                  &readValue,

                  VIX_PROPERTY_NONE);

 

readValue gets populated with the IP address (or so it claims) I tried this, but the readValue always shows an empty string ""

Is there a reliable way to retrieve the IP address of the ethernet adaptor on the VM. Help would be appreciated.

how to get the vmdk file path for a shutdown VM?

$
0
0

Hi Guys,

 

how to get the vmdk file path for a shutdown VM in ESX Server via VIX API?

I try to get it via VixVM_ReadVariable() function. but it seems this function requires the VM is power on.

I don't want to get the VM started, just want to know if I can get the vmdk file path when a VM is power off.

 

Thanks in advance.

Issue calling VIX API from vSphere Client

$
0
0

We are calling the VIX APIs from the vSphere Client Plug-in. I am loading the vSPhere Plug-in with vSPhere Client 4.1.

 

When I call VIXHost_Connet for VMWare WOrkstion 7.1.X, I get the below error.

 

'VpxClient.exe': Loaded 'D:\Program Files\VMware\VMware VIX\Workstation-7.1.0\32bit\vixd.dll', No symbols loaded.
'VpxClient.exe': Loaded 'D:\Program Files\VMware\VMware VIX\Workstation-7.1.0\32bit\gvmomi.dll', No symbols loaded.
First-chance exception at 0x7c84b4a9 in VpxClient.exe: 0xC0000138: Ordinal Not Found.
'VpxClient.exe': Unloaded 'D:\Program Files\VMware\VMware VIX\Workstation-7.1.0\32bit\vixd.dll'
'VpxClient.exe': Unloaded 'D:\Program Files\VMware\VMware VIX\Workstation-7.1.0\32bit\gvmomi.dll'

 

I complied my executables with Vmware-vix-1.10.3-368992 ( latest SDK). I am not sure whats wrong happening with this.

 

I am able to make a VIX api call from saparate binary (sample.exe) to Workstation 7.1.1 and those are working fine. So the issue seems to be with vSphere Client. By any chance Vmware-vix-1.10.3-368992 has new version of DLLs like gvmomi.dll gobject-2.0.dll and VpxClient.exe client is loading the older version of DLLs.

 

Any inputs/suggestiots are welcome.

Guest Username from Perl SDK

$
0
0

Is there a way I can get the username of the logged in user(s) from a guest with vmware tools running from the Perl API?

Sample Code to test VIX install

$
0
0

#include "vix.h"

#include <stdlib.h>

#include <stdio.h>

VixHandle hostHandle = VIX_API_VERSION;

VixHandle jobHandle = VIX_INVALID_HANDLE;
VixError err;
jobHandle = VixHost_Connect(VIX_API_VERSION,
VIX_SERVICEPROVIDER_VMWARE_SERVER,
host, // hostName
0, // hostPort
user, // userName
password, // password,
0, // options
VIX_INVALID_HANDLE, // propertyListHandle
NULL, // callbackProc
NULL); // clientData
err = VixJob_Wait(jobHandle,
VIX_PROPERTY_JOB_RESULT_HANDLE,
&hostHandle,
VIX_PROPERTY_NONE);
if (VIX_OK != err) {
// Handle the error...
Vix_ReleaseHandle(jobHandle);
VixHost_Disconnect(hostHandle);
}
printf("Connected to local host.\n");
when i compile the code
it nootify

/home/david/Development/workspace/VIXTest/Debug/../src/Connection.c:21: undefined reference to `VixHost_Connect'

/home/david/Development/workspace/VIXTest/Debug/../src/Connection.c:31: undefined reference to `VixJob_Wait'

/home/david/Development/workspace/VIXTest/Debug/../src/Connection.c:37: undefined reference to `Vix_ReleaseHandle'

/home/david/Development/workspace/VIXTest/Debug/../src/Connection.c:38: undefined reference to `VixHost_Disconnect'

I know that is mean the function is not defined.

but that should be defined as the api.......

Any can tell me how to solution the problem???

Thank

Run program in virtual machine

$
0
0

I am using VixVM_RunProgramInGuest to run a executable in a guest virtual machine. If the EXE requires elevation, it fails with the VIX_E_PROGRAM_NOT_STARTED error code. It works fine if the exe is not elevated.

I cannot figure out how to make this work.

 

I am using VIX API 1.12 and the guest OS is Windows 8.

 

LATER EDIT: Same problem on Windows 7. UAC is turned of on both machines.

 

Thanks


Objective-C-friendly wrapper around VIX API

$
0
0

First of all I'd like to thank the developers for finally bringing VIX API to Mac OS X. That's a great wrok.

 

I've started a project for packing pure-C VIX API withing ObjC objects, so it can be used in Mac OS X (10.7+, 64bit) applications without cognitive overhead.

It's distributed as a framework. The homepage of the project is https://github.com/Kentzo/VIXObjC.

 

Everyone interested are welcome.

VixError 22002: The specified version was not found.

$
0
0

Greetings,

 

I'm trying to use the latest VMWare Player and VIX tools to build an automated testing framework. However, when I call VixHost_Connect, all I get is:

 

VixError 22002: The specified version was not found.

 

I'm not sure what exactly it is referring to?

 

Here is what I have installed:

 

$ vmware-installer -l

Gtk-Message: Failed to load module "pk-gtk-module": libpk-gtk-module.so: cannot open shared object file: No such file or directory

Gtk-Message: Failed to load module "canberra-gtk-module": libcanberra-gtk-module.so: cannot open shared object file: No such file or directory

Product Name         Product Version    

==================== ====================

vmware-player        6.0.0.1295980      

vmware-vix           1.12.2.1031769

 

Cheers,

 

Peter.

Is there any way to check if VMware tools is installed in a powered off VM?

$
0
0



I would like to know whether or not a VM has VMware tools installed without having to power on the VM. Any help is very much appreciated.

API for condition wait

$
0
0

Hi,

 

can any one suggest me which api I used for waiting for an condition wait instead of vmk_worldWait() , because system is crashed while using this api in Interrupt handler.

 

Error :

2016-04-13T11:24:15.519Z cpu2:33075)@BlueScreen: NOT_IMPLEMENTED bora/vmkernel/sched/cpusched.c:9556

2016-04-13T11:24:15.529Z cpu2:33075)Code start: 0x418018800000 VMK uptime: 0:00:03:34.556

2016-04-13T11:24:15.538Z cpu2:33075)0x4390c999af90:[0x418018876eea]PanicvPanicInt@vmkernel#nover+0x37e stack: 0x4390c999b028

2016-04-13T11:24:15.550Z cpu2:33075)0x4390c999b020:[0x418018877205]Panic_NoSaveNoReturn@vmkernel#nover+0x4d stack: 0x4390c999b080

2016-04-13T11:24:15.562Z cpu2:33075)0x4390c999b080:[0x418018855aec]Int6_UD2Assert@vmkernel#nover+0x12c stack: 0x418018b9c8a9

2016-04-13T11:24:15.573Z cpu2:33075)0x4390c999b120:[0x4180188c6044]gate_entry_@vmkernel#nover+0x0 stack: 0x0

2016-04-13T11:24:15.584Z cpu2:33075)0x4390c999b1e0:[0x418018a1173e]CpuSchedWait@vmkernel#nover+0x26e stack: 0x0

2016-04-13T11:24:15.594Z cpu2:33075)0x4390c999b260:[0x418018a11a2b]CpuSchedTimedWaitInt@vmkernel#nover+0x9f stack: 0x4390c999b3a0

2016-04-13T11:24:15.607Z cpu2:33075)0x4390c999b2c0:[0x418018a11ac1]CpuSched_TimedWait@vmkernel#nover+0x19 stack: 0x4305f5667360

2016-04-13T11:24:15.619Z cpu2:33075)0x4390c999b2e0:[0x41801889afdf]vmkWorldWait@vmkernel#nover+0xa3 stack: 0x50

2016-04-13T11:24:15.629Z cpu2:33075)0x4390c999b320:[0x41801889b078]vmk_WorldWait@vmkernel#nover+0x84 stack: 0xc3

vix-perl installation problems

$
0
0

Hi all,

 

I'm having problems installing the vix-perl packages on Windows XP. The first thing i did was installing the ActivePerl-5.8.8.820-MSWin32-x86-274739.msi. Then I started the command prompt of VS2005 (also tried VS2003) and entered "perl Makefile.pl". The output was the following:

 

Unable to find a perl 5 (by these names: C:\Program Files\Perl\bin\perl.exe perl.exe perl5.exe perl5.8.8.exe miniperl.exe, in these dirs: . C:\Program Files\Microsoft Visual Studio 8\Common7\IDE C:\Program Files\Microsoft Visual Studio 8\VC\BIN C:\Program Files\Microsoft Visual Studio 8\Common7\Tools C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\bin C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\bin C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\bin C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 C:\Program Files\Microsoft Visual Studio 8\VC\VCPackages C:\Program Files\Perl\site\bin C:\Program Files\Perl\bin C:\WINDOWS\SYSTEM32 C:\WINDOWS C:\WINDOWS\SYSTEM32\WBEM C:\PROGRAM FILES\MICROS

OFT SQL SERVER\90\TOOLS\BINN\ C:\WINDOWS\MICROSOFT.NET\FRAMEWORK\V1.1.4322 C:\PR

OGRAM FILES\COMMON FILES\GTK\2.0\BIN C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO 8\COMMON7\IDE C:\Program Files\Varian\Sybase\OCS-12_5\bin C:\Program Files\Varian\

Sybase\OCS-12_5\dll C:\Program Files\Varian\Sybase\OCS-12_5\lib3p C:\Program Files\Microsoft Team Foundation Server Power Toys C:\WINDOWS\system32\WindowsPowerShell\v1.0 C:\Program Files\TortoiseSVN\bin C:\Program Files\Sandcastle\ProductionTools\ C:\Program Files\Perl\bin) Writing Makefile for VMware::VixBinding

 

I don't get it, no idea what happens here. I have tried different versions of perl but I always get that message.

 

Executing the makefile then results in:

 

NMAKE : fatal error U1073: don't know how to make 'C:\Program'

Stop.

 

Executing a perl script results in:

 

Can't locate auto/VMware/VixBinding/autosplit.ix in @INC (@INC contains: blib/lib blib/auto C:/Program Files/Perl/site/lib C:/Program Files/Perl/lib .) at C:/Program Files/Perl/lib/AutoLoader.pm line 160. at VMware/VixBinding.pm line 20

Can't locate loadable object for module VMware::VixBinding in @INC (@INC contains: blib/lib blib/auto C:/Program Files/Perl/site/lib C:/Program Files/Perl/lib .) at VMware/Vix/API/API.pm line 13 Compilation failed in require at VMware/Vix/API/API.pm line 13.

BEGIN failed--compilation aborted at VMware/Vix/API/API.pm line 13.

Compilation failed in require at VMWare/Vix/Simple.pm line 25.

BEGIN failed--compilation aborted at VMWare/Vix/Simple.pm line 25.

Compilation failed in require at RunBuild.pl line 1.

BEGIN failed--compilation aborted at RunBuild.pl line 1.

 

What am I doing wrong? And why the heck do I have to compile that stuff myself? Isn't there a binary version available?

Why is it such a problem to install the API?? All I want is start a VM via script!

 

Thanks!

Multiple Connections to ESX

$
0
0

 

Hi,

 

 

I'm creating a multi-threaded web application the job of which is to manage automation jobs running on ESX server. When 'jobs' are submitted, the system manages the running of each job on a VMWare image on the ESX server. I'm using dblock's 'Vestris.VMWareLib' wrapper for C# to perform these actions.

 

 

However, I'm having some issues when I try to connect to ESX. If I attempt a number of connections to ESX (like when 3 jobs are submitted to be run) at the exact same time in my web app, I get the error:

 

 

Vestris.VMWareLib.VMWareException: The handle is not a valid VIX object

 

 

I then proceded to write a simple C# console app to make 5 concurrent connections to ESX, but had no problem with these. I've attached that example.

 

 

Will I have issues if I make a number of connections to ESX at the same time? Is it an idea that I have to 'stagger' making the connections by a couple of seconds?

 

 

Please help Thanks !!

 

 

 

 

 

VIX_SERVICEPROVIDER_VMWARE_WORKSTATION error

$
0
0

 

Hi,

 

 

I'm trying to run a script in a 64-bit Windows 7 VM usingthe vmrun command line tool (1.6.0.2073) and the following options:

 

 

vmrun -T ws -gu user -gp passwordrunProgramInHost "C:\vms\W7.vmx" -interactive "C:\test\test.cmd"

 

 

and i get the following error:

 

 

Error: Service type VIX_SERVICEPROVIDER_VMWARE_WORKSTATION was specified, but not installed

 

 

Can anyone help me with this error, it would be most appreciated!

 

 

Thanks

 

 

 

 

 


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

 

 

PyVix or PyVMware

$
0
0

 

Hi:

 

 

I´m trying to use pyvmware or pyvix for program in python VIX API. I´m not be able to do this.... I need help with that please!!!!!!

 

 

 

 

 

Thanks

 

 

Python Module for the VIX API

$
0
0

I started a python module for the VIX API.  It is very immature and I've just started it last night.  Parts of it are working and other parts are a work in progress.  Currently the entire VIX API has been completed and is callable from the class provided.  I am currently working on providing a more simple class interface to utilize VIX. 

 

You can grab the code here:

 

https://github.com/diffuse/pyvix/blob/master/pyvix.py

VIX connection problem to LabManager

$
0
0

Hello,

 

I am new to LabManager and VIX. Please help if possible.

 

I have an account with a LabManager that I access with https://labmanager.mycompany.com

 

I tried to connect to the LabManager with VIX like this:

 

($err, $hostHandle) = HostConnect(VIX_API_VERSION,
                  VIX_SERVICEPROVIDER_VMWARE_VI_SERVER,
                 'https://labmanager.mycompany.com/sdk',
                  '0',
                  'myusername',
                  'mypassword',
                  0,
                  VIX_INVALID_HANDLE);

 

It immediately threw the following error in my command prompt

 

vimServiceVersions.xml:11: parser error : Opening and ending tag mismatch: META line 3 and HEAD
</HEAD><BODY><TABLE width=500 border=0 cellspacing=10><TR><TD>
       ^
vimServiceVersions.xml:11: parser error : AttValue: " or ' expected
</HEAD><BODY><TABLE width=500 border=0 cellspacing=10><TR><TD>
                          ^
vimServiceVersions.xml:11: parser error : attributes construct error
</HEAD><BODY><TABLE width=500 border=0 cellspacing=10><TR><TD>
                          ^
vimServiceVersions.xml:11: parser error : Couldn't find end of Start Tag TABLE line 11
</HEAD><BODY><TABLE width=500 border=0 cellspacing=10><TR><TD>
                          ^
vimServiceVersions.xml:24: parser error : Opening and ending tag mismatch: br line 24 and h2
or 404 - File or directory not found.<br>Internet Information Services (IIS)</h2
                                                                               ^
vimServiceVersions.xml:33: parser error : Opening and ending tag mismatch: hr line 25 and TD
</TD></TR></TABLE></BODY></HTML>
     ^
vimServiceVersions.xml:33: parser error : Opening and ending tag mismatch: h2 line 24 and TR
</TD></TR></TABLE></BODY></HTML>
          ^
vimServiceVersions.xml:33: parser error : Opening and ending tag mismatch: hr line 15 and TABLE
</TD></TR></TABLE></BODY></HTML>
                  ^
vimServiceVersions.xml:33: parser error : Opening and ending tag mismatch: TD line 11 and BODY
</TD></TR></TABLE></BODY></HTML>
                         ^
vimServiceVersions.xml:33: parser error : Opening and ending tag mismatch: TR line 11 and HTML
</TD></TR></TABLE></BODY></HTML>
                                ^

 

What may cause this? Can I use VIX to talk to LabManager at all?

 

Thanks,

-Wallace

Reasons for VixVM_PowerOn failure?

$
0
0

I start my VMPlayer via VIX API.  I call VixVM_PowerOn and VixJob_Wait.  This worked just fine with VMWare Player 3.0 and VIX API 1.10.  I recently upgraded to VMPlayer 4.0 and VIX API 1.11 and my virtual machine will no longer power on.

 

I receive a 3041 error (VIX_E_CANNOT_POWER_ON_VM).

 

I checked my event log and saw the following (I'm removing the timestamps, etc):

 

"Faulting application vmware-vmx.exe, version 8.0.1.27038... faulting module USER32.dll, version 6.0.6002.18327... exception code 0xc0000142, fault offset 0c00000000000b6f08"

 

Does anyone know what would cause this error in general?  Just looking for things to check.  And as I mentioned above, this worked prior to upgrading so I'm a little confused.

 

Thanks!

Viewing all 34639 articles
Browse latest View live


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