Quantcast
Channel: VMware Communities : Discussion List - vSphere Management SDK
Viewing all 1375 articles
Browse latest View live

Building and Running Samples (vSphere Web Services SDK 6.0 and JDK 8 (1.8.0_x) and make code

$
0
0


What are the necessary actions in order to build and run vSphere Management SDK 6.0 samples using Java JDK 8 (1.8.0_x)

 


I have followed the Developer's setup guide. Aparently samples and stubs are correctly generated but when running one sample, errors are displayed.


run.bat com.vmware.general.SimpleClient --url https://IP_addr/sdk  --username user --password pwd --ignorecert ignorecert



WARNING: Java is now set to trust all SSL certificates.
-- VMware samples in Java --
java.security.cert.CertificateException: Subject class type invalid.
        at sun.security.x509.X509CertInfo.setSubject(X509CertInfo.java:888)
        at sun.security.x509.X509CertInfo.set(X509CertInfo.java:415)


Thanks


 


Issue while generating c++ code using STSService.wsdl (SSO)

$
0
0

Hi,

 

I am facing issues while generating code using c++ with STSService.wsdl

 

e:\SOAPGENERATION>E:\SOAPGENERATION\gsoap-2.8\gsoap\bin\win32\wsdl2h.exe -t E:\SOAPGENERATION\typemap_vmwareapi.dat  .\w

sdl\ssoclient\wsdl\profiled-saml-schema-assertion-2.0.xsd  .\wsdl\ssoclient\wsdl\profiled-saml-schema-assertion-2.0-exte

nsions.xsd  .\wsdl\ssoclient\wsdl\profiled-saml-schema-assertion-2.0-types.xsd  .\wsdl\ssoclient\wsdl\profiled-sstc-saml

-delegation.xsd  .\wsdl\ssoclient\wsdl\profiled-wsse-header.xsd .\wsdl\ssoclient\wsdl\profiled-wss-wssecurity-utility-1.

0.xsd .\wsdl\ssoclient\wsdl\profiled-ws-trust.xsd .\wsdl\ssoclient\wsdl\ws-addr.xsd .\wsdl\ssoclient\wsdl\ws-trust-1.4-e

xtensions.xsd .\wsdl\ssoclient\wsdl\xmldsig-core-schema.xsd .\wsdl\ssoclient\wsdl\STSService.wsdl  -o .\wsdlout\ssoService.h

 

**  The gSOAP WSDL/Schema processor for C and C++, wsdl2h release 2.8.0

**  Copyright (C) 2000-2010 Robert van Engelen, Genivia Inc.

**  All Rights Reserved. This product is provided "as is", without any warranty.

**  The wsdl2h tool is released under one of the following two licenses:

**  GPL or the commercial license by Genivia Inc. Use option -l for details.

 

Saving .\wsdlout\ssoService.h

 

Reading type definitions from type map file 'E:\SOAPGENERATION\typemap_vmwareapi.dat'

 

Reading file '.\wsdl\ssoclient\wsdl\profiled-saml-schema-assertion-2.0.xsd'...

Done reading '.\wsdl\ssoclient\wsdl\profiled-saml-schema-assertion-2.0.xsd'

 

Reading file '.\wsdl\ssoclient\wsdl\profiled-saml-schema-assertion-2.0-extensions.xsd'...

Done reading '.\wsdl\ssoclient\wsdl\profiled-saml-schema-assertion-2.0-extensions.xsd'

 

Reading file '.\wsdl\ssoclient\wsdl\profiled-saml-schema-assertion-2.0-types.xsd'...

Done reading '.\wsdl\ssoclient\wsdl\profiled-saml-schema-assertion-2.0-types.xsd'

 

Reading file '.\wsdl\ssoclient\wsdl\profiled-sstc-saml-delegation.xsd'...

Done reading '.\wsdl\ssoclient\wsdl\profiled-sstc-saml-delegation.xsd'

 

Reading file '.\wsdl\ssoclient\wsdl\profiled-wsse-header.xsd'...

Done reading '.\wsdl\ssoclient\wsdl\profiled-wsse-header.xsd'

 

Reading file '.\wsdl\ssoclient\wsdl\profiled-wss-wssecurity-utility-1.0.xsd'...

Done reading '.\wsdl\ssoclient\wsdl\profiled-wss-wssecurity-utility-1.0.xsd'

 

Reading file '.\wsdl\ssoclient\wsdl\profiled-ws-trust.xsd'...

Done reading '.\wsdl\ssoclient\wsdl\profiled-ws-trust.xsd'

 

Reading file '.\wsdl\ssoclient\wsdl\ws-addr.xsd'...

Done reading '.\wsdl\ssoclient\wsdl\ws-addr.xsd'

 

Reading file '.\wsdl\ssoclient\wsdl\ws-trust-1.4-extensions.xsd'...

Done reading '.\wsdl\ssoclient\wsdl\ws-trust-1.4-extensions.xsd'

 

Reading file '.\wsdl\ssoclient\wsdl\xmldsig-core-schema.xsd'...

Done reading '.\wsdl\ssoclient\wsdl\xmldsig-core-schema.xsd'

 

Reading file '.\wsdl\ssoclient\wsdl\STSService.wsdl'...

Warning: unexpected element 'jaxws:bindings' at level 3 is skipped (safe to ignore)

Done reading '.\wsdl\ssoclient\wsdl\STSService.wsdl'

PolicyReference URI="#IssueRequestPolicy" not found

PolicyReference URI="#RenewRequestPolicy" not found

PolicyReference URI="#STSSecPolicy" not found

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

 

If I check STSService.wsdl, it shows following lines:

   <jaxws:bindings xmlns:jaxws="http://java.sun.com/xml/ns/jaxws">
  

 

<jaxws:provider>false</jaxws:provider>

   </jaxws:bindings>
 

 

Because of this we are getting warnings: Warning: unexpected element 'jaxws:bindings' at level 3 is skipped (safe to ignore)

 

And it is not able to find few definitions like IssueRequestPolicy.

 

How to generate code using wsdl2h.exe to get ride of these errors?

How to use pysphere to edit NIC( VirtualE1000 ) to toggle between plugged and unplugged state

$
0
0

What I am trying to accomplish is to connect to an existing VMware VM and then access the virtual eth connections. Once a particular NIC is found, I want to toggle its state from UNPLUGGED to PLUGGED and vice versa.

To accomplish that I use the following code to create a new eth connection to play with:

#Invoke ReconfigVM_Task
request
= VI.ReconfigVM_TaskRequestMsg()
_this
= request.new__this(vm._mor)
_this
.set_attribute_type(vm._mor.get_attribute_type())
request
.set_element__this(_this)
spec
= request.new_spec()

#Add a NIC.
dev_change
= spec.new_deviceChange()
dev_change
.set_element_operation("add")
nic_ctlr
= VI.ns0.VirtualE1000_Def("nic_ctlr").pyclass()
nic_backing
= VI.ns0.VirtualEthernetCardNetworkBackingInfo_Def("nic_backing").pyclass()
nic_backing
.set_element_deviceName(label)
nic_ctlr
.set_element_addressType("generated")
nic_ctlr
.set_element_backing(nic_backing)
nic_ctlr
.set_element_key(4)
dev_change
.set_element_device(nic_ctlr)

spec
.set_element_deviceChange([dev_change])
request
.set_element_spec(spec)
ret
= hostcon._proxy.ReconfigVM_Task(request)._returnval

#Wait for the task to finish
task
=VITask(ret, hostcon)
status
= task.wait_for_state([task.STATE_SUCCESS, task.STATE_ERROR])
if status == task.STATE_SUCCESS:
  
print"VM %s successfully reconfigured"% vm
elif status == task.STATE_ERROR:
  
print"Error reconfiguring vm: %s"% vm, task.get_error_message()


As a result of the above code, I see the following gets created:

eth3  :1Gb/s TP UNPLUGGED|UP  --None--   -NoIPv6-

But now I am stuck at trying to change this UNPLUGGED field. Can this even be changed at the VM level? or this part needs to be changed at virtual switch level? Asking because I found online that the "PLUGGED/UNPLUGGED" information comes from the virtual switch entry? Is that true?

vsphere SDK createScheduledTask problems

$
0
0

Hi,

 

I am trying to use vsphere sdk 6 to create scheduled task to unmap datastore, here is the code:

 

sc: ServiceContent

hostStorageSystem: HostStorageSystem

vmfsUuid: String (the vmfsUuid of a specific datastore)

 

ManagedObjectReference scheduledTaskManager = sc.getScheduledTaskManager();  // get the scheduledTaskManager

 

//set methodAction
MethodAction methodAction = new MethodAction();

methodAction.setName("UnmapVmfsVolumeEx_Task");

List<MethodActionArgument> arguments = methodAction.getArgument();

MethodActionArgument arg0 = new MethodActionArgument();

MethodActionArgument arg1 = new MethodActionArgument();

List<String> uuidList = new ArrayList<String>();    

uuidList.add(vmfsUuid);

arg0.setValue(uuidList);

arguments.add(arg0);

 

//set taskScheduler
OnceTaskScheduler taskScheduler = new OnceTaskScheduler();

 

//set scheduledTaskSpec

ScheduledTaskSpec taskSpec = new ScheduledTaskInfo();

taskSpec.setName("ScheduledUnmapTask");

taskSpec.setDescription("scheduled task to unmap a datastore");

taskSpec.setEnabled(true);

taskSpec.setAction(methodAction);

taskSpec.setScheduler(taskScheduler);

  _vimPort.createObjectScheduledTask(scheduledTaskManager, hostStorageSystem, taskSpec);

 

 

for the unmapVmfsVolumEx_task, I need to pass the a list containing vmfsuuids. But there are problem with arraylist type.

 

Anyone can help to solve the problem. Not sure whether there are other problems of the above code.

How to Get Running Task ID Through Vsphere Webservice

$
0
0

I want to get the running task ID in vcenter server. Because sometimes we need to cancel this task due to some reasons. I know I can use PowerCLI get-task to get this.

Can I get the Running task ID use Webservice? Or other Method, we need to integrate with other system.

vsphere sdk 6 : problem of creating scheduled task to unmap datastore.

$
0
0

Hi,

 

I am trying to use vsphere sdk 6 to create scheduled task to unmap datastore, here is the code:

 

sc: ServiceContent

hostStorageSystem: HostStorageSystem

vmfsUuid: String (the vmfsUuid of a specific datastore)

 

ManagedObjectReference scheduledTaskManager = sc.getScheduledTaskManager();  // get the scheduledTaskManager

 

//set methodAction
MethodAction methodAction = new MethodAction();

methodAction.setName("UnmapVmfsVolumeEx_Task");

List<MethodActionArgument> arguments = methodAction.getArgument();

MethodActionArgument arg0 = new MethodActionArgument();

MethodActionArgument arg1 = new MethodActionArgument();

List<String> uuidList = new ArrayList<String>();   

uuidList.add(vmfsUuid);

arg0.setValue(uuidList);

arguments.add(arg0);

 

//set taskScheduler
OnceTaskScheduler taskScheduler = new OnceTaskScheduler();

 

//set scheduledTaskSpec

ScheduledTaskSpec taskSpec = new ScheduledTaskInfo();

taskSpec.setName("ScheduledUnmapTask");

taskSpec.setDescription("scheduled task to unmap a datastore");

taskSpec.setEnabled(true);

taskSpec.setAction(methodAction);

taskSpec.setScheduler(taskScheduler);

  _vimPort.createObjectScheduledTask(scheduledTaskManager, hostStorageSystem, taskSpec);

 

 

for the unmapVmfsVolumEx_task, I need to pass the a list containing vmfsuuids. But there are problem with arraylist type.

 

Anyone can help to solve the problem. Not sure whether there are other problems of the above code.

unmap task failed: Cannot complete the operation due to an incorrect request to the server

$
0
0

Hi,

I implemented the unmap task through vSphere web client sdk 6 api method: UnmapVmfsVolumeEx_task(HostStorageSystem, VmfsUuid).

But when I run this task on vsphere web client side, this task failed:

 

TaskName: host.StorageSystem.unmapVmfsVolumeEx.label

TaskStatus: Cannot complete the operation due to an incorrect request to the server

 

I try to get the task info and the esxi log files, however no more useful information found.

 

What will be the possible reason for this failure? Where could I get more useful information about this failed task?

 

 

 

and for following:

 

Previously I tested with ESXI 5.5 and the unmap task failed.Then I tried to test with ESXI 6.0 and it worked.

So vsphere web client sdk 6 Api unmap method only support ESXI 6?

Help Setting up Development Environment for C#

$
0
0

Greetings, 

 

I am very new to using C# so maybe this is more of a simple matter of me missing something simple but I am trying to use the VMWare VSphere SDK for 5.5.  I am following the following article to set up my environment:

 

vSphere 5.5 Documentation Center

 

I am having a hard time with step 3 "generate the VimService.cs file"

 

The error that I am getting from wsewsdl3 is as follows:

 

Error:  Invalid URL, or File 'and' not found.

 

At first, I thought this was maybe an issue with the environment variables that I set but I did a cd to each variable and they are valid.  I also ensure that both the vim.wsdl and the VimService.wsdl are both located at the paths specified.  I am not sure where the command is getting the "'and'" from.  I did a direct copy and paste out of the documentation for the command to ensure that I did not have any typos when I manually typed in the command.

 

 

Operating System:  Windows 7

Visual Studio 2013 Professional


create a task vsphere sdk

$
0
0

Hi all ,

We are working on the vSphere plugin and currently got stuck with creating a tasks in the vSphere webclients recent tasks.

we need to add a task to the recent tasks tab for any operation we do on the plugin we are developing .

My code looks like this :

    UserSession userSession = _userSessionService.getUserSession();
        ServerInfo[] sinfo = userSession.serversInfo;
        String sessionCookie = sinfo[0].sessionCookie;
        String serviceUrl = sinfo[0].serviceUrl;
        ServiceContent serviceContent = getServiceContent(sinfo[0].serviceGuid);
       
        ManagedObjectReference extensionReference = serviceContent.getExtensionManager(); 
         _taskMgrReference = serviceContent.getTaskManager();
         _vimPort.createTask(extensionReference, _taskMgrReference, "Rakesh", "Bandari", true, "Administrator", "TestFault");

    UserSession userSession = _userSessionService.getUserSession();
    ServerInfo[] sinfo = userSession.serversInfo;
    String sessionCookie = sinfo[0].sessionCookie;
    String serviceUrl = sinfo[0].serviceUrl;
    ServiceContent serviceContent = getServiceContent(sinfo[0].serviceGuid);
       
    ManagedObjectReference extensionReference = serviceContent.getExtensionManager(); 
    _taskMgrReference = serviceContent.getTaskManager();
   _vimPort.createTask(extensionReference,_taskMgrReference,"Rakesh","Bandari",true,"Administrator","TestFault");

 

this code doesn't work for me .Can some one please let me know how can i create a cutom task in the vPsphere plugin .

 

Thanks,

RakeshBandari

Obtaining SAML Token via User Creds Breaks with 5.5.3

$
0
0
I am using user credentials to obtain a SAML token from the SSO server.  After we upgraded to 5.5.3, that no longer works.  Anyone have an idea what changed?

How to get HostUnresolvedVmfsResignatureSpec?

$
0
0

Hi, 

I need to resignature a copy datastore in our environment. 

And I reference below page to implement it

http://pubs.vmware.com/vsphere-60/index.jsp#com.vmware.wssdk.pg.doc/PG_Storage.10.9.html

When I use "HostDatastoreSystem.ResignatureUnresolvedVmfsVolume_Task" to resigninature, it's required hoststorage moref and HostUnresolvedVmfsResignatureSpec.

but i don't know how to get the spec what i need.

How can I get "HostUnresolvedVmfsResignatureSpec"? it doesn't belong to any return..

Copying a large file to the guest causes the virtual machine to hang and eventually crash with error "CoreDump error line 2160, error Cannot allocate memory" as described in KB2137310

$
0
0

VMware vCenter Server 6.0U1 (6.0.0.3018523)

VMware ESXi Server 6.0U2 (6.0.0.3620759)

Guest OS: Windows Server 2012 R2

VMware Tools: 10.0.6.3560309

 

Trying to copy a large file to the guest causes the virtual machine to hang and eventually crash with error "CoreDump error line 2160, error Cannot allocate memory" as described in KB2137310

 

The file I'm trying to copy to the guest is Windows8.1-KB2919355-x64.msu (690.8 MB) which can be downloaded here:

Download Windows 8.1 Update for x64-based Systems (KB2919355) from Official Microsoft Download Center

 

I'm able to reproduce the issue with the attached code sample written in C# targeting .NET 4.5 and references VMware.Vim.dll that comes with VMware-PowerCLI-6.3.0-3737840.

 

I'm running on Windows 7 Enterprise x64 SP1 and using Visual Studio 2015 Update 2.

"C:\KB2919355\Windows8.1-KB2919355-x64.msu" exists on my machine.

"C:\install" already exists in the guest.

In my case, the upload stops at around 50%.

There is enough disk space in the guest and on the host.

There is also enough memory on the host, indicated as Memory usage: 25445.00 MB Capacity: 32759.11 MB.

 

Running the PowerCLI Cmdlet Copy-VMGuestFile works without issues.

 

KB2137310

VMware KB: Consumption of VMware Extended Guest Statistics on ESXi 5.5 Update 3 or ESXi 6.0 may lead to virtual mach…

 

Would the fact that the vCenter Server is still running 6.0U1 still cause the issue?

I've asked my IT department to update it to 6.0U2, but I'm not sure how long they will take to update it.

 

Any other ideas?

 

Thank you!

.NET SDK and PowerCLI licensing

$
0
0

Hi there,

Our technical writer is trying to find the license agreement for mentioned products and date until licenses are valid (if not perpetual).

Could anyone help with this? Support was not able to give an answer.

Thank you.

How to find all unregister vm in a datastore?

$
0
0

Hi all,

I have a datastore with some unregister vm.

How do I find all unregister vms and register them?

Does anyone has any idea?

I'm find how to get into datatstore folder and get them, but I can't find how to get to this folder...

Can anyone help me to fix it? 

The attachment is printsreen of what I want to get in the datastore..

identify esx boot disk

$
0
0

how should i identify the host disk used as boot device?

i don't see such attribute in HostScsiDisk

 

 

in esx shell i can do:

vmkfstools -P /bootbank/
vfat-0.04 file system spanning 1 partitions.
File system label (if any):
Mode: private
Capacity 261853184 (63929 file blocks * 4096), 96301056 (23511 blocks) avail, max file size 0
UUID: 3a9855e0-3592e15a-0150-e5f8ae2e48e3
Partitions spanned (on "disks"):
    mpx.vmhba32:C0:T0:L0:6
Is Native Snapshot Capable: NO

vmkfstools -P /bootbank/

vfat-0.04 file system spanning 1 partitions.

File system label (if any):

Mode: private

Capacity 261853184 (63929 file blocks * 4096), 96301056 (23511 blocks) avail, max file size 0

UUID: 3a9855e0-3592e15a-0150-e5f8ae2e48e3

Partitions spanned (on "disks"):

mpx.vmhba32:C0:T0:L0:6

Is Native Snapshot Capable: NO

 

thanks

 

 

Lurker
 

    VMWare vSphere SDK - Fail to run SDK Samples due to System.Web.Services.Protocols.SoapException: Unsupported nested context

    $
    0
    0

    Hi All,

     

    I've downloaded vSphere Management SDK for vSphere 5.5.

    I am using VS 2008 for this test.

    I'm using the C# dotnet samples.

    We have two ESXi 5.5 hosts that are in one cluster.

    I've created the the following files using WSDL tools according to the instructions:

    1. Vim25Service2008.dll

    2. Vim25Service2008.XmlSerializers.dll

    3. STSService.dll

     

    I've changed the references in order to make the build pass.

    After that I tried to run the Simple Client example.

    I get the following error:


    [ 23/06/16 10:23:37 AM ] Begin Log.

    Started

    System.Web.Services.Protocols.SoapException: Unsupported nested context '{http://schemas.xmlsoap.org/ws/2004/08/addressi

    ng}Address'

       at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response,

    Stream responseStream, Boolean asyncCall)

       at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

       at STSService.Issue(RequestSecurityTokenType RequestSecurityToken)

       at AcquireBearerTokenByUserCredentialSample.AcquireBearerTokenByUserCredential.GetToken(String[] args) in C:\Work\VMW

    are\SDK\vsphere-ws\dotnet\cs\samples\AcquireBearerTokenByUserCredentialSample\AcquireBearerTokenByUserCredential.cs:line

    151

    Caught Exception :  Name : SoapException Message : Unsupported nested context '{http://schemas.xmlsoap.org/ws/2004/08/adhttp://schemas.xmlsoap.org/ws/2004/08/adhttp://schemas.xmlsoap.org/ws/2004/08/ad

    dressing}Address' Trace :    at AcquireBearerTokenByUserCredentialSample.AcquireBearerTokenByUserCredential.GetToken(Str

    ing[] args) in C:\Work\VMWare\SDK\vsphere-ws\dotnet\cs\samples\AcquireBearerTokenByUserCredentialSample\AcquireBearerTok

    enByUserCredential.cs:line 160

       at AppUtil.ServiceUtil.ClientConnectSSO() in C:\Work\VMWare\SDK\vsphere-ws\dotnet\cs\samples\AppUtil\ServiceUtil.cs:l

    ine 60

    Exception running : SimpleClient

    Caught Exception :  Name : SoapException Message : Unsupported nested context '{http://schemas.xmlsoap.org/ws/2004/08/ad

    dressing}Address' Trace :    at AppUtil.ServiceUtil.ClientConnectSSO() in C:\Work\VMWare\SDK\vsphere-ws\dotnet\cs\sample

    s\AppUtil\ServiceUtil.cs:line 81

       at AppUtil.ServiceUtil.ClientConnect() in C:\Work\VMWare\SDK\vsphere-ws\dotnet\cs\samples\AppUtil\ServiceUtil.cs:line

    41

       at AppUtil.AppUtil.connect() in C:\Work\VMWare\SDK\vsphere-ws\dotnet\cs\samples\AppUtil\AppUtil.cs:line 656

    [ 23/06/16 10:23:40 AM ] End Log.

     

     

    Caught SoapException -  Actor :  Code : ServerFaultCode Detail XML : <detail><RuntimeFaultFault xsi:type="vim25:InvalidR

    equest" xmlns="urn:vim25" xmlns:vim25="urn:vim25" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" /></detail>

     

    These are the command line arguments I pass to the application:

    --url https://10.161.47.213/sdk --username administrator@vsphere.local --password  ****** --ssoUrl https://10.161.47.213:7444/sso-adminserver/sdk/vsphere.local

     

    I'm not sure about the url and the ssoUrl.

    However the 10.161.47.213 is the ip address of the vCenter.

     

    Any help will be appreciated.

    Thanks,

    Dudi.

    how to get a list of Distributed vSwitch in c#

    $
    0
    0

    Hi,

        basically I use the code below (and it works) to get the list of vswitch and would like something like that for dVS....

     

    var vswitches = ((VMware.Vim.HostSystem)(client.FindEntityViews(typeof(HostSystem), null, null, null)[0])).Config.Network.Vswitch;

     

                foreach (var vswitch in vswitches)

     

    Thanks for your help.

    SDK support creating vm with VMDK > 2T ?

    $
    0
    0

    Hello

     

    May I create a vm with vmdk size >2T with SDK ?

     

    I created a vm with wmdk 2046G with vSphere API, It works. But when I try to created a vm with vmdk 2048G, it fails and the error is :File *.vmdk is larger than the maximum size supported by datastore.

     

    The enviroment is vSphere 5.5 and VMFS 5. 

     

    Any body have idea on it?

     

    thanks. 

    How to set connection timeout in vSphere Java SDK?

    $
    0
    0

    Hi all,

    how can be set the connection timeout in vSphere SDK?
    I've tried to set in different way on VimPortType, with no luck.

    For example:

            ((BindingProvider) _service).getRequestContext().put(JAXWSProperties.REQUEST_TIMEOUT, DEFAULT_TIMEOUT); // Timeout in millis

            ((BindingProvider) _service).getRequestContext().put(JAXWSProperties.CONNECT_TIMEOUT, DEFAULT_TIMEOUT); // Timeout in millis

     

    Could you please help?

    Documentation in lagging in this area.

     

    Thanks!

    GetViewByMorefs causes "Required parameter specSet is missing" for HostSystem

    $
    0
    0

    Hello,

    I am attempting to get a collection of HostSystem objects in a specific cluster using the VMware.Vim API that comes with PowerCLI 6. I can retrieve the cluster by doing:

    var clusters = client.FindEntityViews(typeof(ClusterComputeResource), null, null, null).Cast<ClusterComputeResource>();

    For each of these clusters, I can inspect the Host property to get an array of MoRef's that point to each host in the cluster. However, when attempting to retrieve the hosts using:

    var hosts = client.GetViewsByMorefs(cluster.Host, "Name", "Summary", "Vm").Cast<HostSystem>();

    An exception is thrown:

    Required parameter specSet is missing
    
    
    while parsing call information for method RetrieveProperties
    
    at line 1, column 218
    
    
    while parsing SOAP body
    
    at line 1, column 207
    
    
    while parsing SOAP envelope
    
    at line 1, column 38

    I have tried both with and without specifiying the params string[] properties parameter specified, but I get the same result either way. Is there something I'm missing?

    I have also tried past versions of the library (5.5 and 5.0), and encounter the same problem.

    Thanks!

    Required parameter specSet is missing
     
    while parsing call information for method RetrieveProperties
    at line 1, column 218
     
    while parsing SOAP body
    at line 1, column 207
     
    while parsing SOAP envelope
    at line 1, column 38
    Viewing all 1375 articles
    Browse latest View live


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