Quantcast
Channel: VMware Communities : Discussion List - Virtual Disk Development Kit
Viewing all 2039 articles
Browse latest View live

PowerOn() doesn't work if remote Windows sessions are open

$
0
0

Dear Community Members,

    

I would like to get support regarding VMWare Workstation. We are using the VMWare Workstation 9.0.1 (9.0.1 build-894247) to run tests directly on TFS build agents.

    

It means that our Team Foundation Server 2010 customized workflow executes a custom tool (as a separate process via Process.Invoke activity) that internally uses the VIX API (COM InterOp) to create, to fill and to run interactive tests on
virtual machines (8-24 VMs are going to be started parallel depending on the current build agent's performance).

The application itself is a console app written in C# (.NET Framework 4.0).

 

The virtual machines are created as linked clones in case of every new triggered build.    

The whole build process is running as a Windows service in the name of a build service account with Power User privileges.

The other possible solution “Running the build service host as an interactive process” supported by TFS build service on build agents is not used.

 

Everything works fine, if there is no open user session on the given build agent. But if accounts are logged in (remotely disconnected sessions), then the VIX-API call “IVM2.PowerOn()” throws an exception.

    

Date:
16.07.2013 13:16:57 368    VM_1 Error: Node failed, exception
received:*****.XXX.TestController.VMWare.VmWareException: There was an error in communication

at *****.XXX.TestController.VMWare.VmWareInterop.Check(UInt64 errCode)

at *****.XXX.TestController.VMWare.VmWareVirtualMachine.PowerOn(Int32 powerOnOptions, Int32 timeoutInSeconds)

at *****.XXX.TestController.BusinessLogic.VMNode.Initialize()

at *****.XXX.TestController.BusinessLogic.VMNode.Execute()

   

Based on the support site (http://www.vmware.com/support/developer/vix-api/vix16_reference/errors/errors.html) of VMWare, this error is as follows:

 

14010 – VIX_E_HOST_TCP_SOCKET_ERROR There was an error in communication.

    

Has anyone an idea why remotely disconnected, but open user sessions cause such a strange behavior at all?

 

It would be very important for us, because our build farm is very huge and for maintenance purposes it is not acceptable, if remote sessions are not allowed at all………

 

Thanks in advance!

 

Best regards,

József Vadkerti


VMware-VIX versions for Gentoo Linux

$
0
0

While installing VMware Player from the Gentoo Linux repositories, I was advised also to download directly from VMware, specifically, "VMware-VIX-1.11.4-744019.i386.bundle". I was not able to find this specific version.    However, I did find the one before it and the one after it. someone swore to me that this unique version, and only this one, had to be used for my purpose. Now risking life and limb here, I have to ask, was such a version ever made, and could it be made available somehow? Thanks.


Cannot execute VIX API command on a Powered On Virtual Machine - vCenter

$
0
0

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

 

The setup is a vCenter server with a number of esx hosts.  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 "Cannot open VM: [datastore] VMname/vmname.vmx, There was an error in communication"

 

When executing the vmrun 'start' command from a command prompt, the command does start the Virtual Machine, but it does not return control immediately.  Instead it hangs for a few minutes before returning with the above error.  In other words it appears that as soon as a Virtual Machine is powered on, the vmrun command cannot communicate with the guest VM.  When powered off, I am able to run many vmrun commands such as revertToSnapshot, snapshot, etc.

 

I tried to execute the vmrun command against the specific esx host and this was successful.  Unfortunately, this is not a great option as the Virtual Machines could reside on any number of esx hosts.

 

Has anyone experienced this?  I'm hoping for a solution other than placing groups of vm's that I need to control via VIX on a particular esx host.

 

Thanks,

 

Joe Yankel

VixJob_Wait or Vix_GetProperties gives 0 for handle

$
0
0

Hi,

 

Is anyone else experiencing troubles on Windows with VIX version 1.12.2-1031769 after VixHost_Connect when trying to get VIX_PROPERTY_JOB_RESULT_HANDLE?

I mean both:

 

Vix_GetProperties(jobHandle,

  VIX_PROPERTY_JOB_RESULT_HANDLE,

  &hostHandle,

  VIX_PROPERTY_NONE);

 

and

 

VixJob_Wait(jobHandle,

VIX_PROPERTY_JOB_RESULT_HANDLE,

&hostHandle,

VIX_PROPERTY_NONE);

 

are always returning 0 for hostHandle.

 

It works fine with earier VIX APIs (1.11.x) and it works fine on Linux (even with 1.12.2)

 

Thanks and BR

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.

VIX 1.13 standalone download/installer

$
0
0

Hi,

 

Can anyone tell me where the download for the latest VIX 1.13 (Workstation 10, Player 6) standalone installer is?  It is not listed on the VMware Player 6.0 downloads.

 

Regards,

 

James

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

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

 

 


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!

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.

VMWare API: Create a Web for see my VMMachines status,info...

$
0
0

Hi all,

 

I'm new in the VMWARE API World. I wish to create a web that let users check their VMMachine Info, status and also Reboot,Start or Shutdown.

 

I've been looking for some info but I'm becoming crazy because the official documentation is from 2004 and in Perl Language. I wish use PHP or Ptyhon if can be possible.

 

Anybody can help me? I want to know how to connect to my VMWare Host and check it out the information.

 

What language I have to use? How can i find information about connect and show info?

 

Lots of 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

API for Get-template?.

$
0
0

Hello All,

I am trying to find VMware template API command, what we use to get the templates from the vcenter using get-template command in the power cli method.

 

IS anybody know, is any handy guide which provide power cli command and API reference.

 

Regards,

- Mr.Y

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!

Get network speed from guest system

$
0
0

subj...

 

 

Is there anyway to get the network adapter speed by using VMware workstation API?

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?

VIX API 1.11.0 / 1.12.0 vmrun.exe Crashes

Question about VMCI

$
0
0

 

Is there a forum around for VMCI? 

 

 

I'm trying to test out vm to vm communication using vmci sockets on windows guests.

 

 

The Programming Guide doesn't mention much about the vsocklib.dll provided with vmware tools.  It shows a diagram of a Windows app using vsocklib.dll to talk to the vmci driver, but I'm unsure of how to use it.  Is there a typelib for it?  Should the vmci_sockets.h list the exports from it? 

 

 

Thanks for pointing me in the right direction.

 

 

Jeff

 

 

Create Vmci Socket in c#

$
0
0

Hello,

I want to create a socket between host and guest in C#...

I have a little problem.. I not find the dll that i need to use

 

Can someone help?

I dont have files in C:\ProgramFiles\CommonFiles\vmware...

My only file is Vmci_Sockets.h

 

where can i find the dll??

 

Thank you!!

PowerON VM from remote via PSEXEC and API doesn't work

$
0
0

Frame:

VMware Workstation 10.0

VS-Studio 2012

.NET 4.0

Windows 7 64bit

Vestris.VMwareLib.Dll [version 1.7] <-- wrapper for VIX API

Installed VMware-VIX-1.13.1-1379776.exe

-----------------------------------------------------------------------------------------------------------------------

 

I have a small C#-program to "shutdown" and "poweron" VM's. If I start my console-pgm with parameters from local in a BAT-file, all works fine.

 

Now i tried to start my pgm from a remote pc via psexec. The poweroff option works fine, the poweron option fails with the following error:

 

Failed to power on virtual machine: powerOnOption=512 timeoutInSeconds=120

 

Does anyone have an idea why?

 

psexec command> psexec \\xxx.xxx.xxx.xxx -u "{domain}\{user}" -p "{password}"  -s "D:\Programme\VMoperations\VMstart_XXNNV.bat

 

ADDON {05.03.2014 15:59}: I  tried it with PAEXEC and REEXEC, they failed too. And I changed my BATCH-file to call the VMrun.exe, but failed too. I think, it's a bug of VMware ?!?!?!

 

----------------------------------------------------------------------------------------------------------------------

 

BAT-File VMstart_XXNNV.bat:

SET fwpath="D:\Programme\VMoperations"

%fwpath%\VMoperations.exe -location:{vmpath} -vmname:XXNNV -o:poweron

----------------------------------------------------------------------------------------------------------------------

 

C# source VMoperations.exe:

reference to Vestris.VMWareLIb

refernce to Interop.VixCOM

--------------------------------------------------------------------------------------------


using Vestris.VMWareLib;  <-- version 1.7

...

 

private static void VMwork(string location, string vmName, string operationType)

        {

            try

            {

                using (VMWareVirtualHost virtualHost = new VMWareVirtualHost())

                {

                    virtualHost.ConnectToVMWareWorkstation();

                    vmxName = location + vmName + @"\" + vmName + @".vmx";

                    using (VMWareVirtualMachine virtualMachine = virtualHost.Open(vmxName))

                    {

                        vmPowerState = virtualMachine.PowerState;

 

                        switch (operationType)

                        {

                            case "shutdown":

                                if (vmPowerState == 1096)

                                {

                                    virtualMachine.ShutdownGuest();

                                }

                                break;

                            case "poweroff":

                                if (vmPowerState == 1096)

                                {

                                    virtualMachine.PowerOff();

                                }

                                break;

                            case "poweron":

                                if (vmPowerState == 2)

                                {

                                    virtualMachine.PowerOn(120);

                                }

                                break;

                        }

                        virtualMachine.Dispose();

                    }

                    virtualHost.Disconnect();

                    virtualHost.Dispose();

                }

                retCode = 0;

            }

            catch (Exception ex)

            {

                retCode = 1;

            }

        }

 

I tried everything, read dozends of internet pages, but found no info. Ever user on local and remote pc have full admin rights.

 

Best regards Hipp1010

Viewing all 2039 articles
Browse latest View live


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