Multy-Thread functionality

Feb 10, 2012 at 4:24 AM
Edited Feb 10, 2012 at 4:25 AM

Hello,

  Thank you a lot for the library. I have a little question. I wanted to use the functionality in multy-thread mode. I use VMWareLib library. One thread is a manager and a different threads are VM controls. I created VMWareVirtualHost object and connected to the host (ESX) in the manager and give the object to a different threads and they Open vm (VMWareVirtualHost.Open(..)) (for different thread I open a different object, a different vm) and working with snapshots and so on. But ... I got exception ...

 Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
Stack:
at Interop.VixCOM.IVixHandle.GetProperties(System.Object, System.Object ByRef)
at Vestris.VMWareLib.VMWareVixHandle`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].GetProperties(System.Object[])
at Vestris.VMWareLib.VMWareVixHandle`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].GetProperty[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](Int32)
at Vestris.VMWareLib.VMWareSnapshot.get_DisplayName()
at ........

 

Thanks ... I hope that you could help me.

Coordinator
Feb 10, 2012 at 11:03 AM

You need to create a virtual host object per thread. If you want some code examples, http://remoteinstall.codeplex.com/ is using VMWareTasks in an MT environment.

Feb 10, 2012 at 11:21 AM
Edited Feb 10, 2012 at 11:22 AM

I checked it. For each thread I create VMWareVirtualHost object but ... I found a different trouble ... some threads was finished without messages .... I use 1.6 version of VIX.

Coordinator
Feb 10, 2012 at 11:24 AM

It's not going to work with VixCOM 1.6.x. That's known to have a slew of bugs that crash VixCOM in MT scenarios.

Feb 10, 2012 at 11:30 AM

One moment, please ... I'll check with 1.11

Feb 10, 2012 at 11:33 AM
Edited Feb 10, 2012 at 11:35 AM

:-(( The message appear: This operation is not supported with the current license :-(

Coordinator
Feb 10, 2012 at 11:36 AM

Yes, VixCOM 1.7 and newer require a license on each ESX server. That's why I no longer use VMWare. 1.6 was the last version that worked without, but it has all these problems.

Feb 10, 2012 at 11:41 AM

And ... Can you give me advice, please?

Coordinator
Feb 10, 2012 at 11:44 AM

Buy a license or give up the MT implementation.

Feb 10, 2012 at 12:25 PM

Well .... How about using SDK without VIX library?

Coordinator
Feb 10, 2012 at 12:28 PM

If you can port VMWareTasks on top of the C VIX library instead of VixCOM, that would be amazing.

Feb 10, 2012 at 12:36 PM
Edited Feb 10, 2012 at 4:20 PM

I was thinking about a different way ... I mean SDK that was described in "vsphere-ws\dotnet\cs\" or ... there are the same limitations on the library ... I mean license and so on ...

 

Do you mean that I need to wrap C VIX library?

Feb 13, 2012 at 10:55 AM

You wrote:

Yes, VixCOM 1.7 and newer require a license on each ESX server. That's why I no longer use VMWare

 

Well ... Could you give me advice, please? You wrote that you no longer use VMWare ... What kind of product do you use?

Coordinator
Feb 13, 2012 at 3:42 PM

Let me backup a bit.

The company I worked for when I developed VMWareTasks is still using VMWare and they bought ESX licences. They use it via RemoteInstaller (http://remoteinstall.codeplex.com/) with great success. It's definitely worth the money for their purposes.

If you're developing something from scratch that needs virtual machine automation, then the answer is really "it depends". There're lots of alternatives, VirtualBox on the desktop, EC2 on AWS, Heroku for web apps, etc., etc.

What are you trying to accomplish?

Feb 13, 2012 at 3:55 PM

I need to create manager that will manage a virtual PC hosted in VMWare (ESX). I'm investigating VIX, sdk based on web service and so on.

Coordinator
Feb 13, 2012 at 5:26 PM

So you don't really have any options. If you want to manipulate Virtual Machines in ESXi (power on, logon, etc.), get licenses.