Quantcast
Channel: VMware Communities : All Content - vSphere Management SDK
Viewing all 1860 articles
Browse latest View live
↧

Get connection closed error when trying to extract data from vCenter Server using C# application

$
0
0

I get the below error while extracting data from vCenter 5.5 Server using C# vSphere 5.5 SDK (The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.)

 

 

ERROR The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.

System.Net.WebException: The underlying connection was closed: A connection that was expected to be kept alive was closed by the server. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host

   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)

   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)

   --- End of inner exception stack trace ---

   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)

   at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)

   at System.Net.Security._SslStream.StartFrameHeader(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)

   at System.Net.Security._SslStream.StartReading(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)

   at System.Net.Security._SslStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)

   at System.Net.TlsStream.Read(Byte[] buffer, Int32 offset, Int32 size)

   at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)

   at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)

   --- End of inner exception stack trace ---

   at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)

   at Microsoft.Web.Services3.WebServicesClientProtocol.GetResponse(WebRequest request, IAsyncResult result)

   at Microsoft.Web.Services3.WebServicesClientProtocol.GetWebResponse(WebRequest request)

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

   at Vim25Api.VimService.RetrieveProperties(ManagedObjectReference _this, PropertyFilterSpec[] specSet)

   at vCenterTestConnect.vCenterESXHostInfo.getvCenterHostAdvancedInfo()

   at vCenterTestConnect.vCenterESXHostInfo.startExtraction()

 

Yje application works fine in test environment in our lab (with 2 hosts and 22 VM) but gives the above error when used in prod environment. Any help would be appreciated.

↧

Getting complete list of servers and attributes directly from web services

$
0
0

We want to utilise web services provided by vSphere directly bypassing Java or C# libraries as part of our "environment discovery" routine which would be periodically performed by a Middleware platform. We want to configure it to poll vSphere web services and extract necessary data and store it in a database repository accessed by other applications. We definitely don't want to build any custom code to invoke web services via libraries provided by vmware.

 

