All Posts

Hi. I have a plan to perform a snapshot deletion. (ESXi 7) I am looking at the following KB I know that I cannot cancel the deletion of a snapshot in the middle. I know that I can't cancel the snap... See more...
Hi. I have a plan to perform a snapshot deletion. (ESXi 7) I am looking at the following KB I know that I cannot cancel the deletion of a snapshot in the middle. I know that I can't cancel the snapshot deletion in the middle because it will destroy the data. https://kb.vmware.com/s/article/1023657 I am assuming that if the disk is large, the deletion will take longer. I asked because the building might lose power in the middle of deleting snapshots. If the building loses power, it will shut down the ESXi host. Is there any way to cancel deleting a snapshot in the middle if the deletion takes a long time and does not finish ? I understand that data can be corrupted.
When we create Anti-Affinity and then Affinity Rule for the same VMs. The Affinity rule should become invalid(enabled = false)  i.e. Anti-Affinity conflicting with Affinity Rule.   API to get the ... See more...
When we create Anti-Affinity and then Affinity Rule for the same VMs. The Affinity rule should become invalid(enabled = false)  i.e. Anti-Affinity conflicting with Affinity Rule.   API to get the status: ClusterComputeResource -> ClusterConfigInfo -> ClusterRuleInfo -> isEnabled() eg: boolean status = ruleInfo[1].getInfo().isEnabled();   Data Object - ClusterRuleInfo(vim.cluster.RuleInfo)   enabled (boolean) ==> Flag to indicate whether or not the rule is enabled. Set this property when you configure the rule. The default value is false (disabled). If there is a rule conflict, the Server can override the setting to disable a rule.
Make sure to add idm_protocol and server_endpoints ( in active_directory_over_ldap) eg: "idm_protocol": "LDAP"  and "server_endpoints": [ "ldap://<server>:<port>" ]  
Hi, Just to follow up on this - if you could provide the information from the missing link of the solutions for this, that would be great. However, in the mean-time, I put in place a short term sol... See more...
Hi, Just to follow up on this - if you could provide the information from the missing link of the solutions for this, that would be great. However, in the mean-time, I put in place a short term solution for the problem which works in my development environment (for the remote plugin architecture).  It appears this error usually occurs when your Java program tries to establish an SSL connection with a remote server, but the server's SSL certificate is not trusted by the JVM's default truststore. I am using MacOS for my development environment, for anyone else in a similar situation, this should work to get the sample to run without needing a fully-fledged certification on their VCSA: The short-term solution I used: Import the server's SSL certificate into the JVM's default truststore, using these steps: 1. Locate the JVM's default truststore file. For Java 8, this was in: /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/security/cacerts 2. Take a backup of the default truststore file to make sure you can restore it if something goes wrong. 3. Obtain the SSL certificate of the VCSA server. This can be done by connecting to the server using a web browser and exporting the certificate. Alternatively, you can use command-line tools like OpenSSL to retrieve the certificate. I used Chrome to get the .cer file. 4. Use the `keytool` command-line tool, which is provided with the Java Development Kit (JDK), to import the certificate into the truststore. Open a command prompt or terminal and navigate to the directory where `keytool` is located. 5. Run the following command to import the certificate into the truststore: keytool -import -alias <alias_name> -file <path_to_certificate_file> -keystore <path_to_truststore_file> Replace `<alias_name>` with a name you want to assign to the certificate in the truststore. Replace `<path_to_certificate_file>` with the path to the certificate file you obtained earlier. Replace `<path_to_truststore_file>` with the path to the truststore file you located in step 1. 6. When prompted, enter the password for the truststore. The default password for the JVM's default truststore is usually `changeit`. If you have changed it previously, use the updated password. 7. Verify that the certificate has been imported successfully by listing the content of the truststore: keytool -list -keystore <path_to_truststore_file> This will display the aliases of all the certificates in the truststore, including the one you just imported. By importing the server's SSL certificate into the JVM's default truststore, you make it trusted by default when your Java applications establish SSL/TLS connections to that server. You can now run the remote plugin sample code and it should work as expected to show the Chassis objects and UI elements properly.. Hope that helps for now!
I am trying to open a VMDK file on a VMFS datastore via mount but the Vixdisklib_Open() function returns error code 16063 ("The specified file is not a virtual disk"). Same API works with NFS datasto... See more...
I am trying to open a VMDK file on a VMFS datastore via mount but the Vixdisklib_Open() function returns error code 16063 ("The specified file is not a virtual disk"). Same API works with NFS datastore.  Note: we have mounted the VMFS datastore using vmfs6-tools on the ubuntu system where the VDDK is running.  After further debugging, we noticed that Vixdisklib_Open() works for MAIN vmdk file (createType="vmfs" and data file is -flat.vmdk). But it fails with the SESPARSE snapshot vmdk file (createType="seSparse" and data file is -000001-sesparse.vmdk) Are there additional parameters to set while opening SESPARSE snapshot vmdk file?  
HI, I'm having the same error when running the remote sample code for 8.0 U1: at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] Caused by: org.springframework.web.client.ResourceAccessExcepti... See more...
HI, I'm having the same error when running the remote sample code for 8.0 U1: at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] Caused by: org.springframework.web.client.ResourceAccessException: I/O error on POST request for "https://<my vcenter fqdn>:443/api/ui/vcenter/session/clone-ticket": sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target; nested exception is javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target   I've tried the links in the thread here, but unfortunately they are broken and don't exist, or don't lead anywhere with a solution any more. Could you please provide the updated link to where the solution is, or provide the solution for this please? Warren
Hi all, Our team will participate in this year's VMware Explore in Las Vegas with one session and a project in the Hackathon. The session subject is: Journey to Develop, Install and Manage a vSpher... See more...
Hi all, Our team will participate in this year's VMware Explore in Las Vegas with one session and a project in the Hackathon. The session subject is: Journey to Develop, Install and Manage a vSphere Client Plug-In. The hackathon project is open for others to join. Our project is focused on remote plugins and some new technologies to do analytics on the vCenter objects, titled: Optimising vSphere performance made easy You can use the registration form to sign for this awesome hackathon project. See you at the VMware Explore!
Hello! I'd like to know if there is a way of retrieving the identity sources using rest api or vsphere webservices api or PowerCli or whatever I can automate. I have 3 identity sources in a vCe... See more...
Hello! I'd like to know if there is a way of retrieving the identity sources using rest api or vsphere webservices api or PowerCli or whatever I can automate. I have 3 identity sources in a vCenter and I thought I could retrieve them using the rest api with the following method: https://developer.vmware.com/apis/vsphere-automation/v7.0U3/vcenter/api/vcenter/identity/providers/get/ but I only get an emtpy array. Is there any way to retrieve the identity sources of a vCenter? Thanks!  
Does VMware provide a publicly accessible sandbox environment that developers can access via the v2 Orchestrator API for the purposes of developing/testing software?
I want to use rest api to extracts the custom properties data of deployments in vRA. Upon checking vRA swagger api portal, I could not find any api that can do the job, all i could see was an api tha... See more...
I want to use rest api to extracts the custom properties data of deployments in vRA. Upon checking vRA swagger api portal, I could not find any api that can do the job, all i could see was an api that could extract all the deployments or meta data of a particular api but nothing helped.
Is it still true that we are unable to specify a datastore sub folders for .vmx and .vmdk files when using cloneVM_task() (using pyvmomi)?  I found this post: https://communities.vmware.com/t5/vSphe... See more...
Is it still true that we are unable to specify a datastore sub folders for .vmx and .vmdk files when using cloneVM_task() (using pyvmomi)?  I found this post: https://communities.vmware.com/t5/vSphere-Management-SDK/cloneVM-Task-over-datastores-and-folders/td-p/1060992 At first glance it seems that using the vim.vm.Relocatespec.DiskLocator and providing a backing spec with the location spelled out would do the trick, but it is being ignored.  I also tried using deviceChange relocation spec, but no joy for either. For example:   for device in source_vm_config.hardware.device: if isinstance( device, vim.vm.device.VirtualDisk ): #Try copying the backing spec from the VirtualDisk device #and update the fileName member with the datastore and path # e.g. "[datastoreName] Path1/Path2/vm_name/vm_name.vmdk" diskBackingInfo = device.backing diskBackingInfo.fileName = f"{datastorePathName}/{vm_name}.vmdk" diskBackingInfo.datastore = datastore #Retrieved earlier, it is a managed objct diskRelocator = vim.vm.RelocateSpec.DiskLocator( datastore = datastore, diskBackingInfo = diskBackingInfo, diskId = device.key ) disk.append(diskRelocator) #Now try a second method by doing a deviceChange, but updating the backing # of the VirtualDisk device deviceUpdate = device deviceUpdate.backing = diskBackingInfo deviceSpec = vim.vm.device.VirtualDeviceSpec( device=deviceUpdate, operation=vim.vm.device.VirtualDeviceSpec.Operation.edit) deviceChanges.append(deviceSpec) deviceChanges.append(deviceSpec) relocationSpec = vim.vm.RelocateSpec( datastore = datastore, deviceChange = deviceChanges, disk=disk, folder = destVmFolder, pool = selectedResourcePool) . . . cloneVmSpec = vim.vm.CloneSpec( location = relocationSpec, powerOn = False, template = False) task = source_vm.CloneVM_Task( folder = destFolder, name=vm_name, spec=cloneVmSpec ) vim_utils.wait_for_tasks(self.service_instance.content, [task])   We are automating a testing group of VMs that get created and cloned.  To keep things neat and tidy, I'd like to specify sub folders where the files eventually go. If CloneVM_Taks() doesn't do this, is there a recommended way to subsequently move these files and have the Virtual Machine updated with the new file locations? Thank you, Kevin    
Hoo can say me how create from  rest api active directory user and asign him role ? im try somfing like this, im login inside domain from vcenter gui but my list providers stay blank curl -k -X PO... See more...
Hoo can say me how create from  rest api active directory user and asign him role ? im try somfing like this, im login inside domain from vcenter gui but my list providers stay blank curl -k -X POST -H "vmware-api-session-id: <toke>" -H "Content-Type: application/json" \ -d '{ "active_directory_over_ldap": { "groups_base_dn": "cn=users,dc=torgsoft,dc=local", "password": "XXXXX", "server_endpoints": ["torgsoft.local"], "user_name": "administrator@torgsoft.local", "users_base_dn": "cn=users,dc=torgsoft,dc=local" }, "idm_protocol": "" }' "https://vnc.torgsoft.local/api/vcenter/identity/providers" | jq and in answer server tell me  "default_message": "Structure com.vmware.vcenter.identity.providers.create_spec has a union constraint with tag 'idm_protocol' of value '', for which the field 'active_directory_over_ldap' is not allowed to be set.",
Hello, I'm trying to make a request on vSan through wsdl, but I'm having difficulties, I can only login to the webservice, could someone help me to consume, for example, the QueryAvailablePerfMetric... See more...
Hello, I'm trying to make a request on vSan through wsdl, but I'm having difficulties, I can only login to the webservice, could someone help me to consume, for example, the QueryAvailablePerfMetric method, here's a print below of SoapUI: Thanks
Greetings Team,                         We are migrating our application from Java11 to Java17 and for virtualization I am using vim25.jar which is internally using axis-1.4.1 jar and is throwing be... See more...
Greetings Team,                         We are migrating our application from Java11 to Java17 and for virtualization I am using vim25.jar which is internally using axis-1.4.1 jar and is throwing below exception:   Caused by: java.lang.NoClassDefFoundError: com/sun/net/ssl/internal/ssl/Provider java.base/java.lang.Class.getDeclaredConstructors0(Native Method) java.base/java.lang.Class.privateGetDeclaredConstructors(Unknown Source) java.base/java.lang.Class.getConstructor0(Unknown Source) java.base/java.lang.Class.getConstructor(Unknown Source) org.apache.commons.discovery.tools.ClassUtils.newInstance(ClassUtils.java:159) org.apache.axis.AxisProperties$1.run(AxisProperties.java:181) java.base/java.security.AccessController.doPrivileged(Unknown Source) org.apache.axis.AxisProperties.newInstance(AxisProperties.java:164) org.apache.axis.components.net.SocketFactoryFactory.getFactory(SocketFactoryFactory.java:76) org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:186) org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:403) org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:137) org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) org.apache.axis.client.AxisClient.invoke(AxisClient.java:165) org.apache.axis.client.Call.invokeEngine(Call.java:2782) org.apache.axis.client.Call.invoke(Call.java:2765) org.apache.axis.client.Call.invoke(Call.java:2443) org.apache.axis.client.Call.invoke(Call.java:2366) org.apache.axis.client.Call.invoke(Call.java:1812) com.vmware.vim25.VimBindingStub.retrieveServiceContent(VimBindingStub.java:55605)     Root cause: com/sun/net/ssl/internal/ssl/Provider support is removed in Java17 and I need alternative for this provider specifically for Java17.   Is there any latest vim or any other vmware api jar available which is compatible with Java17?   I would appreciate your quick response! Thank You. Vinoth
Use VMware common infrastructure services REST APIs( CIS APIs) for Tags. APIs to create, manage, and enumerate tags & categories also query the attached tags and attached objects. Ref: https://de... See more...
Use VMware common infrastructure services REST APIs( CIS APIs) for Tags. APIs to create, manage, and enumerate tags & categories also query the attached tags and attached objects. Ref: https://developer.vmware.com/apis/vsphere-automation/latest/cis/tagging/tag_association/  
Hi @ appsysadmin, What is the API used and parameters passed? And what is the vCenter version? Also refer this steps - https://communities.vmware.com/t5/VMware-code-Discussions/Unable-to-retrie... See more...
Hi @ appsysadmin, What is the API used and parameters passed? And what is the vCenter version? Also refer this steps - https://communities.vmware.com/t5/VMware-code-Discussions/Unable-to-retrieve-performance-metric-for-a-vm/td-p/2971254    
Hi, I'm trying to find a way to retrieve the DRS rules that have conflicts using the web services api. I've been able to get the DRS rules config in the ClusterComputeResource->configuration->ru... See more...
Hi, I'm trying to find a way to retrieve the DRS rules that have conflicts using the web services api. I've been able to get the DRS rules config in the ClusterComputeResource->configuration->rule: rule = (vim.cluster.RuleInfo) [ (vim.cluster.AntiAffinityRuleSpec) { dynamicType = <unset>, dynamicProperty = (vmodl.DynamicProperty) [], key = 4, status = <unset>, enabled = true, name = 'AFLSDKH', mandatory = <unset>, userCreated = true, inCompliance = <unset>, ruleUuid = '5224c444-3cd1-084b-54d5-2576b510d49a', vm = (vim.VirtualMachine) [ 'vim.VirtualMachine:vm-1040', 'vim.VirtualMachine:vm-1044' ] }, (vim.cluster.AffinityRuleSpec) { dynamicType = <unset>, dynamicProperty = (vmodl.DynamicProperty) [], key = 5, status = <unset>, enabled = false, name = 'asdfasg', mandatory = <unset>, userCreated = true, inCompliance = <unset>, ruleUuid = '523fee15-9eaf-0a51-3276-82046d4caaf0', vm = (vim.VirtualMachine) [ 'vim.VirtualMachine:vm-1044', 'vim.VirtualMachine:vm-1040' ] } ] But I cannot find anywhere the info about the conflicts of each rule and the vms in conflict. Does anybody know how to retrieve this info? Thanks in advance.  
Hi aapsyadmin, We are having similar issue. Were you able to resolve yours? Thanks!
Hi, did you find a solution for that.    thanks 
Looks like Create Acq Spec is not created. vStats collects data only for the configured AcqSpecs. Try these steps: 1. Create AcqSpecs with POST Create AcqSpec API POST: https://{api_host}/api/s... See more...
Looks like Create Acq Spec is not created. vStats collects data only for the configured AcqSpecs. Try these steps: 1. Create AcqSpecs with POST Create AcqSpec API POST: https://{api_host}/api/stats/acq-specs Spec:   { "counters": { "cid_mid": { "cid":"power.capacity.usage.VM" } }, "interval" :"30", "expiration":"10000000000", "resources": [ { "type":"VM", "id_value":"<vm-moid>", "predicate":"EQUAL" } ] }   2. Query Data Points Data: GET: https://{api_host}/api/stats/data/dp?cid=power.capacity.usage.VM&types=VM