All Posts

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!  
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    
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, 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.  
I have followed this article to set up Azure DevOps to revert a snapshot: https://learn.microsoft.com/en-us/azure/devops/pipelines/targets/vmware?view=azure-devops I managed to get it working w... See more...
I have followed this article to set up Azure DevOps to revert a snapshot: https://learn.microsoft.com/en-us/azure/devops/pipelines/targets/vmware?view=azure-devops I managed to get it working with SDK 7.0 U3f and adding Java 8 (jdk1.8.0_221) to the path-variable. But because of Visual Studio 2022 installing Microsoft Build of OpenJDK with Hotspot 11, I have to get it working with this version of Java. According to the release notes, SDK 7.0 U3f should support Java 11. Azure DevOps generates this command: C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot\bin\java.exe -classpath vmOpsTool-1.0.jar;C:\vSphereSDK\SDK\vsphere-ws\java\JAXWS\lib\vim25.jar VmOpsTool -snapshotOps restore -snapshotName DeploymentReadySnapshot -timeout 60 -vCenterUrl https://XXXXXXXXXXXXXX/sdk/vimService -vCenterUserName *** -vCenterPassword *** -vmList VM-DPL-001 -targetdc BuildManagement -skipca true And this is the output: 2023-06-02T10:50:33.3249971Z Parsing input parameters... 2023-06-02T10:50:33.3342795Z Checking for active session... 2023-06-02T10:50:33.3345005Z No active session found.. establishing new session. 2023-06-02T10:50:34.3238705Z java.lang.NoClassDefFoundError: jakarta/xml/ws/Service How can I get the SDK working with Java 11?
Hi Folks, The new vSphere 8.0 Update 1 release brings some new features and resolved issues.   What's new for vSphere Client extensibility and remote plug-ins: Ability to define action separator... See more...
Hi Folks, The new vSphere 8.0 Update 1 release brings some new features and resolved issues.   What's new for vSphere Client extensibility and remote plug-ins: Ability to define action separators - Plug-ins are now able to define separators between their menu actions. This can be achieved by specifying a new object {"type":"separator"} between the plug-in defined actions. Ability to define multiple summary cards - Plug-ins are now able to define up to 3 cards in a given vSphere object's summary view. In addition, each card can have its own icon and title. If no icon or title are provided, the default plug-in icon and name will be used. This can be achieved by specifying an array of views instead of a single view in a given object's summary section. Integrated Solution Installation enhancements - Ability to specify required vCenter Server version support. Integrated solutions can now specify which vCenter Server version they support. This will prevent users from installing the solution on a vCenter Server with lower than the specified version. To achieve this, the vmw.vsphereui.solutioninstall.requiredVcVersion property must be specified in the solution's OVF. Remote Plug-in Sample - Upgraded Angular and Clarity versions for improved security. Extension Registration Tool - The extension-registration tool now accepts a list of events. This means that plug-in registration may include a list of plug-in defined events.   Resolved Issues: Actions are now ordered in the way they are written in the plugin.json. Fixed an issue where a plug-in may be shown as Partially Deployed. The plug-in action menus are properly live refreshed when the user shows/hides a plug-in. Fixed an issue where an Incompatible plug-in could be shown as Failed. The htmlClientSdk is no longer cached by the browser and does not break plug-in upgrades. Fixed Confirmation Modal layout issues. Plug-in deployment will no longer fail if it is using an unknown locale. This means that adding a new supported language to the vSphere Client and the plug-in will not break the plug-in's compatibility with older vSphere Client versions. Fixed an issue where an Incompatible plug-in could not be redeployed.   Known Issues: Multi Manifest Issue - The Multi Manifest feature requires a default manifest called plugin.json. If a plug-in is using the multi manifest feature, it is required that at least one of the plug-in manifests is named plugin.json. It is recommended that the least desired plug-in manifest is named plugin.json and placed at the bottom of the array of manifests.   For more information and code examples, check the official SDK documentation page and the release notes. As always, feel free to share your feedback and ideas with us. Best Regards, Denis
I've tried to use the code as in : https://vdc-download.vmware.com/vmwb-repository/dcr-public/1cad846e-1b2f-406f-ba81-34bd77d9bad9/dfb037cd-ff63-4d5e-b432-9a4aa790168f/doc/GUID-ED253BD0-E9B1-4588-95... See more...
I've tried to use the code as in : https://vdc-download.vmware.com/vmwb-repository/dcr-public/1cad846e-1b2f-406f-ba81-34bd77d9bad9/dfb037cd-ff63-4d5e-b432-9a4aa790168f/doc/GUID-ED253BD0-E9B1-4588-958D-577A667F5AD9.html But client.createStub() , si.RetrieveContent() methods are not detected on the respective classes like for example: "The method RetrieveContent() is undefined for the type ServiceInstance".
Please give a complete answer with code sample ....
Hi Team, I am using VSphere automation java sdk to create static ip and dns, getting below error. Also I have attached the code snippet. Please help fix this issue. com.vmware.vim25.InvalidReques... See more...
Hi Team, I am using VSphere automation java sdk to create static ip and dns, getting below error. Also I have attached the code snippet. Please help fix this issue. com.vmware.vim25.InvalidRequest at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) at java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128) at java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:347) at java.base/java.lang.Class.newInstance(Class.java:645) at com.vmware.vim25.ws.XmlGen.fromXml(XmlGen.java:205) at com.vmware.vim25.ws.XmlGen.parseSoapFault(XmlGen.java:82) at com.vmware.vim25.ws.WSClient.invoke(WSClient.java:134) at com.vmware.vim25.ws.VimStub.reconfigVM_Task(VimStub.java:1865) at com.vmware.vim25.mo.VirtualMachine.reconfigVM_Task(VirtualMachine.java:337) at com.hcl.mcm.devops.vcenter.vm.ConfigNetwork.configureStaticIp3(ConfigNetwork.java:79) at com.hcl.mcm.devops.vcenter.vm.ConfigNetwork.run(ConfigNetwork.java:235) at com.hcl.mcm.devops.vcenter.vm.VmwareAutomationBase.execute(VmwareAutomationBase.java:166) at com.hcl.mcm.devops.vcenter.vm.ConfigNetwork.main(ConfigNetwork.java:241)   Thanks, Siva      
Hi @stoevm  Thanks for checking this issue and replying I will go through shared docs and come back. **We are giving support for remote-vcp from vCenter version 8.
Hi kumargandhi With the new forwarding feature implemented in the SDK you do not even need the correct API endpoint in the UI. All you need is the target VC for which the call is intended. The clo... See more...
Hi kumargandhi With the new forwarding feature implemented in the SDK you do not even need the correct API endpoint in the UI. All you need is the target VC for which the call is intended. The clone-ticket can be send to any VC in the linked environment, and it will be forwarded to the VC from which vSphere Client the plugin is used. (this feature works for VCs >= 7.0u2 version) More information on this can be found in the vsphere client docs:  https://vdc-download.vmware.com/vmwb-repository/dcr-public/009a36e4-2f17-46fc-ac27-ea9f8bf8c923/9988800b-a054-42d0-ae61-18f0ceafff24/vSphereClientSDK-801.pdf Section: How to Delegate Session Authority to the Plug-in Server If your plugin is to work after 7.0u2 you can take advantage of this new feature. Otherwise before 7.0u2 the plugin needs to trust all vCenters in the linked environment and use the getApiEndpoint. The getApiEndpoint is not dependent on the linked environment, basically the guid is the one which determines for which VC the vsphere client will clone the session. This means that the api-endpoint is the same no matter for which VC you need a cloned ticket. Again it is best to use the new functionality which eliminates the need for the getApiEndpoint API call. 
Hi @Denis_Chorbadzh  I checked the Java code for getUserSession()...In general what it does is read the values defined in the Configuration class, like, there are few constants defined in the class,... See more...
Hi @Denis_Chorbadzh  I checked the Java code for getUserSession()...In general what it does is read the values defined in the Configuration class, like, there are few constants defined in the class, and Java backend just sets and gets these values?, looks like they are hardcoded or reading from env fields? (Not entirely sure, I am not a Java dev) But, the getUserSession() API from the Html bridge JavaScript actually gives the serversInfo and linkedServersInfo dynamically. PFB screenshot. It's sad that htmlClientSdk (JavaScript APIs) doesn't have such API!!. We have a linked vCenters setup and we are having trouble fetching the right api-endpoint that we need to set in the headers for our API calls. PFB screenshot of out current setup. We have two plugin instances, each with its own vCenter. Now the problem is getting the right api-endpoint for the selected plugin instance. PFB code for the three headers we set in the remote-vcp UI code.   // Below are the headers we set for UI API calls. getHttpClientHeaders(): any { return { "vcenter-guid": this.getGUID(), "vmware-api-ui-endpoint-url": this.getUIApiEndpointUrl(), "vmware-api-session-id": this.getVMwareAPISessionId() }; } // Below fetching the API end point, but what about for linked setup!! getUIApiEndpointUrl() { return this.gs.getClientSdk().app.getApiEndpoints().uiApiEndpoint.fullUrl; }   Can you please provide some feedback? Thanks.
I have used the following Postcustomization script. Which creates a random password sends it password to the guestinfo variable and makes the user reset it upon login. #!/bin/bash log=/var/log/cust... See more...
I have used the following Postcustomization script. Which creates a random password sends it password to the guestinfo variable and makes the user reset it upon login. #!/bin/bash log=/var/log/cust_output.log if [[ "x${1}" = "xprecustomization" ]]; then password=$(openssl rand -base64 12) echo "root:$password" | chpasswd vmtoolsd --cmd "info-set guestinfo.custom.password $password" passwd --expire root elif [[ "x${1}" = "xpostcustomization" ]]; then echo "customization complete..." >> ${log} fi
ok everyone, I don't know where to post this one and the only thing I can find for automation is "SDK for Perl Discussions" but I'm not trying to use perl... I'm so very new to ESXi and have been tr... See more...
ok everyone, I don't know where to post this one and the only thing I can find for automation is "SDK for Perl Discussions" but I'm not trying to use perl... I'm so very new to ESXi and have been trying to automate deployments because my new job requires me to install ESXi on machines, send them out to serve their purpose for a week, when they return, I wipe and reimage. I know you are able to setup a PXE to image them, but I would like to take it a little further. So is it possible to do the following... During the PXE boot, it runs a script that will look at VNIC0 to see what the MAC address is, based on the MAC address it will jump to a part of the script for specific deployment configurations (IE: IP address, username addition, etc...), but deploy to a specific NVME drive (I believe all of them have the same NVME drives but I need to install to a 128GB drive, not the other larger ones) I'm not asking anyone to do all the work for me, please point me in the right direction. I'm having a hard time following the documentation because am a visual / hands on learner and have a hard time focusing on reading, I don't need a DHCP server but that's all I seem to be finding online.   
request: https://xxx.xxx.xxx.xx/rest/com/vmware/content/library  response:  { "value": [ "626b7ee9-94ef-47f2-a8d3-28312186aa67", "568dd687-fa79-4400-8c22-ad3731fbccaf", "5fe3c57f-ac1d... See more...
request: https://xxx.xxx.xxx.xx/rest/com/vmware/content/library  response:  { "value": [ "626b7ee9-94ef-47f2-a8d3-28312186aa67", "568dd687-fa79-4400-8c22-ad3731fbccaf", "5fe3c57f-ac1d-4c18-aa4a-dc204372ffd8" ] }   获取单个library时404。response 中的id已存在。   request: https://xxx.xxx.xxx.xx /rest/com/vmware/content/library/626b7ee9-94ef-47f2-a8d3-28312186aa67 response { "name": "com.vmware.vapi.rest.httpNotFound", "localizableMessages": [ { "defaultMessage": "Not found.", "id": "com.vmware.vapi.rest.httpNotFound" } ], "majorErrorCode": 404 }
comment retrouver le mot de passe root ssh ? malheureusement nous l'avons perdu how to find ssh root password? unfortunately we lost it
Hello. I have a bit of a problem with vCenter API trying to set a customization on a machine (vm/guest/customization API call). I create the machine via the API and set sysprep customization there. T... See more...
Hello. I have a bit of a problem with vCenter API trying to set a customization on a machine (vm/guest/customization API call). I create the machine via the API and set sysprep customization there. Then I let it run for 10 minutes to give customization time to finish and turn it off via API as well. After this, I wish to set IP configuration on the machine using the API, but always end up with the 400, not allowed in current state error. This makes little sense to me as the machine is in powered off state (which I can confirm by calling GET on vm/power API endpoint) and I should only be getting this error if it is not powered off. Here are 2 slightly different configs I tried to pass in, for completeness: { "spec": { "configuration_spec": {}, "global_DNS_settings": { "dns_servers": [ "10.10.10.10", "10.10.10.13" ], "dns_suffix_list": [] }, "interfaces": { "adapter": { "ipv4": { "type": "STATIC", "ip_address": "10.142.142.142", "prefix": 24, "gateways": [ "10.142.142.1" ] }, "ipv6": { "type": "DHCP" }, "windows": { "dns_servers": [ "10.10.10.10", "10.10.10.13" ] } } } } } { "spec": { "configuration_spec": {}, "global_DNS_settings": {}, "interfaces": { "adapter": { "ipv4": { "type": "STATIC", "ip_address": "10.142.142.142", "prefix": 24, "gateways": [ "10.142.142.1" ] }, "ipv6": { "type": "DHCP" }, "windows": { "dns_servers": [ "10.10.10.10", "10.10.10.13" ] } } } } } Any idea why this is failing would be appreciated, as it does not make much sense to me. VCenter version 7.0.3