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

excuse me , does any friend know why a error occurs when the sample VMCreate refers to vim25api , in ws sdk 5.0?

$
0
0

excuse me ,

 

does any friend know why  a error occurs when   the sample  VMCreate refers to vim25api , in ws sdk 5.0?

 

in sdk 5.0 ,the sample  VMCreate refer to vimapi  in defult,

SDK\vsphere-ws\wsdl\vim contains WSDL files for use with ESX Server 3.0.1 and VirtualCenter 2.0.

SDK\vsphere-ws\wsdl\vim25 contains WSDL files for use with ESXi 5.0, ESX/ESXi 4.1, ESX/ESXi 4.0,

vCenter Server 4.1/4.0, ESX 3.5, and VirtualCenter 2.5 systems.

 

to support higher version esxi or vcenter, we have to refer to vim25api,

I did this ,

but, when running vmcreate.exe,

a error happened, error msg: “System.Object[]” can not be casted to type “Vim25Api.ManagedObjectReference”。

 

the line in vmcreate.cs is:

         ManagedObjectReference[] hrmors

            = (ManagedObjectReference[])cb.getServiceUtil().GetDynamicProperty((ManagedObjectReference)crmors[i], "host");

I debugged it, crmors[i] is a reference of compute resource, it looks like a valid object, and should be casted well.

what's more it runs very well when we  refered to vimapi,

 

does any friend know why ?


Retrieving the list of independent virtual disks for a host (managed by a vCenter)

$
0
0

Is there a way to get the list of virtual disks (independent disks i.e. not associated with a virtual machine), when the ESX server is being managed by a vCenter.