I am able to successfully get the list of methods exposed (https://ourvmwareserver/sdk/vimService.wsdl) and use Login method to get the key and then use the key to invoke some other methods in SoapUI.

 

Now after spending few hours going through the SDK manuals I am at complete loss as to how exactly I can get the list of servers and their attributes using this approach. Can someone help with that please?

↧
↧

What is the difference between the View and ManagedObjectView?

$
0
0

Im reading the docs for the API reference.

It looks pretty straight forward, but Im a little confused about the purpose of ManagedObjectView.

According to the docs:

ViewManager can be used to create "Views" (ContainerView, ListView, InventoryView). So ViewManager is like a View factory right?

What confuses me though is that if View is the base class then why do the ContainerView, ListView, InventoryView actually extend from ManagedObjectView which in turn extends from View?

What is ManagedObjectView's purpose? Why don't they extend directly from View? With my limited understanding of this I see ManagedObjectView as a weird middleman.

↧

How to get the configuration of a running VirtualMachine

$
0
0

Hello,

I'm a beginner with the SDK and I'm trying to get the configuration of a running VirtualMachine.

I'm able to connect to the virtual center and to the following:

 

Dim myVM As New VMware.Vim.VirtualMachine(vmClient, New VMware.Vim.ManagedObjectReference("VirtualMachine-vm-1404"))

 

I'm sure that the object myVM is correctly set coz I'm able to command the VirtualMachine (for example I can issue a MyVM.ShutdownGuest that works perfectly).

I wish to retrieve the configuration of the virtual machine, particularly I wish to get virtual disks configuration, but here is my problem, if I look into the managed objects that are supposed to store the infos I need they are empty!

 

VirtualMachineConfigInfo.png

since I'm a beginner with the SDK I think I'm missing something...

 

Please help

↧

How do I use a local ticket acquired via VMware.Vim?

$
0
0

Object vSphereClient is already established and logged in.

 

using VMware.Vim;

 

private SessionManager GetSessionManager() {

  SessionManager sessionManager = null;

  try {

  ManagedObjectReference _svcRef = new ManagedObjectReference();

  _svcRef.Type = "ServiceInstance";

  _svcRef.Value = "ServiceInstance";

 

 

  ServiceInstance _service = new ServiceInstance(vSphereClient, _svcRef);

 

 

  ServiceContent _sic = _service.RetrieveServiceContent();

  sessionManager = (SessionManager)vSphereClient.GetView(_sic.SessionManager, null);

  }

  catch (Exception e) {

  throw (e);

  }

  return sessionManager;

}

public SessionManagerLocalTicket GetLocalTicket(string userName) {

  return GetSessionManager().AcquireLocalTicket(userName);

}

 

Here you see at method GetLocalTicket I can acquire a local ticket.

It creates a file with a one time username and password on the host, for instance:

/var/run/vmware-hostd-ticket/52b65cfa-d0d1-0dc6-ffc1-c8428d10e973

 

This file is available for a few seconds only (4 or 5 seconds, or so), after that it dissapears. I can use the contents of it to authenticate against for instance a vSphere host, one time.

 

The firstproblem is:

1. How do I read it from the host or use it for authentication directly?

 

I tried displaying it with "more /var/run/vmware-hostd-ticket/52b65cfa-d0d1-0dc6-ffc1-c8428d10e973"and I only get data similar to this: "52 1f 94 41 69 db 7c 67-ee d9 3a e4 dc 2d 6e b9~"

 

That doesn't make any sense to me, so the second problem is:

2. When acquired from the host, how do I use it? Is this the password string maybe?


And my third question:

3. How do I set the expiration time for the ticket to be more then a few seconds? Or in other words, the server-determined expiration time?

According to https://www.vmware.com/support/developer/vc-sdk/visdk2xpubs/ReferenceGuide/vim.SessionManager.html the expiration time is set some where on the host.

" The local ticket that is returned becomes invalid either after it is used or after a server-determined ticket expiration time passes."


↧
↧

How do we know from which template does the Virtual Machine is deployed?

$
0
0

Hi Folks,

I am trying to find out  a property in the Java SDK saying that the specific VM is deployed from which template, something like bios uuid or any property can define the relation ship between VM and template

Does anyone have an idea please help me.

 

Thanks you very much in advance.

↧

How to start a VM?

$
0
0

Good morning everybody!

 

Really quick simple question, strange that I can't find any info elsewhere, but here goes: How do I start a virtual machine using the web API? I know my VMWare hypervisor web address, what web address do I call to make it startup an existing virtual machine? So far I've tried http://machinehost/sdk and http://machinehost:8333/sdk but my browser just ends up prompting me that the security certificate for that address has expired and then if I continue it takes me to a blank page.

 

Is the web API what I think it is? I believe that it is a REST API for developers to interface with VMWare hypervisors. If not could someone please direct me to the proper knowledge resources for VMWare RESTful APIs.

 

Thanks, cheers.

↧

Modifying virtual machine custom attributes values using pyvmomi

$
0
0

There is a discussion https://communities.vmware.com/thread/474322?start=0&tstart=0 which talks about creating virtual machine custom attribute using pyvmomi.

I want to set and get virtual machine custom attribute values using pyvmomi. What are the steps I can take to do that. 

For example I create a custom attribute like this

Name : owner

Type : Virtual Machine

Value : {not set}

 

I want steps to set the value to "Tom" for a specific vm whose name is "myvm". Then read the value for the vm "myvm" to check if it is still "Tom".

↧

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.

↧
↧

Incompatible device backing error when editing network adapter

$
0
0

Hello Expert Developer,


I am working on an automatic VM deployment project for vSphere. I am trying to reconfigure deployed VM and change the MAC address of its network adapter. Device type which is being edited is Vmxnet3. I am using the following code snippet to reconfigure the VM in php using VMWarephp library.


[code]

    $deviceConfigSpec = new VirtualDeviceConfigSpec();

    $deviceConfigSpec->operation = 'edit';

    $deviceConfigSpec->device = new VirtualVmxnet3();

 

    foreach ($configInfo->hardware->device as $device) {

      if (get_class($device) == 'VirtualVmxnet3') {

          $deviceConfigSpec->device->key = $device->key;

          $deviceConfigSpec->device->controllerKey = $device->controllerKey;

          $deviceConfigSpec->device->unitNumber = $device->unitNumber;;

          $deviceConfigSpec->device->addressType = 'Manual';

          $deviceConfigSpec->device->macAddress = $mac;

      }

    }

 

    $configSpec = array('deviceChange' => array($deviceConfigSpec));

    $vm->ReconfigVM_Task(array('_this'=>$vm->reference, 'spec'=>$co

[/code]

 

When this code is ran, I get the following error in vSphere Client's task list:

 

[code]

   Incompatible device backing specified for device '0'

[/code]

 

I will appreciate if you can help me

 

Thanks in advance.

↧

Help with creating baremetal VM on Storage DRS Cluster (vSphere SDK)

$
0
0

Hello,

 

I would appreciate any help from anyone who has successfully built a baremetal VM on a Storage DRS Cluster in the vSphere SDK.  I am using c#.

I can clone vm's fine on the Storage DRS cluster, but when I am creating a baremetal VM, I am having issues with the ConfigSpec and the PodSelectionSpec.  Specifically, what do I put for the Datastore and fileName properties of the VirtualDiskFlatVer2BackingInfo properties.  I get an error that I have an incorrect parameter in the ConfigSpec and PodSelectionSpec.  Here is some code to create the PodSelectionSpec:

StorageDrsPodSelectionSpec podSelectionSpec = newStorageDrsPodSelectionSpec();

podSelectionSpec.StoragePod = vmOBJ.DataStore.Item2;

StoragePlacementSpec podPlacement = newStoragePlacementSpec();

podPlacement.DisallowPrerequisiteMoves = true;

podPlacement.Folder = vmOBJ.Folder.Item2;

podPlacement.Type = "create";

podPlacement.ConfigSpec = (VirtualMachineConfigSpec)Session["ConfigSpec"];

podPlacement.ResourcePool = vmOBJ.ResourcePool.Item2;

podPlacement.Host = hostMoref;

  

VmPodConfigForPlacement vmPodConfig = newVmPodConfigForPlacement();

vmPodConfig.StoragePod = vmOBJ.DataStore.Item2;

List<PodDiskLocator> podDiskConfig = newList<PodDiskLocator>();

VirtualMachineConfigSpec tempcfgspec = (VirtualMachineConfigSpec)Session["ConfigSpec"];

VirtualDeviceConfigSpec[] tempVDCfg = tempcfgspec.DeviceChange;

foreach (VirtualDeviceConfigSpec vd in tempVDCfg)

{

VirtualDevice VD = vd.Device;

if (VD.DeviceInfo.Label.Equals("Disk"))

{

PodDiskLocator temppodloc = newPodDiskLocator();

temppodloc.DiskId = vd.Device.Key;

VirtualDiskFlatVer2BackingInfo flatBack = newVirtualDiskFlatVer2BackingInfo();

flatBack.ThinProvisioned = true;

flatBack.DiskMode = "persistent";

flatBack.Datastore = null;

flatBack.FileName = "";

temppodloc.DiskBackingInfo = flatBack;

podDiskConfig.Add(temppodloc);

}

}

vmPodConfig.Disk = podDiskConfig.ToArray();

podSelectionSpec.InitialVmConfig = newVmPodConfigForPlacement[]{ vmPodConfig };

podPlacement.PodSelectionSpec = podSelectionSpec;

 

And here is the code to create the backinginfo:

VirtualDiskFlatVer2BackingInfo backInfo = newVirtualDiskFlatVer2BackingInfo();

backInfo.ThinProvisioned = thinProvisioned;

backInfo.DiskMode = "persistent";

backInfo.Datastore = null;

backInfo.FileName = "";

VirtualDisk tempDisk = newVirtualDisk();

tempDisk.Backing = backInfo;

tempDisk.CapacityInKB = size;

tempDisk.ControllerKey = controllerKey;

tempDisk.Key = (1 + i);

tempDisk.UnitNumber = unitNumber;

tempDisk.DeviceInfo = newDescription();

tempDisk.DeviceInfo.Label = "Disk";

tempDisk.DeviceInfo.Summary = "Disk";

VirtualDeviceConfigSpec tempConfigSpec = newVirtualDeviceConfigSpec();

tempConfigSpec.Device = tempDisk;

tempConfigSpec.FileOperation = VirtualDeviceConfigSpecFileOperation.create;

tempConfigSpec.Operation = VirtualDeviceConfigSpecOperation.add;

 

I realize that there is a lot going on but what I can't find the answer to, is how do I let vSphere choose the datastore and what do I need to have in there to create a VM on a Storage DRS Cluster?

↧

Incompatible device backing error when changing network adapter address type

$
0
0

Hello Expert Developer,

I am working on an automatic VM deployment project for vSphere. I am trying to reconfigure deployed VM and change the MAC address of its network adapter. Device type which is being edited is Vmxnet3. I am using the following code snippet to reconfigure the VM in php using VMWarephp library.

[code]

   $deviceConfigSpec = new VirtualDeviceConfigSpec();

    $deviceConfigSpec->operation = 'edit';

    $deviceConfigSpec->device = new VirtualVmxnet3();

     foreach ($configInfo->hardware->device as $device) {

      if (get_class($device) == 'VirtualVmxnet3') {

          $deviceConfigSpec->device->key = $device->key;

          $deviceConfigSpec->device->controllerKey = $device->controllerKey;

          $deviceConfigSpec->device->unitNumber = $device->unitNumber;;

          $deviceConfigSpec->device->addressType = 'Manual';

          $deviceConfigSpec->device->macAddress = $mac;

      }

    } 

    $configSpec = array('deviceChange' => array($deviceConfigSpec));

    $vm->ReconfigVM_Task(array('_this'=>$vm->reference, 'spec'=>$co

[/code]

When this code is ran, I get the following error in vSphere Client's task list:

Incompatible device backing specified for device '0'

I will appreciate if you can help me

Thanks in advance.

[code]
    $deviceConfigSpec = new VirtualDeviceConfigSpec();
    $deviceConfigSpec->operation = 'edit';
    $deviceConfigSpec->device = new VirtualVmxnet3();
 
    foreach ($configInfo->hardware->device as $device) {
      if (get_class($device) == 'VirtualVmxnet3') {
          $deviceConfigSpec->device->key = $device->key;
          $deviceConfigSpec->device->controllerKey = $device->controllerKey;
          $deviceConfigSpec->device->unitNumber = $device->unitNumber;;
          $deviceConfigSpec->device->addressType = 'Manual';
          $deviceConfigSpec->device->macAddress = $mac;
      }
    }
 
    $configSpec = array('deviceChange' => array($deviceConfigSpec));
    $vm->ReconfigVM_Task(array('_this'=>$vm->reference, 'spec'=>$co
[/code]
↧

Clone VM from TPL, Change DVS Backing - Not allowed in current state

$
0
0

Hi all, having some issues with the cloning of a template and modifying the existing virtual network device on the way through. I am getting the error "The operation is not allowed in the current state"

I am using ApplyStorageDrsRecommendation_Task due to us using SDRS clusters - wondering if there is something specific here i need to do differently when not using the CloneVM task?

Basic code for changing the backing below;

The configSpec object is a VirtualMachineConfigSpec which is attached to the VirtualMachineCloneSpec.config

I am finding the "networkDevice" object by iterating the VirtualMachineConfigInfo.hardware.device - FYI getting this via (VirtualMachineConfigInfo)cb.getServiceUtil().GetDynamicProperty(vmRef, "config");, vmRef is found via _service.FindByInventoryPath which is the template path.

            VirtualDeviceConfigSpec[] devSpec = new VirtualDeviceConfigSpec[0];
            configSpec.deviceChange = new VirtualDeviceConfigSpec[1];
            configSpec.deviceChange[0] = new VirtualDeviceConfigSpec();
            configSpec.deviceChange[0].operation = VirtualDeviceConfigSpecOperation.edit;
            configSpec.deviceChange[0].device = networkDevice;
 
 
            VirtualEthernetCardDistributedVirtualPortBackingInfo nicBack = new VirtualEthernetCardDistributedVirtualPortBackingInfo();
            nicBack.port = new DistributedVirtualSwitchPortConnection();
            nicBack.port.switchUuid = dvsUUID;
            nicBack.port.portgroupKey= phKey;
 
            configSpec.deviceChange[0].device.backing = nicBack;
 
            configSpec.deviceChange[0].device.connectable = new VirtualDeviceConnectInfo();
            configSpec.deviceChange[0].device.connectable.startConnected = true;
            configSpec.deviceChange[0].device.connectable.allowGuestControl = true;
            configSpec.deviceChange[0].device.connectable.connected = true;

           VirtualDeviceConfigSpec[] devSpec = new VirtualDeviceConfigSpec[0];

            configSpec.deviceChange = new VirtualDeviceConfigSpec[1];

            configSpec.deviceChange[0] = new VirtualDeviceConfigSpec();

            configSpec.deviceChange[0].operation = VirtualDeviceConfigSpecOperation.edit;

            configSpec.deviceChange[0].device = networkDevice;

            VirtualEthernetCardDistributedVirtualPortBackingInfo nicBack = new VirtualEthernetCardDistributedVirtualPortBackingInfo();

            nicBack.port = new DistributedVirtualSwitchPortConnection();

            nicBack.port.switchUuid = dvsUUID;

            nicBack.port.portgroupKey= pgKey;

 

            configSpec.deviceChange[0].device.backing = nicBack;

 

            configSpec.deviceChange[0].device.connectable = new VirtualDeviceConnectInfo();

            configSpec.deviceChange[0].device.connectable.startConnected = true;

            configSpec.deviceChange[0].device.connectable.allowGuestControl = true;

            configSpec.deviceChange[0].device.connectable.connected = true;

 

Am i meant to be adding the device changes to something else such as the StoragePlacementResult?

I have also tried a simple remove of the NIC also which gives the same not allowed in current state error. 

Any help/direction/things to trial would be much appreciated!

↧
↧

mount a volume always fail invoked by vmtools

$
0
0

Hi,

 

I wrote a python script to execute command in guest OS by pyvmomi 6.0. The main function I used is "GuestProcessManager.StartProgramInGuest" to talk with vmtools in guest OS to execute specific command.  this script is working well with almost LVM related command such as lvdisplay, lvcreate ..., but got failed with command "mount" a existing LV to a mount point which  is last step for us automating create new volume in guest OS(RHEL 7.2). I observed in /var/log/message, it always complain the volume already mounted in guest system, but actually I can't see this LV in guest by root. below is specific information about my script and steps

 

python script:

ps = vim.vm.guest.ProcessManager.ProgramSpec(programPath=vm_command, arguments=vm_param, envVariables=all_envs)

res = pm.StartProgramInGuest(vm, creds, ps)

 

programPath=/usr/bin/mount

vm_param=/dev/vgdata/jason1 /sutton3  (vgdata is a existing VG,and jason1 is a existing LV, the directory /sutton3 is point I want to mount)

 

 

Run script to mount volume in guest(actually vmtools to do execution), /var/log/message complaints like this:

 

Sep 17 19:46:03 vpc4219 vmtoolsd: mount: /dev/mapper/vgdata-jason1 is already mounted or /sutton3 busy

Sep 17 19:46:03 vpc4219 vmtoolsd: /dev/mapper/vgdata-jason1 is already mounted on /sutton3

 

 

 

Actually run command in guest by root, I didn't see this volume show up

[root@vpc4219 ~]# mount -l | grep sutton3

[root@vpc4219 ~]# df -hT

Filesystem            Type      Size  Used Avail Use% Mounted on

/dev/mapper/rhel-root xfs        63G   14G   50G  22% /

devtmpfs              devtmpfs  7.8G     0  7.8G   0% /dev

tmpfs                 tmpfs     7.8G   88K  7.8G   1% /dev/shm

tmpfs                 tmpfs     7.8G   25M  7.8G   1% /run

tmpfs                 tmpfs     7.8G     0  7.8G   0% /sys/fs/cgroup

/dev/sda1             xfs       497M  211M  287M  43% /boot

tmpfs                 tmpfs     1.6G   16K  1.6G   1% /run/user/42

tmpfs                 tmpfs     1.6G     0  1.6G   0% /run/user/0

 

 

Afterward, I manually run mount command in guest by root, rather than script. It is successful easily without any error/warning. the question is why vmtools always failed command and how to fix this issue? Does anybodyhelp on this? thanks in advance.

↧

Create a VM through CreateVM_Task and SOAP WebServices

$
0
0

Hello,

 

I am facing a strange problem here, trying to create a VM with Php & SOAP !

 

I managed to connect to my vCenter, and creating an "empty" VM with no additional hardware (no deviceChange section) is working fine ! As soon as I try to add a hardware element (CDRom in this case) It stops working.

 

Here's the XML code from my SOAP Request :

 

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:vim25" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

     <SOAP-ENV:Body>

          <ns1:CreateVM_Task>

               <ns1:_this>group-v689</ns1:_this>

               <ns1:config>

                    <name>testSOAPh</name>

                    <version>vmx-11</version>

                    <guestId>RHEL7_64guest</guestId>

                    <files>

                         <vmPathName>[vsanDatastore]</vmPathName>

                    </files>

                    <numCPUs>1</numCPUs>

                    <memoryMB>4096</memoryMB>

                    <deviceChange>

                         <VirtualDeviceConfigSpec>

                              <device type="VirtualCdrom">

                                   <key>-42</key>

                                   <connectable>

                                        <startConnected>true</startConnected>

                                        <allowGuestControl>true</allowGuestControl>

                                        <connected>false</connected>

                                   </connectable>

                                   <controllerKey>200</controllerKey>

                                   <unitNumber>0</unitNumber>

                              </device>

                              <operation>add</operation>

                         </VirtualDeviceConfigSpec>

                    </deviceChange>

               </ns1:config>

               <ns1:pool>resgroup-27</ns1:pool>

          </ns1:CreateVM_Task>

     </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

 

And the error message :

 

Required property device is missing from data object of type VirtualDeviceConfigSpec

 

while parsing serialized DataObject of type vim.vm.device.VirtualDeviceSpec

at line 2, column 400

 

while parsing property &quot;deviceChange&quot; of static type ArrayOfVirtualDeviceConfigSpec

 

while parsing serialized DataObject of type vim.vm.ConfigSpec

at line 2, column 213

 

while parsing call information for method CreateVM_Task

at line 2, column 169

 

while parsing SOAP body

at line 2, column 154

 

while parsing SOAP envelope

at line 2, column 0

 

while parsing HTTP request for method createVm

on object of type vim.Folder

 


I think I am missing something pretty simple ! Like how to imbricate the device type (how to specify that you want to create a VirtualCdrom which is a special type of VirtualDevice) and how to design an ArrayOfVirtualDeviceConfigSpec !


Any ideas ?


Thanks,

GS

↧

PowerCLI 6.3 changes with VimClient.Connect() for C# - SSL/TLS Error

$
0
0

I have been developing a c# app and was using the VMWare.Vim DLL from PowerCLI 6.0. I updated my PowerCLI and now i am unable to connect to the vCenter. The connection now throws an error of "The underlying connection was closed: could not establish trust relationship for the SSL/TLS secure channel". I never had this problem before i upgraded PowerCLI. Is there a way to disable checking the certificate?

 

Thanks

↧

Is there any way to call system calls(like ioctl) in the SDK?

$
0
0

I need send a message a vmk device driver in the Java service, but I don't know whether current SDK support this.
In a local application, I can use system calls to open the device and call ioctl to operate it, as below:
    fd = open(dev, O_RDWR);
    ioctl(fd, IOCTL_GET_SOMETHING, some_info)
So now, I want to call the ioctl in the Java services through the SDK.
Is there any APIs in the SDK(like VI SDK) to run such system calls?

If there isn't, then what is the official method to send messages to a vmk device driver in the SDK?

Thanks a lot.

↧
↧

"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

↧

vCenter API description about instance for virtual disk performance counter "totalReadLatency"

$
0
0

We are invoking queryPerf method (vCenter API) and trying to get virtual disk performance parameter "totalReadLatency". In queryPerf output, we are getting "scsi0:0" and "scsi0:1" as instance for totalReadLatency performance counter. Can you please add more information about instance for virtual disk counters?

By instance I am referring to - https://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/vim.PerformanceManager.MetricId.html#instance

 

We are not able to identify "scsi0:0" is referring to which virtual disk. From DataObject - VirtualHardware, we are getting virtual disk key as 2000 and 2001. Is there any relation between scsi0:0 and 2000?

We are also getting unitNumber on VirtualHardware as 0 and 1. Does it resemble anything out of scsci0:0 and scsi0:1?

 

Please provide more information about instance or let us know if we are looking at wrong parameters

↧

vvol datastore became inactive

$
0
0

 

Hello there

 

After we registered our VASA Provider to the webclient(Version 6.5.0 Build 4240420),we successfully created datastores.

But after we refreshing the datastores,their status came into "inactive" and the capacity was "0.00B"

 

We searched the vvold logs and found something below:

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

2016-10-18T03:39:45.704Z info vvold[6039B70] [Originator@6876 sub=Default] VasaSession::InitSoap: https://100.115.195.31:18543/XXXXXX/vasaService session state (TransportError) - recreating soap

2016-10-18T03:39:45.704Z info vvold[6039B70] [Originator@6876 sub=Default] VasaSession::InitSoap: Soap client deleted successfully

2016-10-18T03:39:45.704Z info vvold[6039B70] [Originator@6876 sub=Default] VasaSession::InitSoap: Master soap client created successfully

2016-10-18T03:39:45.704Z info vvold[6039B70] [Originator@6876 sub=Default] VasaSession::InitSoap: _masterSoap=02c70940, iomode=33558544

2016-10-18T03:39:45.704Z info vvold[6039B70] [Originator@6876 sub=Default] VasaSession::InitSoap VVold using 15 secs for soap connect timeout

2016-10-18T03:39:45.704Z info vvold[6039B70] [Originator@6876 sub=Default] VasaSession::InitSoap VVold using 75 secs for soap receive timeout

2016-10-18T03:39:46.270Z warning vvold[6039B70] [Originator@6876 sub=Default] vvol_ssl_auth_init: Will skip CRL check as env variable VVOLD_DO_CRL_CHECK is not set!

2016-10-18T03:39:46.270Z info vvold[6039B70] [Originator@6876 sub=Default] VasaSession::KillAllConnections VP (vvol), purged 0 connections, 0 currently active, new genId (2978) (broadcast wakeup to all threads waiting for free connection)

2016-10-18T03:39:46.287Z error vvold[6039B70] [Originator@6876 sub=Default] VasaSession::DoSetContext: setContext for VP vvol (url: https://100.115.195.31:18543/XXXXXXX/vasaService) failed [connectionState: AuthorizationError]: INVALID_LOGIN (SSL_ERROR_SSL

--> error:14082174:SSL routines:ssl3_check_cert_and_algorithm:dh key too small / SSL_connect error in tcp_connect())

2016-10-18T03:39:46.287Z error vvold[6039B70] [Originator@6876 sub=Default]

--> VasaOp::ThrowFromSessionError [#21779]: ===> FINAL FAILURE getEvents, error (INVALID_SESSION / Bad session state (TransportError)) VP (vvol) Container (vvol) timeElapsed=583 msecs (#outstanding 0)

2016-10-18T03:39:46.287Z error vvold[6039B70] [Originator@6876 sub=Default] VasaSession::EventPollerCB VP vvol: getEvents failed (INVALID_SESSION, Bad session state (TransportError)) [session state: TransportError]

2016-10-18T03:40:15.540Z info vvold[5FF8B70] [Originator@6876 sub=Default] VVolUnbindManager::UnbindIdleVVols called

2016-10-18T03:40:15.540Z info vvold[5FF8B70] [Originator@6876 sub=Default] VVolUnbindManager::UnbindIdleVVols done for 0 VVols

2016-10-18T03:40:16.297Z info vvold[5B97B70] [Originator@6876 sub=Default]

--> VasaOp::EventPollerCB [#21781]: ===> Issuing 'getEvents' to VP vvol (#outstanding 0/4) [session state: TransportError]

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

While we executed the ESXcli command of "esxcli storage vvol vasaprovider list "on the ESXi host,we found that the "Status" of the VP was "syncError".

Otherwise,if we run the command of "esxcli storage vvol storagecontainer list",we could see the status of the VVOL datastore was "inaccessible"

 

We didnot quite sure if there was something wrong with the SSL protocol and where need we modify.

Does anybody have any suggestions to this issue please?

Thank you very much!

 

↧
Viewing all 1860 articles
Browse latest View live