VMware

This Question is Answered

1 "correct" answer available (10 pts) 1 "helpful" answer available (6 pts)
2 Replies Last post: Feb 26, 2009 6:49 AM by dmitrif  

reliable way to identify added or removed virtual hardware posted: Feb 25, 2009 8:57 AM

Click to view dmitrif's profile Enthusiast 71 posts since
May 13, 2008
Hi all.

I'm struggling to find a reliable way to identify an event of adding or removing virtual hardware.

I would expect I would see PropertyChange.op assigned to PropertyChangeOp.add or PropertyChangeOp.remove/indirectRemove in such situation, but it does not happen.

And I suppose I cannot use ObjectUpdate.kind as a virtual device is not a managed object.

Reacting to VmReconfiguredEvent will probably be my next solution, I'm wondering if there is something a little bit simpler.

Would anybody have any suggestions please?

Thank you in advance.

P.S. I use C# VI SDK to communicate with VC and ESX, my service is written with .NET 3.5, but I don't believe it is relevant.
Click to view Steve Jin's profile Expert 388 posts since
Jun 4, 2007

From what you wrote I guess you used PropertyCollector.waitForUpdate() to monitor the config.hardware.device. Am I right?

I think you are on the right track considering VmReconfiguredEvent.

Steve JIN, VMware Engineering
Creator of VMware Infrastructure Java API. VI Java API 2.0 --- 15 times faster than AXIS in loading, 4+ faster in deserialization; only 1/4 of the size required by AXIS. More importantly, the freedom to redistribute your applications. (Download, Samples, DocWiki, RSS Feed)
Get Connected with Other Developers in the Community?

Developer Social Media

Communities