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

RunProgramInGuest only works if user is already logged in interactively?

$
0
0

I am at a loss on how to use the VIX api or vmrun.exe to run programs in the guest OS. I see proofs of concepts, but never have seen any signifcant, real-life, business case example of this working. I have been through every.VIX api.resource.available.

 

Here are my operations at a high level:

1. power on VM snapshot
2. Run a program. Such as notepad.exe. Ideally, I would like to run an msi package. but keeping it simple for now...
3. shutdown the VM
4. take snapshot
Now - these steps work fine if I first manually log into an already-powered-on snapshot and just start my program in step 2. Everything just works. However, if I start at step 1 and allow VIX to power on the snapshot, my RunProgramInGuest just doesn't do what it normally would had I been logged in already. Same situation occurs for RunScriptInGuest. It seems that unless I am also already logged into the machine with a real, interactive user session, I cannot get the program to run inside the guest.
vmrun -T ws runScriptInGuest -activewindow D:\VMware-VMs\test-W7x86-3\test-W7x86-3.vmx "C:\windows\system32\cmd.exe" "/c C:\users\test\desktop\StartTask.bat"

 

UAC is off on host and guest machine. my user is Administrator. The result of running this command is that I can use listProcessesInGuest and see some new processes running under this username:

pid=2984, owner=MYDOMAIN\test, cmd="C:\Windows\System32\cmd.exe"  "C:\Users\test\AppData\Local\Temp\vixScript0"

pid=2992, owner=MYDOMAIN\test, cmd=\??\C:\Windows\system32\conhost.exe "-262616372-801187394105077478520761067478199601-1762539247384719877-515260550

 

the above is the farthest I can get. runProgramInGuest doesn't even get me this far however...I wouldn't even see the process get kicked off.

 

I have accomplished this goald with virtual box in the past. I moved toward VMWare and find it a much much better product. However this API seems a little more difficult to work.

 

I also raised a similar version of this problem here: http://stackoverflow.com/questions/12335148/unable-to-use-vix-api-to-power-on-vm-install-software-with-msiexec-then-create


How to ignore quotes in vmrun commands

$
0
0

Hi,

 

I am trying to execute a vmrun command like below which is working fine.

 

vmrun -T esx -h https://test.eng.vmware.com/sdk -u root -p password -gu root -gp password runProgramInGuest "[datastore] test/test.vmx" /bin/rpm -i /root/expect-5.43.0-5.1.x86_64.rpm

 

