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

Intermittent crashes the Vix API

$
0
0

 

 

 

 

We had been experiencing intermittent crashes the Vix API. We recently switched to launching vmrun.exe in a subprocess instead so the Vix API crashes would not kill our application. We have found that vmrun.exe also crashes intermittently. It displays a fatal error popup and hangs. It is very inconvenient since we are trying to control VM operations automatically and unattended. The crashes occur most often when we're reverting to snapshots or starting VMs. The crashes are more frequent when we launch multiple instances of vmrun.exe on the same computer at the same time, each to control a different VM.

 

 

The popup looks like this:

 

 

http://communities.vmware.com/servlet/JiveServlet/downloadImage/10476/vixcrash.png

 

 

 

 

 

Here is the full problem signature:

 

 

Problem signature:

 

 

  Problem Event Name:                      APPCRASH

  Application Name:                             vmrun.exe

  Application Version:                          1.10.1.12915

  Application Timestamp:                   4c1310f0

  Fault Module Name:                          glib-2.0.dll

  Fault Module Version:                       2.16.4.0

  Fault Module Timestamp:                48801db1

  Exception Code:                                 c0000005

  Exception Offset:                                0005a870

  OS Version:                                         6.1.7600.2.0.0.274.10

  Locale ID:                                            1033

  Additional Information 1:                  0a9e

  Additional Information 2:                  0a9e372d3b4ad19135b953a78882e789

  Additional Information 3:                  0a9e

  Additional Information 4:                  0a9e372d3b4ad19135b953a78882e789

 

 

 

 

 


Manage VMWARE by python

$
0
0

Good morning to everybody,

I'm working to write a script python to manage a virtual machine, I choose, for example, VMware. To realize this script I need vmware's API and a library, called libvirt. Anyway, at the moment I couldn't write any line of code   Who can help me?

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

Trying to use VIX coupled with BlackBerry 10 simulator

$
0
0

I've got the basics down, I am using .NET managed wrappers around VIX to boot my BlackBerry 10 emulator. However, there's no 'Guest Tools', so I'm very limited in what I can do. Basically, I need to find out when the emulator is launched and ready (was thinking to attempt to telnet, which means discovering the IP of the simulator, ), and also be able to screen capture (which requires a login, which I can't figure out how to do).

 

Any help finding the IP and screen capturing for BB10 programmatically? Thanks!

Where and what is the folder d:\build\ob\bora-xxxxx\

$
0
0

Dear Colleagues,

 

This may be a stupid question but I am unable to find a clear and straight answer anywhere.

 

Can someone tell me where I can find this following folder "d:\build\ob\bora-xxxxx\" What is it for?

 

Reason being, I'm trying to find the following file:

 

File: d:\build\ob\bora-621624\bora-vmso...\hgfssharedmem.c Line: 773

Expression: gHgfsSharedMemoryData.mutex

 

I have no idea where to look for this file and what does it do. Could someone explain this to me please?

 

I need this information in order to troubleshoot the following error. I'm not sure how to proceed.

 

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

Microsoft Visual C++ Runtime Library

 

Assertion failed!

 

Program: D:\Program Files\Foundstone\FSAssessment.exe

 

File: d:\build\ob\bora-621624\bora-vmso...\hgfssharedmem.c

Line: 773

 

Expression: gHgfsSharedMemoryData.mutex

 

For more information on how your program can cause an assertion failure, see the Visual C++ documentaion on asserts

 

(Press Retry to debug the application - JIT must be enabled)

 

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

 

Best regards,

Ian

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

What is common/ most popular and up to date VIX API for Ruby

$
0
0

I have test framework written in Ruby.

 

To automate some of the tests i would like to use Ruby library for VIX.

 

What would be the best choice of Ruby VIX API to use?

 

This is ongoing development, so it would be great if the Ruby VIX API be updated frequently.

 

Is there any Ruby VIX API comparison?

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!


Reading Environment variables problem

$
0
0

 

Hi,

 

 