Am using VIM API (C# language).

A way to get vDS ports for VMs of a certain Host

$
0
0

Hi,

I am trying to get a list of vDS ports that have VMs connected from a certain Host.

I tried using the vDS.FetchDVPortKeys(criteria) with the scope criteria but besides the fact that this criteria is deprecated in 6.0 it is not returning the desired results as only my uplink ports have the Host set as scope, the VM ports have the scope Unset

Is there a fast way to get the list of vDS ports for this VMs in a setup of 150 Host, 9000 VMs, all connected in 5 vDSs?

Thank you,

Alina

            criteria = vim.dvs.PortCriteria()
            criteria.connected = True
            criteria.uplinkPort = False
            criteria.active = True
            criteria.scope = host
            vm_ports = dvs.FetchDVPortKeys(criteria)

Is there a way to fetch Data Objects properties such as vDS port state in a similar way to the propertyCollector for the Managed Objects

$
0
0

Hi,

I am trying to retrieve vDS ports properties such as the state in the most efficient way, not fetching the entire object but just this property. I know about the propertyCollector that can be used on a Managed object and I am wondering if there is a way to do something similar for the Data Objects. 

I need a very efficient way to do this on a large setup:  vCenter with 150 Hosts, 9000 VMs, all connected in 5 VDSs.

Thank you,

Alina

C# application using vSphere SDK 5.5 fails to retrieve VM's data from VMware ESXi 4

$
0
0

Hi,

I am using vSphere 5.5  SDK to retrieve hosts and vm's data from VMware ESXi 4. The application successfully fetches data for hosts but it fails with the below exception when I try to retrieve data for datastores or vm's

 

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 Vim25Api.VimService.RetrieveServiceContent(ManagedObjectReference _this)

 

It fails (at highlighted red line) when I try to use below get properties method. Any help to resolve this would be greatly appreciated.

 

public static Object[] getProperties(ManagedObjectReference moRef, String[] properties) {

 

 

              // PropertySpec specifies what properties to retrieve and from type of Managed Object

              PropertySpec pSpec = new PropertySpec();

              pSpec.type = moRef.type;

              pSpec.pathSet = properties;

 

 

              // ObjectSpec specifies the starting object and any TraversalSpecs used to specify other objects for consideration

              ObjectSpec oSpec = new ObjectSpec();

              oSpec.obj = moRef;

 

 

             // PropertyFilterSpec is used to hold the ObjectSpec and PropertySpec for the call

              PropertyFilterSpec pfSpec = new PropertyFilterSpec();

              pfSpec.propSet = new PropertySpec[] { pSpec };

              pfSpec.objectSet = new ObjectSpec[] { oSpec };

 

 

             // retrieveProperties() return the properties selected from PropertyFilterSpec

              ManagedObjectReference _svcRef1 = new ManagedObjectReference();

              _svcRef1.type = "Service Instance";

              _svcRef1.Value = "Service Instance";

              ServiceContent sic1 = null;

              vim_svc.Timeout = 600000; //The value can be set to some higher value also.

             sic1  = vim_svc.RetrieveServiceContent(_svcRef1);

              ObjectContent[] ocs = new ObjectContent[20];

              ocs = vim_svc.RetrieveProperties(sic1.propertyCollector, new PropertyFilterSpec[] { pfSpec });

 

 

              // Return value, one object for each property specified

              Object[] ret = new Object[properties.Length];

 

              if (ocs != null) {

                  for (int i = 0; i < ocs.Length; i++) {

                      ObjectContent oc = ocs[i];

                      DynamicProperty[] dps = oc.propSet;

                      if (dps != null) {

                          for (int j = 0; j < dps.Length; ++j) {

                              DynamicProperty dp = dps[j];

                              //Find property path index

                              for (int p = 0; p < ret.Length; ++p) {

                                  if (properties[p].Equals(dp.name)) {

                                      ret[p] = dp.val;

                                  }

                              }

                          }

                     

                      }

          

                  }      

              }

              return ret;   

          }

Need Create Datastore .NET Code to specify the capacity of datastore

$
0
0

Hi,

 

We are using .NET Vimapi to commuicate to Vmware Server. How can set Datastore Capacity? Can we .NET sample code to specify datastore capacity.

 

Thanks,

Sainath

Add RDM device 0 error

$
0
0

Hi

i am using c# api to add rdm ,i was able to add new disk(just regular virtual disk) but  when it come to rdm 

i am getting Device 0 error

this is my code

 

            var diskSpec = new VirtualDeviceConfigSpec();

            var vmConfigInfo = (VirtualMachineConfigInfo)PropertyCollectorHandler.GetDynamicProperty(vmMor, "config");

            var diskfileBacking = new VirtualDiskRawDiskMappingVer1BackingInfo();

 

            var disk = new VirtualDisk();

 

            int tempInt;

            bool IsLunNum = int.TryParse(uniqueid, out tempInt);

             

            ManagedObjectReference computeResMOR = (ManagedObjectReference)PropertyCollectorHandler.GetDynamicProperty(GeneralMorContainer.GetHostMor(HostiP),"parent");

        

            ManagedObjectReference BrowserMOR =(ManagedObjectReference) PropertyCollectorHandler.GetDynamicProperty(computeResMOR, "environmentBrowser");

 

            VirtualMachineScsiDiskDeviceInfo[] arrDevices = PropertyCollectorHandler.GetScsiDeviceInfo(BrowserMOR, HostiP);

 

            foreach (VirtualMachineScsiDiskDeviceInfo virtualMachineScsiDiskDeviceInfo in arrDevices)

            {

                if (!IsLunNum && virtualMachineScsiDiskDeviceInfo.disk.canonicalName.ToLower().Contains(uniqueid.ToLower()))

                {

                    diskfileBacking.deviceName = virtualMachineScsiDiskDeviceInfo.disk.canonicalName; 

                    

                }

                else if (IsLunNum && virtualMachineScsiDiskDeviceInfo.lunNumber == Convert.ToInt32(uniqueid))

                {

                    diskfileBacking.deviceName = virtualMachineScsiDiskDeviceInfo.disk.canonicalName;

                }

               

            }

           if(diskfileBacking.deviceName==null)

           {

               Log.GetSingleLogInst().InternalLogLine(DateTime.Now,

                                                   string.Format(

                                                       "Unable to find device name for {0}", uniqueid),MsGtype.Warnning);

               return null;

           }

 

            int ckey = 0;

            int unitNumber = 0;

 

            VirtualDevice[] test = vmConfigInfo.hardware.device;

            for (int k = 0; k < test.Length; k++)

            {

                if (test[k].deviceInfo.label.Equals("SCSI controller "+scsi_id.ToString()))

                {

                    ckey = test[k].key;

                    break;

                }

            }

 

            if (ckey == 0)

            {

                Log.GetSingleLogInst().InternalLogLine(DateTime.Now,

                                                  string.Format(

                                                      "Unable to find CONTROL Key for {0} Lun.", uniqueid), MsGtype.Warnning);

                return null;

            }

 

            if (scsi_unit >= 7) //there is no slot 7 when ordering the disk device

                scsi_unit++;

            unitNumber =  scsi_unit;

           

 

 

            diskfileBacking.fileName = datastorePath + RDMfileName + ".vmdk";

 

            diskfileBacking.diskMode = DiskMode.persistent.ToString(); // const will be changed by demand

            diskfileBacking.datastore = new ManagedObjectReference();

            diskfileBacking.diskMode = DiskMode.independent_persistent.ToString();

            diskfileBacking.compatibilityMode = "physicalMode";

            

 

            disk.unitNumber = unitNumber;

            disk.backing = diskfileBacking;

            

          //  int size = GB * sizeGB;

          //  disk.capacityInKB = size;

            disk.key = _keyOperation; //-1 + (-1 * scsi_unit);//unique key, for set seperate operations

            _keyOperation--;

            disk.controllerKeySpecified = true;

            disk.unitNumberSpecified = true;

            disk.controllerKey = ckey;

 

            diskSpec.operation = VirtualDeviceConfigSpecOperation.add;

            diskSpec.fileOperation = VirtualDeviceConfigSpecFileOperation.create;

            diskSpec.device = disk;

            diskSpec.fileOperationSpecified = true;

            diskSpec.operationSpecified = true;

 

 

            return diskSpec;

can u pls help me

thx

 
            var diskSpec = new VirtualDeviceConfigSpec();
            var vmConfigInfo = (VirtualMachineConfigInfo)PropertyCollectorHandler.GetDynamicProperty(vmMor, "config");
            var diskfileBacking = new VirtualDiskRawDiskMappingVer1BackingInfo();
 
            var disk = new VirtualDisk();
 
            int tempInt;
            bool IsLunNum = int.TryParse(uniqueid, out tempInt);
             
            ManagedObjectReference computeResMOR = (ManagedObjectReference)PropertyCollectorHandler.GetDynamicProperty(GeneralMorContainer.GetHostMor(HostiP),"parent");
        
            ManagedObjectReference BrowserMOR =(ManagedObjectReference) PropertyCollectorHandler.GetDynamicProperty(computeResMOR, "environmentBrowser");
 
            VirtualMachineScsiDiskDeviceInfo[] arrDevices = PropertyCollectorHandler.GetScsiDeviceInfo(BrowserMOR, HostiP);
 
            foreach (VirtualMachineScsiDiskDeviceInfo virtualMachineScsiDiskDeviceInfo in arrDevices)
            {
                if (!IsLunNum && virtualMachineScsiDiskDeviceInfo.disk.canonicalName.ToLower().Contains(uniqueid.ToLower()))
                {
                    diskfileBacking.deviceName = virtualMachineScsiDiskDeviceInfo.disk.canonicalName; 
                    
                }
                else if (IsLunNum && virtualMachineScsiDiskDeviceInfo.lunNumber == Convert.ToInt32(uniqueid))
                {
                    diskfileBacking.deviceName = virtualMachineScsiDiskDeviceInfo.disk.canonicalName;
                }
               
            }
           if(diskfileBacking.deviceName==null)
           {
               Log.GetSingleLogInst().InternalLogLine(DateTime.Now,
                                                   string.Format(
                                                       "Unable to find device name for {0}", uniqueid),MsGtype.Warnning);
               return null;
           }
 
            int ckey = 0;
            int unitNumber = 0;
 
            VirtualDevice[] test = vmConfigInfo.hardware.device;
            for (int k = 0; k < test.Length; k++)
            {
                if (test[k].deviceInfo.label.Equals("SCSI controller "+scsi_id.ToString()))
                {
                    ckey = test[k].key;
                    break;
                }
            }
 
            if (ckey == 0)
            {
                Log.GetSingleLogInst().InternalLogLine(DateTime.Now,
                                                  string.Format(
                                                      "Unable to find CONTROL Key for {0} Lun.", uniqueid), MsGtype.Warnning);
                return null;
            }
 
            if (scsi_unit >= 7) //there is no slot 7 when ordering the disk device
                scsi_unit++;
            unitNumber =  scsi_unit;
           
 
 
            diskfileBacking.fileName = datastorePath + RDMfileName + ".vmdk";
 
            diskfileBacking.diskMode = DiskMode.persistent.ToString(); // const will be changed by demand
            diskfileBacking.datastore = new ManagedObjectReference();
            diskfileBacking.diskMode = DiskMode.independent_persistent.ToString();
            diskfileBacking.compatibilityMode = "physicalMode";
            
 
            disk.unitNumber = unitNumber;
            disk.backing = diskfileBacking;
            
          //  int size = GB * sizeGB;
          //  disk.capacityInKB = size;
            disk.key = _keyOperation; //-1 + (-1 * scsi_unit);//unique key, for set seperate operations
            _keyOperation--;
            disk.controllerKeySpecified = true;
            disk.unitNumberSpecified = true;
            disk.controllerKey = ckey;
 
            diskSpec.operation = VirtualDeviceConfigSpecOperation.add;
            diskSpec.fileOperation = VirtualDeviceConfigSpecFileOperation.create;
            diskSpec.device = disk;
            diskSpec.fileOperationSpecified = true;
            diskSpec.operationSpecified = true;
 
 
            return diskSpec;

check if a host is in a HA cluster by pyvmomi

$
0
0

Hi,

 

I am trying to check if a host is in HA cluster.

I am using Version 5.5.0 Build 2414847

I found that: https://www.vmware.com/support/developer/converter-sdk/conv50_apireference/vim.host.ConnectInfo.html

and inside of it:

inDasCluster*xsd:boolean  If the host is already being managed by a vCenter Server, this property reports true if the host is also part of a vSphere HA enabled cluster. If this is the case, remove or disconnect the host from this cluster before adding it to another vCenter Server.

I am preforming the following steps:

info = host.QueryConnectionInfo()

info.inDasCluster return nothing - not True and not False

 

Am I missing something? Is there a different to check if a host is in HA cluster?

Maybe to get the cluster and ask the cluster but is there a way to get a cluster from a host?

 

Thanks


The problem of writing logs with the web client plugin under vsphere 6.0

$
0
0

I have developed a vSphere web client plugin under vSphere 6.0. In my plugin, I want to write logs using JAVA Logging to the directory c:\test\log\. At first, I ran my plugin on Windows Server 2008 R2, and this is a single server without domain (not in the Active Directory), It is succeed to write logs.

 

But when I ran my plugin on Windows Server 2012 R2 with domain (in the Active Directory), It is failed to write logs.


After checking the web client logs, I found the following errors:

[2015-11-06T17:52:20.451+09:00] [ERROR] P Connection(2)-172.16.8.231  System.err    java.io.IOException: Couldn't get lock for C:\test\log\command

[2015-11-06T17:52:20.452+09:00] [ERROR] P Connection(2)-172.16.8.231  System.err    at java.util.logging.FileHandler.openFiles(FileHandler.java:389)

[2015-11-06T17:52:20.452+09:00] [ERROR] P Connection(2)-172.16.8.231  System.err    at java.util.logging.FileHandler.<init>(FileHandler.java:363)

 

I suspected that maybe this is a problem about permission, So I check the properties of the successful log file on Windows Server 2008 R2:

log_file_property.jpg

As the picture shows, I think the account who wrote the log is NT Service\vspherewebclientsvc, which is the virtual logon account of vSphere Web Client Service. It is the new feature of vSphere 6.0 and I can not find the permission of this account. but since It is succeed to write the log files under the Windows Server 2008 R2, I think this account has the permission to write files to c:\test\log\.


I am so confused with this problem, the reason is related to windows server version? or the Active Directory?  Can anybody help me?

 

Thank you.

How to delete "Virtual Machines to Hosts" DRS rules using pyvmomi?

$
0
0

Hi,

I am using the following code to remove a DRS VmHostRule. The vm group and the host group used in the rule do not exist anymore when trying to delete the rule (they were deleted previously).

spec = vim.cluster.ConfigSpecEx()
spec.rulesSpec = []
rules = cluster.configurationEx.rule
if rules:    for rule in rules:        if rule.name == "my_rule":            rule_spec = vim.cluster.RuleSpec()            rule_spec.operation = "remove"            rule_spec.removeKey = rule.key            rule_info = vim.cluster.VmHostRuleInfo()            rule_info.enabled = rule.enabled            rule_info.name = rule.name            rule_info.key = rule.key            rule_info.mandatory = rule.mandatory            rule_info.vmGroupName = rule.vmGroupName            rule_info.affineHostGroupName = rule.affineHostGroupName            rule_info.userCreated = rule.userCreated            rule_spec.info = rule_info            spec.rulesSpec.append(rule_spec)
if spec.rulesSpec:    try:        task = cluster.ReconfigureComputeResource_Task(spec, True)        wait_for_reconfig_tasks(self.content, [task])    except Exception:        print("Failed to remove affinity rule")

Sometimes, the code doesn't work and the following result is received:

pyVmomi.VmomiSupport.vmodl.fault.InvalidArgument: (vmodl.fault.InvalidArgument) {
   dynamicType = <unset>,
   dynamicProperty = (vmodl.DynamicProperty) [],
   msg = 'A specified parameter was not correct: ',
   faultCause = <unset>,
   faultMessage = (vmodl.LocalizableMessage) [],
   invalidProperty = <unset>
}

The vCenter vpxd.log contains the following:

2015-11-09T13:47:00.415Z info vpxd[7F35A15DC700] [Originator@6876 sub=Default opID=206261f7] [VpxLRO] -- ERROR task-30451 -- domain-c822 -- vim.ComputeResource.reconfigureEx: vmodl.fault.InvalidArgument:
 Result:
 (vmodl.fault.InvalidArgument) {
    faultCause = (vmodl.MethodFault) null,
    invalidProperty = <unset>,
    msg = ""
 }
 Args:

 Arg spec:
 (vim.cluster.ConfigSpecEx) {
    vmSwapPlacement = <unset>,
    spbmEnabled = <unset>,
    defaultHardwareVersionKey = <unset>,
    dasConfig = (vim.cluster.DasConfigInfo) null,
    drsConfig = (vim.cluster.DrsConfigInfo) null,
    rulesSpec = (vim.cluster.RuleSpec) [
       (vim.cluster.RuleSpec) {
          operation = "remove",
          removeKey = 103,
          info = (vim.cluster.VmHostRuleInfo) {
             key = 103,
             status = <unset>,
             enabled = true,
             name = "my_rule",
             mandatory = true,
             userCreated = <unset>,
             inCompliance = <unset>,
             ruleUuid = <unset>,
             vmGroupName = "vm_group",
             affineHostGroupName = "host_group",
             antiAffineHostGroupName = <unset>
          }
       }
    ],
    dpmConfig = (vim.cluster.DpmConfigInfo) null,
    vsanConfig = (vim.vsan.cluster.ConfigInfo) null,
 }
 Arg modify:
 true

The code sometimes works, sometimes returns the above error. Anyone knows what is wrong?

Thanks,

Adriana

"vDS dvs port cannot be found" when deleting a port mirroring session

$
0
0

Hi,

I have the following scenario:

- create a distributed port mirroring session

- add one source port and one destination port

- delete the vm marked as destination together with the portgroup it belongs to

Then when I try to edit/delete the mirroring session, I get the following error:

"The object or item referred could not be found. vDS dvs port 160 cannot be found".

Is there any workaround for deleting the port mirroring session (without deleting the distributed switch)?

Thanks,

Adriana

c# exportvm lease never gets past initializing.

$
0
0

I am trying to export an ovf utilizing the powershell tools Vmware.Vim.dll and When I try to create a export job the job just stays in the initialize state and never changes to the ready state and the vmlease initializeprogress always stays at 0. does anyone have any ideas on what could be causing this issue. On a side note I am able to export via the vsphere client successfully.

 

***code***

 

VirtualMachine vm = (VirtualMachine)client.FindEntityView(typeof(VirtualMachine), null, filter, null);

          

            if (vm != null)

            {

                HttpNfcLease vmlease = new HttpNfcLease(client, vm.ExportVm());

 

                DateTime StartTime = new DateTime();

                TimeSpan TotalExecutionTime = new TimeSpan();

 

 

                StartTime = DateTime.Now;

                HttpNfcLeaseState state = new HttpNfcLeaseState();

 

 

 

                for (; ; )

                {

                    //used to keep the lease alive

                    vmlease.HttpNfcLeaseProgress(0);

                  

                    //Get lease state

                    state = vmlease.State;

 

 

                    if (state == HttpNfcLeaseState.ready)

                    {

                        Console.WriteLine("Lease is available continue processing export");

                        break;

                    }

                    else if (state == HttpNfcLeaseState.error)

                    {

                        Console.WriteLine("Failed Lease State error: " + vmlease.Error);

                        break;

                    }

                    else

                    {

                        TotalExecutionTime = DateTime.Now - StartTime;

                        Console.WriteLine("LInitialize progress: " + vmlease.InitializeProgress + " Elapsed Time: " + TotalExecutionTime.ToString());

                    }

                    Thread.Sleep(30000);

                }

VB.net CreateImportSpec VMDK File over 2GB.

$
0
0

Hi Everyone,

     When I call this function with an end goal of uploading a .VMDK file to an ESX host, I get an Arithmetic Overflow due to the amount of memory trying to be allocated by .NET frame over 2GB (My VM is approx 8GB) on line CreateImportSpec.

When taking a look at Java examples of this API it seems Java is able to commit to the allocation of the VMDK thus having it succeed. Does anyone know how to translate this over correctly in .NET?

Thanks!

 

[code]

Public Sub ImportToESX(pathToOVF As String, VMName As String, HostIP As String)

        '#Region "Check input"

        If String.IsNullOrEmpty(pathToOVF) Then

            Throw New ArgumentNullException()

        End If

        If String.IsNullOrEmpty(VMName) Then

            Throw New ArgumentNullException()

        End If

        If String.IsNullOrEmpty(HostIP) Then

            Throw New ArgumentNullException()

        End If

        If Not pathToOVF.ToUpper().EndsWith(".OVF") And Not pathToOVF.ToUpper().EndsWith(".VMDK") Then

            Throw New ArgumentException("pathToOVF must contain a .OVF/.VMDK file")

        End If

        '#End Region

 

 

        Dim importSpecParams As New OvfCreateImportSpecParams()

        importSpecParams.DiskProvisioning = OvfCreateImportSpecParamsDiskProvisioningType.thin.ToString()

        importSpecParams.EntityName = VMName

        importSpecParams.HostSystem = _hostSystem.MoRef

        importSpecParams.Locale = "US"

        importSpecParams.DeploymentOption = String.Empty

 

 

        Dim ovfDescriptor As String = read_ovf_content(pathToOVF)

        If String.IsNullOrEmpty(ovfDescriptor) Then

            Throw New ApplicationException("Error loading OVF descriptor")

        End If

 

 

        Dim resourcePool As ResourcePool = DirectCast(_vimClient.FindEntityView(GetType(ResourcePool), Nothing, Nothing, Nothing), ResourcePool)

 

 

        Dim ovfImportResult As OvfCreateImportSpecResult = _ovfManager.CreateImportSpec(ovfDescriptor, resourcePool.MoRef, _hostSystem.Datastore(0), importSpecParams)

 

 

        If ovfImportResult Is Nothing Then

            Throw New ApplicationException("Error creating import spec")

        ElseIf ovfImportResult.[Error] IsNot Nothing Then

            ' this fault means user has earlier version of ESXi

            ' than what OVF was created with.

            If TypeOf ovfImportResult.[Error](0).Fault Is OvfNoSupportedHardwareFamily Then

                Throw New ApplicationException("The ESXi server is not compatable with this OVF")

            End If

 

 

            Throw New ApplicationException(ovfImportResult.[Error](0).LocalizedMessage)

        End If[/code]

powercli 5.8 release 1 get-CI* set-CI*

$
0
0

I'm trying to use this set of commandlets

Get-CIAccessControlRule

Get-CIDatastore

Get-CINetworkAdapter

Get-CIRole

Get-CIUser

Get-CIVApp

Get-CIVAppNetwork

Get-CIVAppStartRule

Get-CIVAppTemplate

Get-CIView

Get-CIVM

Set-CIAccessControlRule

Set-CINetworkAdapter

Set-CIVApp

Set-CIVAppNetwork

Set-CIVAppStartRule

Set-CIVAppTemplate

 

I've downloaded and installed power cli 5.8 release 1

 

when I type "get-help" Get-CI*

nothing gets returned

 

The rest of the commandlets all work as advertised

I'm wondering what I need to do to get all of the Get-CI* commandlets to be available

 

Thank you for any assistance

 

PerformanceManager::queryPerf is returning null for resource pool performance metrics

$
0
0

I'm using PerformanceManager::queryPerf(PerfQuerySpec[]) to query perf.cpu.usagemhz.average and perf.mem.consumed.average for ResourcePool. The same program can get return value for lower version VCs, but get null for VC 6.0. In vSphere, using same account that is used for API call, I can get performance data for the ResourcePool I'm trying to query.

 

Did anyone else used that API for VC 6.0 target? Is it working fine?

 

Thanks!


vsphere Api c# - get infrastructure tree

$
0
0

Hello

Can anybody give me an example how to list all VMs, Clusters, ESX Hosts and Datastores using api in c#?

I want to get a tree like in esx vcenter client 

Need specific event that gets triggered when the host gets destroyed which hosts the vm and there is a HA or cluster case

$
0
0

hi,

       I need the exact event that gets triggered when host that has a VM attached gets destroyed but it has a HA host which becomes active .

Marianne

How to get virtual mac address of a physical nic?

$
0
0
I have a requirement to get virtual mac address of a physical nic using sdk.
This is used to identify the physical switch to which it is connected.
PhysicalNic.getMac() returns physical mac address of the nic, so it is not useful.
Is there any other API to get virtual mac?
Following is the output of esxcfg-info command:
--------------------------------------------------------------------------------------
\==+Physical Nic :
            |----Name...............................................vmnic3
            |----PCI Bus............................................15
            |----PCI Slot...........................................4
            |----PCI function.......................................1
            |----MAC Address........................................00:e0:ed:04:e8:4b
            |----Virtual MAC Address................................00:50:56:54:e8:4b
            |----Driver.............................................e1000
            |----Network Hint.......................................1 0.0.0.0/0.0.0.0
.
.
----------------------------------------------------------------------------------------
Thanks in Advance.

LicenseAssignmentManager.QueryAssignedLicenses replacement

$
0
0

Hi all,

 

I was wondering if someone could tell me how I should replace LicenseAssignmentManager.QueryAssignedLicenses calls in 6.0 version of the vSphere Web Services SDK, please?

 

VMware documentation simply says "As of vSphere API 6.0 use cis.license.management.SystemManagementService", implying that everybody knows what that means, so does anybody know?

 

Thanks a bunch in advance.

 

Dmitri Fedorov

BridgeWays

 

P.S. The quoted documentation: http://pubs.vmware.com/vsphere-60/topic/com.vmware.wssdk.apiref.doc/vim.LicenseAssignmentManager.html#queryAssignedLicenses

Retrieving SAS HBA Identifier using SDK

$
0
0

Hello,

I'm facing some issues in retrieving the SAS identifier (SAS Address) for a SAS HBA using API.

However I'm able to list the SAS Address using the esx cli command " esxcli storage san sas list".

Are there any API available for the same ? Thanks. 

Viewing all 1375 articles
Browse latest View live


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