But if I execute it like below (please note I've mentioned the programName in quotes)

 

vmrun -T esx -h https://test.eng.vmware.com/sdk -u root -p password -gu root -gp password runProgramInGuest "[datastore] test/test.vmx" "/bin/rpm -i /root/expect-5.43.0-5.1.x86_64.rpm"

 

then I am getting an error "Error: A file was not found"

 

Why is this difference..?

I need that command to be worked in the second format also. Because I am trying to execute it from java where I am passing all the details as strings. So it is getting executed with quotes and I am getting the same error "Error: A file was not found".

 

Any solution..?

 

Regards,

Badri.

Problems using vmrun on ESX3.5

$
0
0

Hopefully a quick question because I'm missing something obvious.

 

I am running vmrun version 1.12.1 against an ESX 3.5 Server and am getting partial sucess.

 

If I run:

 

vmrun -T ESX -h http://{ip Address}/sdk -u root list

 

I am prompted for the password then it lists the VM's running as follows.

 

Total running VMs: 3

[ha-datacenter/server:storage2] Client/Client.vmx

""                          ""                     ""

""                          ""                     ""

 

But when I try to list the snapshots using:

 

vmrun -T ESX http://{ip Address}/sdk -u root listSnapshots "[ha-datacenter/server:storage2] Client/Client.vmx"

or

vmrun -T ESX http://{ip Address}/sdk -u root listSnapshots "[server:storage2] Client/Client.vmx"

 

I get the following error.

 

Error: Cannot open VM: [server:storage2] Client/Client.vmx, There was an error in communication.

 

Thanks,

How to get VM path to .vmx file when you have the VM name?

$
0
0

Hi All,

I'm using the latest release of VIX API to power on VMs on an ESX server. I'm working with C# in Visual Studio 2012 and currently, I power on the VM using the following code:

 

VMWareVirtualMachine virtualClientMachine = host.Open(vmMachinePath, 2100);

 

While this works, I think it's better to instead be able to power on the VM when you know the VM name and not the path. So, how can I get the VM path to the vmx file when I know the name of the VM? For example, if my VM on the ESX server is called WIN7GERMAN, how do I then get the path and pass this to the host.Open function?

 

Thanks for any help or code.

John

How do I interactively login to Windows?

$
0
0

 

Hello,

 

 

I'm automating a Windows XP VM.  I've had success so far doing what I need with LoginInGuest, but for some tasks I'd like to actually log in at the Windows login prompt so the UI comes up.

 

 

I realize that I can save a snapshot with the user already logged in, but I would prefer to have my snapshots with the VM powered off.

 

 

Is there a recommened technique for scripting a login at the Windows login prompt?

 

 

 

 

 

Thanks,

Ben

 

 

Unable to connect to ESXi 4.0.0 using vmrun

$
0
0

 

Hello dear experts,

 

 

 

 

 

I have a Linux machine where VIX API 1.10.1 is installed. I'm trying to list the available VMs of an ESXi 4.0.0 machine, using the command below:

 

 

vmrun -T esx -h https://10.x.x.x/sdk -u xxxx -p xxxx list

 

 

 

 

 

The result is:

 

 

Unable to connect to host.

Error: Failure sending/receiving network data

 

 

 

 

 

Here are the logs:

 

 

 

 

 

>> vixWrapper-6207.log

Sep 22 20:51:44.098: app-140105407071984| Log for VixWrapper pid=6207 version=1 build=build-266898 option=Release

Sep 22 20:51:44.098: app-140105407071984| The process is 64-bit.

Sep 22 20:51:44.098: app-140105407071984| Host codepage=UTF-8 encoding=UTF-8

Sep 22 20:51:44.098: app-140105407071984| config points to non-existent implementation library '/usr/lib/vmware-vix/server-1.0.9/64bit/libvix.so'

Sep 22 20:51:44.098: app-140105407071984| config points to non-existent implementation library '/usr/lib/vmware-vix/ws_server_esx-4/64bit/libvix.so'

Sep 22 20:51:44.098: app-140105407071984| config points to non-existent implementation library '/usr/lib/vmware-vix/ws_server_esx-4/64bit/libvix.so'

Sep 22 20:51:44.098: app-140105407071984| config points to non-existent implementation library '/usr/lib/vmware-vix/ws_server_esx-4/64bit/libvix.so'

Sep 22 20:51:44.098: app-140105407071984| config points to non-existent implementation library '/usr/lib/vmware-vix/ws_server_esx-4/64bit/libvix.so'

Sep 22 20:51:44.098: app-140105407071984| config points to non-existent implementation library '/usr/lib/vmware-vix/server-1/64bit/libvix.so'

Sep 22 20:51:44.098: app-140105407071984| Loading Vix implementation library /usr/lib/vmware-vix/VSphere-4.1/64bit/libvix.so

 

 

 

>> vix-6207.log

Sep 22 20:51:44.116: app-140105407071984| Log for Vix pid=6207 version=-1 build=build-266898 option=Release

Sep 22 20:51:44.116: app-140105407071984| The process is 64-bit.

Sep 22 20:51:44.116: app-140105407071984| Host codepage=UTF-8 encoding=UTF-8

Sep 22 20:51:44.116: app-140105407071984| Foundry Init: setting up global state (0 threads)

Sep 22 20:51:44.117: app-140105407071984| Vix_InitializeGlobalState: vixLogLevel = 0

Sep 22 20:51:44.117: app-140105407071984| Vix_InitializeGlobalState: vixApiTraceLevel = 0

Sep 22 20:51:44.117: app-140105407071984| Vix_InitializeGlobalState: vixDebugPanicOnVixAssert = 0

Sep 22 20:51:44.117: app-140105407071984| Vix_InitializeGlobalState: vixLogRefcountOnFinalRelease = 0

Sep 22 20:51:44.117: app-140105407071984| Vix_InitializeGlobalState: asyncOpWarningThreshold = 1000000

Sep 22 20:51:44.117: app-140105407071984| Vix_InitializeGlobalState: enableSyncOpSelection = FALSE

Sep 22 20:51:44.117: app-140105407071984| Vix_InitializeGlobalState: enableExternalThreadInterface = TRUE

Sep 22 20:51:44.117: app-140105407071984| VixHost_ConnectEx: version -1, hostType 5, hostName https://10.x.x.x/sdk, hostPort 0, options 528

Sep 22 20:52:59.372: app-140105405720848| Vix: : VixTranslateVimException: Received an invalid response fault.

Sep 22 20:52:59.373: app-140105405720848| Vix: : VixTranslateVimException: basicHttp/libcurl error code is 48, translated to VixError VIX_E_NET_HTTP_TRANSFER (30200).

Sep 22 20:52:59.373: app-140105405720848| Vix: : VixTranslateVimException: response message is "".

 

 

 

 

 

Have you experienced this basicHttp/libcurl error code is 48, translated to VixError VIX_E_NET_HTTP_TRANSFER (30200). error before?

 

 

Can you please give me a hint on how to overcome that?

 

 

Thank you in advance for your answer!

 

 

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

[Urgent] Please help me out - Invalid user name or password on Guest Ubuntu

$
0
0

Hi,

 

Ater searching on Google for 1 week, I have finally came here. please help me out.

 

I have Windows 7 host OS and Ubuntu 11.04 for the Guest OS on running VMWare Workstation 6.5

 

I have any problem to run Power command such as "start" "stop" "reset"

c:\>vmrun -T ws reset "./Ubuntu.wmx"

 

HOWEVER,

Whenever I trying to run a command without ID/Password, it returns "Invalid user name or password for the Guest OS" even though YES it is correct ID/PASSWD for the Guest Ubuntu OS.

 

c:>vmrun -T ws -gu tshpark -gp 2001 runProgramInGuest "./Ubuntu.vmx" /usr/bin/xclock

Error: Invalid user name or password for the guest OS

 

Also tried,

c:>vmrun -T ws -gu "tshpark" -gp "2001" runProgramInGuest "./Ubuntu.vmx" /usr/bin/xclock

Error: Invalid user name or password for the guest OS

 

Please help me out how to troubleshoot this problem?

 

Thanks in advance,

Thomas


copy file from vco to guest failure?

$
0
0

Hi

 

I am running VCO 5.1 appliance in a vsphere 5.1 environment.

 

I am attempting to write a file to a guest machine. I have tried using both Local Administrator and Domain Administrator credentials but in both instances I receive the following:

 

No permissions on the file for the attempted operation (Workflow:test workflow / Scriptable task (item1)#15)

 

I have tested that I can indeed logon.

I have tested that I can check for a directory.

I have tested that I can create a directory.

 

All work fine. I just can't appear to create the file.

 

I ran proccess mon on the guest when I ran the workflow (outputprocmon.txt)

 

So I can see it is trying look at the directory and the file but for some reason is getting a permission denied??

 

I can log onto the guest as either a domain admin or local admin and create a file in this directory.

 

Is the file being created as the user passed through or as the account running the vmtools?

 

Test script is:

 

parameters [string]userName, [secureString]password, [VC:VirtualMachine]vm

 

var host = vm.sdkConnection;
var guestOperationsManager = host.guestOperationsManager;
var guestAuth = new VcNamePasswordAuthentication();
guestAuth.username = userName;
guestAuth.password = password;
var fileManager = guestOperationsManager.fileManager;
myResult = false;
overwrite = false;
var attr = new VcGuestFileAttributes();
//var srcFile = new File(vcoPath);
var srcFile = "/scripts/blah.txt";
var guestFilePath = "C:/bin/blah.txt";
var uri = fileManager.initiateFileTransferToGuest(vm , guestAuth ,guestFilePath, attr, srcFile.length, overwrite);
myResult = fileManager.putFile(srcFile, uri);
System.log("Result is: " + myResult);

 

 

Oh and the path /scripts on the vco appliance is a ntfs mount rw,hard,intr

 

Any assistance greatly appreciated.

 

Sam

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?

VMPlayer Network and Hardware Interface Disabling

$
0
0

 

I would like to deploy and Win XP WM using VMPlayer. It is critical that the GUI buttons for the network and hardware be disabled or hidden.

 

 

Thanks in advance!

 

 

E.J.

how to resolve error running cscript //nologo powerOn.wsf from VIX Samples folder

$
0
0

 

I get the this error when running the sample vbscript provided in Vix

 

 

Microsoft VBScript runtime error: ActiveX component can't create object: 'VixCOM.VixLib'

 

 

This is on VMServer 1.04

 

 

C:\Program Files (x86)\VMware\VMware VIX\Samples>dir

Volume in drive C has no label.

Volume Serial Number is 4C88-5847

 

 

Directory of C:\Program Files (x86)\VMware\VMware VIX\Samples

 

 

05/19/2008  11:21 PM    <DIR>          .

05/19/2008  11:21 PM    <DIR>          ..

03/03/2008  07:09 PM             5,484 callbackProc.c

03/03/2008  07:09 PM             5,563 eventPump.c

03/03/2008  07:09 PM             4,333 powerOn.c

05/20/2008  04:33 PM             3,269 powerOn.vbs

05/19/2008  09:23 PM             3,295 powerOn.vbs.bak

03/03/2008  07:09 PM             3,266 powerOn.vbs.orig

03/03/2008  07:09 PM               122 powerOn.wsf

03/03/2008  07:09 PM               122 powerOn.wsf.orig

03/03/2008  07:09 PM             6,149 snapshot.c

03/03/2008  07:09 PM             4,794 suspend.c

              10 File(s)         36,397 bytes

               2 Dir(s)  17,871,486,976 bytes free

 

 

C:\Program Files (x86)\VMware\VMware VIX\Samples>cscript //nologo powerOn.wsf

C:\Program Files (x86)\VMware\VMware VIX\Samples\powerOn.wsf(30, 2) Microsoft VB

Script runtime error: ActiveX component can't create object: 'VixCOM.VixLib'

 

 

Any assistance would be appreciated.

 

 

/usr/bin/vmware-config-tools.pl --default --compile any hidden options?

$
0
0

Hi,

I dug up a very old post to silent install the vmware-tools on linux. There are a bunch of posts on how to silent install them in windows, but I need linux.

So I found this someone posted

/usr/bin/vmware-config-tools.pl --default --compile

It seems to work, but it's setting the display size to HUGE, and I'm wondering if anyone can point me to a way to control the display size while still keeping it a non-interactive setup.

 

Best Regards

"Unable to connect to host. Error: The specified version was not found "

$
0
0

 

file:///C:/Documents%20and%20Settings/ba/My%20Documents/Soulseek%20Chat%20Logs/Private/eureka.txt

 

 

 

 

 

here is my situtation:

 

 

      workstation 7.0 installed------> vmrun runs pretty well -


>install   VMware-vix-e.x.p-222403.exe(this is vix110 beta) -


>vmrun not work

 

 

below is my operation:

 

 

C:\Program Files\VMware\VMware Workstation>vmrun -T ws start "D:\redhat\Red Hat Enterprise Linux 5.vmx"

 

 

Unable to connect to host.

Error: The specified version was not found

 

 

C:\Program Files\VMware\VMware Workstation>

 

 

 

 

 

thanks for any help

 

 

how to unlock vmdk files?

$
0
0

 

Hi,

 

 

 

 

 

Im using vix api to create a snapshot of guest os. After creating snapshot i try to download the snapshot files to remote machine without power off the guest os . But the problem is  *flat.vmdk files are locked by ESX server when the guest os is powered ON. so im unable to download 'flat.vmdk files. Can any one tell me is there anyway to unlock that file and make it free to download?. OR is the any vmware commandline tools to do this?

 

 

 

 

 

NOTE: I want to do this operation without power off the guest machine as well as with out renaming or moving the vmdk files.

 

 

 

 

 

its very urgent. Please help me.

 

 

Regards,

 

 

Ilavaa

 

 


What API version to use with Player 3.1?

$
0
0

Currently I tried 1.8.1 and 1.10 beta - I have got "The specified version was not found" error.

Vmware-vix 64 bit installation problem on Debian Lenny

$
0
0

Hello,

 

I'm trying to install vmware-vix on Debian Lenny, without X. I logged in as root, then launched the installer:

./VMware-VIX-1.10.1-266898.x86_64.bundle --console

 

 

Unfortunately it does this:

________________________________________________________________________________________

 

The product is ready to be installed.  Press Enter to begin

installation or Ctrl-C to cancel.

 

Rolling back VMware Installer 1.1

Removing files...

Uninstalling VMware Installer 1.1

Deconfiguring...

________________________________________________________________________________________

 

 

 

Then I only get /etc/vmware-installer, /usr/lib/vmware-installer, /var/log/vmware-installer,but no Vix. The log says:

 

 

________________________________________________________________________________________

 

Using UI type console

Opening database file /etc/vmware-installer/database

http://vmware-installer 1.1 Installation failed, rolling back installation.

Top level exception handler

Traceback (most recent call last):

File "/tmp/vmis.eMKdWh/install/vmware-installer/vmis/core/transaction.py", line 348, in RunThreadedTransaction

txn.Run()

File "/tmp/vmis.eMKdWh/install/vmware-installer/vmis/core/transaction.py", line 67, in Run

self.get()()

File "/tmp/vmis.eMKdWh/install/vmware-installer/vmis/core/common.py", line 197, in Show

un.Execute(txn.temp, onProgress)

File "/tmp/vmis.eMKdWh/install/vmware-installer/vmis/core/install.py", line 187, in Execute

self._removeFiles(db.database.components.GetInstalledFiles(self.component.uid), onProgress)

File "/tmp/vmis.eMKdWh/install/vmware-installer/vmis/core/install.py", line 161, in _removeFiles

onProgress()+

File "/tmp/vmis.eMKdWh/install/vmware-installer/vmis/core/common.py", line 217, in _onProgress

txn.ui.SetProgress(fraction)

File "/tmp/vmis.eMKdWh/install/vmware-installer/vmis/ui/console.py", line 240, in SetProgress

self.EnableCursor(False)    # Disable blinking cursor

File "/tmp/vmis.eMKdWh/install/vmware-installer/vmis/ui/console.py", line 280, in EnableCursor

sys.stdout.write(CURSOR_INVISIBLE)

TypeError: argument 1 must be string or read-only character buffer, not None

Rollback failed

Traceback (most recent call last):

File "/tmp/vmis.eMKdWh/install/vmware-installer/vmis/core/transaction.py", line 401, in RunThreadedTransaction

txn.Run()

File "/tmp/vmis.eMKdWh/install/vmware-installer/vmis/core/transaction.py", line 67, in Run

self.get()()

File "/tmp/vmis.eMKdWh/install/vmware-installer/vmis/core/common.py", line 117, in Show

wrap(u.PostUninstall, txn.opts, onProgress)

File "/tmp/vmis.eMKdWh/install/vmware-installer/vmis/util/__init__.py", line 26, in wrap

func(*args, **kwargs)

File "/tmp/vmis.eMKdWh/install/vmware-installer/vmis/core/install.py", line 174, in PostUninstall

self._removeFiles(db.database.components.GetFiles(self.component.uid), onProgress)

File "/tmp/vmis.eMKdWh/install/vmware-installer/vmis/core/install.py", line 161, in _removeFiles

onProgress()

File "/tmp/vmis.eMKdWh/install/vmware-installer/vmis/core/common.py", line 217, in _onProgress

txn.ui.SetProgress(fraction)

File "/tmp/vmis.eMKdWh/install/vmware-installer/vmis/ui/console.py", line 240, in SetProgress

self.EnableCursor(False)    # Disable blinking cursor

File "/tmp/vmis.eMKdWh/install/vmware-installer/vmis/ui/console.py", line 280, in EnableCursor

sys.stdout.write(CURSOR_INVISIBLE)

TypeError: argument 1 must be string or read-only character buffer, not None

________________________________________________________________________________________

 

 

Did anyone from VMWare test the vmware-vix installer without X? Did anyone manage to install vmware-vix on a system without X?

The bundle is ok, I checked the MD5. I extracted the contents and it has the vmware-vix and vmware-installer folders, but it only installs vmware-installer

 

 

When launching vmrun from the extracted bundle, I get this error:

 

 

 

________________________________________________________________________________________

 

Error: Cannot find support libraries; Vix appears to have not been installed

________________________________________________________________________________________

 

I tried symlinking the libvix.so in /usr/lib, adding the lib/ and  lib/VSphere-4.1/64bit/ foldes to LD_LIBRARY_PATH, but still nothing. What does the installer do to make vmrun work? I looked through the Python files, but it's not very clear

Call to Reset(VIX_VMPOWEROP_FROM_GUEST) hangs at some guests

$
0
0

Hello,

 

calling Reset with the option VIX_VMPOWEROP_FROM_GUEST and then calling Wait hangs at some guests waiting forever for the operation to complete (even when the guest SO restarted ok). Currently I have one guest with XP that hangs and 2 guests with 2003 server that works fine.

 

I'm using 1.10.2. Any ideas?

Does the vCenter Server needs to be upgraded to version 5 to invoke Guest OS operations through vCenter for those operations that were transported from the VIX Client to the vSphere 5 Web Service SDK?

$
0
0

Does the vCenter Server needs to be upgraded to version 5 to invoke Guest OS operations through vCenter for those operations that were transported from the VIX Client to the vSphere 5 Web Service SDK?

 

For instance, I'm testing one of the Java sample codes included with the vSphere 5 Web Service SDK JAXWS to invoke methods such as StartProgramInGuest and CreateTemporaryFileInGuest and the sample code I'm executing is failing. The sample code has not been modified.

 

C:\VMwareSDK\VMware-vSphere-SDK-5.0.0-429209\SDK\vsphere-ws\java\JAXWS>run.bat com.vmware.guest.CreateTemporaryFile --url https://192.168.1.4:443/sdk/vim?wsdl --username xx_admin --password xx_pass --vmname xx_vm --guestusername xx_guestuser --guestpassword xx_guestpass --prefix test --suffix txt --directorypath c:\download

 

Result:

Virtual Machine xx_vm found

 

com.vmware.vim25.InvalidPropertyFaultMsg:

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

 

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct

orAccessorImpl.java:39)

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC

onstructorAccessorImpl.java:27)

        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

        at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFa

ultBuilder.java:130)

        at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMetho

dHandler.java:108)

        at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMetho

dHandler.java:78)

        at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)

        at $Proxy35.createFilter(Unknown Source)

        at com.vmware.guest.CreateTemporaryFile.waitForValues(CreateTemporaryFil

e.java:447)

        at com.vmware.guest.CreateTemporaryFile.main(CreateTemporaryFile.java:58

1)

Done.

 

 

 

I'm assuming the resolution may be in the upgrade, but I want to confirm before moving forward.

 

Thank you in advanced.

 

Jose

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

Viewing all 34639 articles
Browse latest View live


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