I am using ReadVariable with the option VIX_GUEST_ENVIRONMENT_VARIABLE and I am getting blank values. I am logged in as the Administrator.

 

 

Note, the two environment variables I can retrieve with no problem are TEMP, and TEMP.

 

 

However, I can't retrieve variables like WINDIR, PATH, COMSPEC, and even SYSTEMDIR. I have tried to put the environment variables into section for this user in the advanced pane of my computer. Through the VIX inteface I only get blank values. I can retrieve them all on the command line within the VM with no problems

 

 

Is there a limitation of VIX?

 

 

 

 

 

Thanks,

 

 

Vinay

 

 

python vix

$
0
0

 

heloes,

 

 

nice that vix api is too powerfull now, it doesn't take much time for me, to migrate from vmware server 2.0 to esxi.

 

 

maybe somebody knows are there plans to create an official python version of vix api?

 

 

i guess it's more usable that call stuff from com interface or through ctypes from vix.dll.

 

 

connect to ESX VM from VBScript ( VIX or VmCOM) - Urgent :(

$
0
0

 

I have a ESX 3.5 Server running few VMs

 

 

I have a urgent request to write vbscripts to do switch on a machine "VM-x" remotely, copy a batch file from my local windows XP host to this VM-X and then execute it.  I have installed VIX API and VmCOM API. Btw I also have VM Workstation 6.0 on my local machine.

 

 

 

 

 

Can some one please send me a very basic VBSCRIPT code to :

 

 

1. connect to ESX

 

 

2. List the running VMS/ Switch on a VM named "VM-X"

 

 

3. Copy a file from local win xp host to this VM-X

 

 

 

 

 

I tried few things here and there but no luck :(.

 

 

Appreciate your help. Thanks.

 

 

My program crashes in VIX with: Access violation reading location

$
0
0

Hi,

 

My C# program that uses the VIX API keeps crashing. I'm trying to use VIX 1.2.6 to connect to ESXi 3.5.0.

The crash usually seems to happen after I kick off a job and while I'm waiting for it to complete with a call to IJob.Wait or IJob.WaitWithoutResults, or polling in a loop with a pause calling IJob.CheckCompletion.

 

I got the following from the debugger:

 

Unhandled exception at 0x068f58ba in MyProgram.exe: 0xC0000005: Access violation reading location 0x00000008.

 

Call stack:

>     gvmomi.dll!068f58ba()      

     http://Frames below may be incorrect and/or missing, no symbols loaded for gvmomi.dll     

     gobject-2.0.dll!03e4718c()      

     glib-2.0.dll!04b4b0d8()      

     glib-2.0.dll!04b4b44e()      

     gobject-2.0.dll!03e44f7f()      

     gobject-2.0.dll!03e47926()      

     vix.dll!11119135()      

     vix.dll!11119150()      

     vix.dll!111070ab()      

     vix.dll!111079ca()      

     vix.dll!1110394d()      

     vix.dll!1115f23f()      

     vix.dll!1115fa93()      

     vix.dll!1110198d()      

     vix.dll!11191380()      

     kernel32.dll!7628d0e9()      

     ntdll.dll!777119bb()      

     ntdll.dll!7771198e()      

 

Disassembly:

068F58AD  int         3   

068F58AE  int         3   

068F58AF  int         3   

068F58B0  push        ebp 

068F58B1  mov         ebp,esp

068F58B3  mov         eax,dword ptr

068F58B6  push        esi 

068F58B7  mov         esi,dword ptr

068F58BA  mov         ecx,dword ptr       <-- current instruction

068F58BD  push        edi 

068F58BE  mov         edi,dword ptr

068F58C1  push        edi 

068F58C2  push        ecx 

068F58C3  call        06A7B39A

068F58C8  add         esp,8

068F58CB  test        eax,eax

068F58CD  je          068F58EA

068F58CF  mov         edx,dword ptr

068F58D2  push        eax 

068F58D3  push        edx 

068F58D4  call        06A7B3BE

068F58D9  mov         eax,dword ptr

068F58DC  push        edi 

068F58DD  push        eax 

068F58DE  call        06A7B3BE

068F58E3  add         esp,10h

068F58E6  pop         edi 

068F58E7  pop         esi 

068F58E8  pop         ebp 

068F58E9  ret             

068F58EA  push        6A7D310h

068F58EF  push        1DBh

068F58F4  push        6A7D2B4h

068F58F9  push        6A7C500h

068F58FE  push        8   

068F5900  push        0   

068F5902  call        06A7B388

068F5907  add         esp,18h

068F590A  pop         edi 

068F590B  pop         esi 

068F590C  pop         ebp 

068F590D  ret             

068F590E  int         3   

068F590F  int         3   

068F5910  push        ebp 

068F5911  mov         ebp,esp

068F5913  mov         eax,dword ptr

068F5916  push        ebx 

068F5917  mov         ebx,dword ptr

068F591A  test        ebx,ebx

068F591C  push        esi 

068F591D  push        edi 

 

Also, I'm not quite sure why. Although I'm debugging my program in VS2008, when the crash occurs, I get another dialog that pops up with the crash and asks me to select a debugger. If I look through code in the debugger I originally had running, I can't find the failure or call stack. From the dialog though, if I select to start a new debugger I can get the above information.

 

 

Please, can anybody help?

 

Thanks very much,

  Scott

vmrun with ESX - Unable to connect to host. Error: The specified version was not found

$
0
0

 

I'm just getting into VMWare and ESX and trying to use vmrun on a windows 2008 box to list vms on an ESX4 server. So far working with the VMs in vCenter and vSphere has been great, but vmrum is another question all together.

 

 

I am using vmrun 1.8 with the following command line:

 

vmrun -T esx -h https://66.1.1.122/sdk -u root -p list

 

But I get "Unable to connect to host. Error: The specified version was not found" I haven't seen this anywhere on the net yet and was hoping that someone in the VIX community may have seen it before. Do I need to enable ssh? should I be able to brows to https://66.1.1.122/sdk using my web browser?

 

 

Any help you can give is much appreciated.

 

 

Thanks.

 

 

C

 

 

Minimum requirements for Running VIX Scripts (in VMWare Workstation 7.0)

$
0
0

Hi Everyone ,

I am new to VMware VIX API (in VMware Workstation7.0) . I want to Run the perl scripts that are developed using VIX . What are the minimum requisites that i should have to successfully execute the scripts. I don't need to write any VIX Scripts in perl . I just need to execute them.

I have the following setup done.

1. Installed VMware workstation 7.0

2. Extracted vix-perl.zip to Perl Installation Directory 

 

From the installation Readme I came to know that i need to have Visual Studio 2003 or higher installed to install VIX Perl API , being a normal user I don't want to use Visual studio to Install VIX Perl. I ll just want to execute VIX Perl scripts to do VM Operations

 

Is there any way that i can use to execute VIX Perl scripts with out using Visual studio (nmake) to install VIX. Can anyone please help me ?

 

Thanks,

Durai

VIX_E_HOST_USER_PERMISSIONS and VIX_E_VM_NOT_RUNNING errors on VixVM_PowerOn and VixVM_PowerOff

$
0
0

 

I'm doing stress testing of automation of spin-up and tear-down of many virtual machines on an ESX4u1 system using the vix libraries.  I've noticed the following behaviors that I was hoping someone at VmWare might be able to shed some light on.

 

 

I occasionally get a VIX_E_HOST_USER_PERMISSIONS error on VixVM_PowerOn (although the machine does actually power on successfully).

 

 

I also occasionally get a VIX_E_VM_NOT_RUNNING error on VixVM_PowerOff [hard poweroff, not graceful shutdown) (although the machine is currently powered on and running).

 

 

I've noticed that the more machines I have running concurrently, the more exacerbated the problem is.  E.g. with 5 machines running, I may get the error once every 100 power-on/power-off cycles.  With 10 machines running, I get the error once every 20 power-on/power-off cycles.  With 20 machines running I get the error once every 10 or so.

 

 

I've also noticed that the power-off errors seems to occur when there is very little time (&lt; 1 second) between the power-on and the power-off cycle.  VixVM_PowerOn has returned success, I've waited for VmWare Tools to come up, and then immediately shut it down.  This leads me to believe that there is possibly some lag time in the bookkeeping on the ESX system.

 

 

The power on error is still a mystery to me since that error doesn't make any sense... I would expect that kind of error with a VixHost_Connect(), but not with VixVM_PowerOn.

 

 

Any light to be shed by someone at VmWare or others in the user community that have seen things like this woud be greatly appreciated.

 

 

Cheers,

 

 

Pete

 

 


help with RunScriptInGuest()

$
0
0

Hi,

I'm trying to implement the function RunScriptInGuest in c#.

Here is the code:

 

public void RunScriptInGuest(string interpreter, string scriptText, int options)

{    VMWareJobCallback callback = new VMWareJobCallback();

     VMWareJob job = new VMWareJob(_handle.RunScriptInGuest(interpreter, scriptText, options, null, callback),callback);

}

 

and the code where i call it is like this:

                //Sample vbscript code copied from http://www.computerperformance.co.uk/vbscript/vbscript_file_create.htm

                //Escape characters are inserted by me.

                //The following code lies within a button_click function.

                string str = "Option Explicit\r\n";

                str += "Dim objFSO, objFSOText, objFolder, objFile\r\n";

                str += "Dim strDirectory, strFile\r\n";

                str += "strDirectory = \"C:
logs\"\r\n";

                str += "strFile = \"
Summer.txt\"\r\n";

                str += "Set objFSO = CreateObject(\"Scripting.FileSystemObject\")\r\n";

                str += "Set objFolder = objFSO.CreateFolder(strDirectory)\r\n";

                str += "Set objFile = objFSO.CreateTextFile(strDirectory & strFile)\r\n";

                str += "Wscript.Echo \"Just created \" & strDirectory & strFile\r\n";

                str += "Wscript.Quit\r\n";

                

                vmachine.RunScriptInGuest("C:
Windows
system32
wscript.exe", str, 0);

                textBox1.Text += ("Successful! \r\n");

 

Now when i run this code, no error is thrown and "Successful!" appears in the textBox1.

However the file summer.txt is not created in the virtual machine.

Can someone pls point out where i am going wrong??

 

Also, in C#, for the textbox i need to put "\r\n" for a clean new line as putting only "\n" yields an extra box character.

So for the code, for every line what exactly should be put?? \r or \n or \r\n??

 

Kindly help, thanks.

-Shrikant

Problem with Vix API library?

$
0
0

Hi,I have started a C++ programusing Vix Api. I compiled that code on Windows With Wrapper Library VixAllProducts.lib. Im using Visual Studio2003 for this. When i compilethe code its giving lot of link errors</span> like

-


VixAllProducts.lib(vixWrapper.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored

VixAllProducts.lib(log.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored

VixAllProducts.lib(vixLibLoad.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored

VixAllProducts.lib(unicode</span>SimpleTypes.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored

VixAllProducts.lib(syncRecMutex.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored

VixAllProducts.lib(configUL.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored

VixAllProducts.lib(productState.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored

VixAllProducts.lib(utilMem.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored

VixAllProducts.lib(msg.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored

VixAllProducts.lib(win32util_misc.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored

VixAllProducts.lib(util.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored

VixAllProducts.lib(stubs.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored

VixAllProducts.lib(utilWin32.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored

VixAllProducts.lib(str.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored

VixAllProducts.lib(codeset.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored

VixAllProducts.lib(err.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored

VixAllProducts.lib(posixWin32.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored

VixAllProducts.lib(ustr_cnv.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored

VixAllProducts.lib(ustring.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored

VixAllProducts.lib(cstring.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored

VixAllProducts.lib(ucnv_io.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored

VixAllProducts.lib(ucnvmbcs.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored

VixAllProducts.lib(ucnv_cb.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored

VixAllProducts.lib(ustrfmt.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored

VixAllProducts.lib(wmiInfo.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored

VixAllProducts.lib(sha1.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored

VixAllProducts.lib(fileLockPrimitive.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored

-


 

I refer the article http://www.vmware.com/support/developer/vix-api/VIX-1.6.0-ReleaseNotes.html

 

they

specified  "Cannot build VIX C programs with Visual Studio 2003. VIX

programs build with Visual Studio 2005 SP1, but stubs for five

functions (fstat, wstat, timezone, tzname, ftol2_sse) are missing for

Visual Studio 2003. For VIX 1.6, Visual C release 8.0.50727.762 or

later is required. "

 

Is there any way to resolve this problem. This is very urgent.

 

NOTE:

I dont want to compile this code with the option : without wrapping

library. Because it needs all the dll must be available in executable

location. I dont want to do that. Please dont suggest that

 

Can anyone please tell me the solution to this problem or is there any other way to use the library in  visual studio 2003.

 

Thanks in Advance

CopyFileFromHostToGuest - INTERNAL ERROR: A file was not found

$
0
0

Hey, I am trying to Copy files into a VMWare image hosted in ESX using VIX (C# Wrapper around the COM API), but I can't quite get it right.

 

Conceptual Something like:

 

IVMWareVirtualHost host = new VMWareVirtualHost();

host.ConnectToVMWareVIServer("172.18.19.69", "ESX Admin User", "ESX Admin Password");

 

IVMWareVirtualMachine virtualMachine = host.Open("[Storage1] Image/Image.vmx");

virtualMachine.PowerOn();

virtualMachine.WaitForToolsInGuest();

virtualMachine.LoginInGuest("Administrator", "ILoveOMSIS!1234");

virtualMachine.CopyFileFromHostToGuest("C:
temp
File.txt", "C:
package
File.txt");

 

And it fails at the last line with "INTERNAL ERROR: A file was not found"...

 

The File exists Locally, Casing is corrent and the "C:\package" folder exists in the Guest.

 

Host System: ESX 4.0

Guest System: Windows XP

Client System: Windows 2003 server

 

(Client System refers to the system where I try tu run the commands and vmrun.exe

 

After trying to find some help ect on the web, I went to "vmrun" and tested a command that used to work with the "VMWare Server"

 

vmrun -T server -h https://localhost:8333/sdk -u "Local Admin User" -p "Local Admin Password" -gu "Guest Admin account" -gp "Guest Admin password" CopyFileFromHostToGuest "[Standard] Image/Image.vmx" "C:\temp\file.txt" "C:\package\file.txt"

 

changed to:

 

vmrun -T server -h https://172.18.19.69/sdk -u "ESX Admin User" -p "ESX Admin Password" -gu "Guest Admin account" -gp "Guest Admin password" CopyFileFromHostToGuest "[Storage1] Image/Image.vmx" "C:\temp\file.txt" "C:\package\file.txt"

 

Both Works just fine...

 

So what am I'm doing wrong in the code?

VMX file path format and read permission for the file

$
0
0

The problem we currently have is connecting to VMs using the VIX API.

 

The API has a method VMOpen :

 

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

$vmxFilePathName);

 

This function opens a virtual machine on the host that is identified by the hostHandle parameter and returns a context to that machine as a virtual machine handle.

 

We have the hostHandle. But, I think we are sending a wrong path name for the vmx file.

 

The format we currently use is

 

my $vmxFilePathName = "/vmfs/volumes/datastore_name/lab_manager_name/folder_name/somefile.vmx"; 

 

 

I have read permissions on the datastore. But, the error I am getting is 3014, Insufficient privileges.

 

Any help in this regard would be appreciated.

 

 

Thanks,

 

Sri.

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

 

 

Viewing all 34639 articles
Browse latest View live


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