VMware {code} Community
cpope
VMware Employee
VMware Employee

instanceUuid from the ServiceContent AboutInfo

Hi,

I would like to get the instanceUuid that I see in the MOB from the ServiceContent but when I retrieve and look at the returned object, instanceUuid is missing. I have tried to retrieve the info again after login just in case you need to be authenticated to see that value but still don't see it.

Anyone have any ideas what I am missing?

Thanks!

Reply
0 Kudos
6 Replies
lamw
Community Manager
Community Manager

afaik, the instanceUuid within the serviceContent is only valid when connecting to vCenter. Is this question around individual ESX(i) host or vCenter?

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

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Comuunity

If you find this information useful, please award points for "correct" or "helpful".

Reply
0 Kudos
cpope
VMware Employee
VMware Employee

Thanks for the quick response William. This is vCenter 4.0 that I am connecting to. I do notice that some of the info in the docs is notated as "*Since *vSphere API 4.0" and I am not getting any of that info.

Now I am using stubs generated by someone else that said they were from the vSphere SDK. I am using C# with VS2008 and the scripts to generate the DLL files don't work for me. I haven't taken the time to fix the scripts and make them run with 2008 as this is the first issue I have had.

So...to add to my question...

Could it be I am using older DLL files? If so, does someone have DLL files that include all of the new vSphere stuff OR a build script that works with VS2008?

Thanks!

Reply
0 Kudos
lamw
Community Manager
Community Manager

Yea unfortunately I can't help in the C# space, but if you're using incorrect DLL files for the stubs, then that might be an issue. I know that this is a feature of vSphere 4.0 and you'll want to use the correct stubs. I know I can extract this via vSphere SDK for Perl connecting to vCenter and the property is null when connecting to ESX(i) host, which is expected.

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

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Comuunity

If you find this information useful, please award points for "correct" or "helpful".

Reply
0 Kudos
adcarash
Contributor
Contributor

I connect to vim web service  and get all properties and methods but there is no instanceUuid within the serviceContent. how i can connect to vcenter via any programing language?

my service url is http://192.168.3.89/sdk.  this url connect to web service. is it true or not? what is the vcenter service URL?

Reply
0 Kudos
lamw
Community Manager
Community Manager

It's under serviceContent->about->instanceUuid as shown in the vSphere API Reference Guide vSphere 5.5 Documentation Center and yes the vCenter Server API endpoint URL is correct

Reply
0 Kudos
adcarash
Contributor
Contributor

Thanks for reply

here is my code to connect

URl =  http://192.168.3.89/sdk

  Dim vc As New VMware.Vim.VimClient

  vc.Login(URL, username, password)

  dim instanceUuid as string = vc.ServiceContent.About. ....instanceUuid

' there is no instanceUuid property

my vsphere version is 5.5

but i can't get this property. because its not exist

I need this parameter to create VM Console URL like:  https://192.168.3.89:9443/vsphere-client/vmrc/vmrc.jsp?vm=urn:vmomi:VirtualMachine:" & vm.MoRef.Value & ":" &  instanceUuid


how can I do this?

Thanks


Reply
0 Kudos