All Posts

HI, How can we get the vcenter metrics via API or via pyvmomi like CPU, RAM and Storage usage. Which is already being displayed in the vCenter UI.  vCenter UI is using this URL to pull it on the ... See more...
HI, How can we get the vcenter metrics via API or via pyvmomi like CPU, RAM and Storage usage. Which is already being displayed in the vCenter UI.  vCenter UI is using this URL to pull it on the UI. Is there a Similar API where we can use it ? https://{vCenter}/ui/data/urn:vmomi:Folder:group-d1:UUID?model=com.vmware.vsphere.client.folder.model.FolderSummaryData    
Trying to upload a OVF using latest OVFTOOL Failed with the Message "Error: Connection error: Failed to connect to host due to URL using bad/illegal format or missing URL, please see the logs for mor... See more...
Trying to upload a OVF using latest OVFTOOL Failed with the Message "Error: Connection error: Failed to connect to host due to URL using bad/illegal format or missing URL, please see the logs for more details" - The URL is correct and worked on older versions. On Verbose log I can see that login to vcloud director is fine. Logs 3-04-05T06:09:29.991+02:00 verbose OVFTool[2995813] [Originator@6876 sub=Default] Initializing new curl session 2023-04-05T06:09:29.992+02:00 warning OVFTool[2995813] [Originator@6876 sub=Default] No Proxy Certificate specified. 2023-04-05T06:09:29.993+02:00 verbose OVFTool[2995823] [Originator@6876 sub=Default] Curl_perform error code 3 (URL using bad/illegal format or missing URL) 2023-04-05T06:09:29.993+02:00 verbose OVFTool[2995813] [Originator@6876 sub=Default] CURL error buffer: 2023-04-05T06:09:29.993+02:00 verbose OVFTool[2995813] [Originator@6876 sub=Default] Curl session torn down 2023-04-05T06:09:29.994+02:00 verbose OVFTool[2995813] [Originator@6876 sub=Default] Curl session torn down Error: Connection error: Failed to connect to host due to URL using bad/illegal format or missing URL, please see the logs for more details 2023-04-05T06:09:29.997+02:00 verbose OVFTool[2995813] [Originator@6876 sub=Default] Backtrace: --> [backtrace begin] product: VMware Workstation, version: e.x.p, build: build-20459872, tag: OVFTool, cpu: x86_64, os: linux, buildType: release --> backtrace[00] libvmacore.so[0x0046C3E8] --> backtrace[01] libvmacore.so[0x00229F4F]: Vmacore::System::Stacktrace::CaptureWork(unsigned int) --> backtrace[02] libvmacore.so[0x00210C92]: Vmacore::System::SystemFactory::CreateQuickBacktrace(Vmacore::Ref<Vmacore::System::Backtrace>&) --> backtrace[03] libvmacore.so[0x001C73CD]: Vmacore::Throwable::Throwable(std::string&&) --> backtrace[04] ovftool.bin[0x001E38EF] --> backtrace[05] ovftool.bin[0x002AADA6] --> backtrace[06] ovftool.bin[0x002EA24D] --> backtrace[07] ovftool.bin[0x002EC47B] --> backtrace[08] ovftool.bin[0x002C59EE] --> backtrace[09] ovftool.bin[0x003578AF] --> backtrace[10] ovftool.bin[0x003584ED] --> backtrace[11] ovftool.bin[0x00361C3A] --> backtrace[12] ovftool.bin[0x002C92C9] --> backtrace[13] ovftool.bin[0x0028D5B5] --> backtrace[14] ovftool.bin[0x001B7443] --> backtrace[15] libc.so.6[0x00024083] --> backtrace[16] ovftool.bin[0x001C05F5] --> [backtrace end] Completed with errors   Is there a solution or workaround to fix it?
We are trying to have a single content library per vCenter. Each vCenter has multiple datacenters and host clusters. No storage is shared among all the hosts. Is this possible? We need to have ISOs m... See more...
We are trying to have a single content library per vCenter. Each vCenter has multiple datacenters and host clusters. No storage is shared among all the hosts. Is this possible? We need to have ISOs mountable by VMs, and also store VM templates in the content library. Thanks, Khare
We had the same issue and we had the same problem. Most notably that the vCLS systems were orphaned in the vCenter inventory, and the administrator@vsphere.local account had "No Permission" to resol... See more...
We had the same issue and we had the same problem. Most notably that the vCLS systems were orphaned in the vCenter inventory, and the administrator@vsphere.local account had "No Permission" to resolve the issue from the vCenter DCLI. (Which is disturbing, given that even the owner of the system can't resolve issues with the vCLS systems.) We tried: - deleting he vCLS systems from storage (they were already orphaned) - deleting them using the dcli on the vCenter itself (no permission for the administrator@vsphere.local account - which is an affront to the natural order of the Universe) - Enabling Retreat Mode (setting the Advanced Settings for the specific cluster, disabling the vCLS feature, rebooting the vCenter, then enabling the vCLS mode) The ONLY thing that worked is the KBB above. NOTE: That KBB will generate MANY error even then it works. 
Hello, I have a question, is it advisable to modify the powershell powercli function --> update-vmfsdatastore ? We want to migrate the vmfs disk file which contains within the same cluster and upgr... See more...
Hello, I have a question, is it advisable to modify the powershell powercli function --> update-vmfsdatastore ? We want to migrate the vmfs disk file which contains within the same cluster and upgrade it to vmfs 6, the order of the upgrade would be 1st datastore will be a temporary 2nd datastore will be the datastore1 --> I will be moving the vmfs 5 disk file to temporarydatastore, when datastore1 becomes empty then I want to upgrade to vmfs 6 using powershell powercli. So in total I want to upgrade 10 datastores. Is it advisable to make changes to the existing powercli Update-vmfsDatastore function? For more clarity, I can share the existing powershell script
Hi,   does anyone had used a git checkout script inside of a vro workflow? Like checking out ansible or terraform yaml files and execute them directly with the ansible or terraform binary? Terraf... See more...
Hi,   does anyone had used a git checkout script inside of a vro workflow? Like checking out ansible or terraform yaml files and execute them directly with the ansible or terraform binary? Terraform could also be stored in the git repo and will be used to execute the yaml files. I really dislike the integration in vra where you need a complete k8s-cluster which is imho a really big overhead.  
Please login to customer connect portal > Support >get support>file non technical support request. You can initiate chat with our dedicated team they will assist you on this.Good morning, please send... See more...
Please login to customer connect portal > Support >get support>file non technical support request. You can initiate chat with our dedicated team they will assist you on this.Good morning, please send me the current residency certificate for 2022
From my understanding, internally, Vim::get_view() also retrieves from the VM Inventory view list. Eg: Same code in  PyVmomi to get VM object using vm_moid # vm_morref: "vm-xx" or "vim.VirtualMac... See more...
From my understanding, internally, Vim::get_view() also retrieves from the VM Inventory view list. Eg: Same code in  PyVmomi to get VM object using vm_moid # vm_morref: "vm-xx" or "vim.VirtualMachine:vm-xx" def getVMFromMOR(si, vm_moref): vm_obj = None view_ref = si.content.viewManager.CreateContainerView(container=si.content.rootFolder, type=[pyVmomi.vim.VirtualMachine], recursive=True) for managed_object_ref in view_ref.view: if vm_moref in str(managed_object_ref): vm_obj = managed_object_ref break return vm_obj  
hi! im unable to create a new windoes 10 virtual machine on my mbp pro  macos ventura pls help! i keep getting this error! i tried everything re installing and stuff! it happened after i updated f... See more...
hi! im unable to create a new windoes 10 virtual machine on my mbp pro  macos ventura pls help! i keep getting this error! i tried everything re installing and stuff! it happened after i updated from vmware fusion 12 :(( 
I have vm moref_id, want to retrieve vm object with one query?  like in perl  my $vm = Vim::get_view(mo_ref => $vm_moref);   need same on python using pyvmomi utility.    
Hi,   is there anywhere documented which runtime variables are autogenerated, when a workflow is started? I want to have like the scriptable task name or the workflow name which just has started. ... See more...
Hi,   is there anywhere documented which runtime variables are autogenerated, when a workflow is started? I want to have like the scriptable task name or the workflow name which just has started. No, the "arguments.callee.name.substr(6)" does not work. The variable arguments seems not to be defined. How do i figure out, which variables are generated at runtime as so calles global constants ? That there are global constants is documented in the developers guide for vra 8 but not which. Does someone have a full list or a link to a documentation? Like the workflow object is available but where is it documented ? With "workflow.currentworkflow.name" i can get the actual workflow name but where is kind of a object explorer for it? Which methods does it have? Which attributes ? Thank you in advance !!    
You found the problem, but what is the solution? How do you handle a multihomed vcenter?
Use vSphere SOAP-based (vSphere Management SDK) APIs to get the API sessions. API: SessionManager  sessionList* UserSession[] The list of currently active sessions.   To get your API se... See more...
Use vSphere SOAP-based (vSphere Management SDK) APIs to get the API sessions. API: SessionManager  sessionList* UserSession[] The list of currently active sessions.   To get your API sessions, compare the client machine's IP address and application name with the IpAddress and UserAgent of the UserSession object.   Sample code:   public void printUserSessions(String vCenterServer, String userName, String password) { try { si = new ServiceInstance(new URL("https://" + vCenterServer + "/sdk"), userName, password, false); SessionManager sm = si.getSessionManager(); UserSession[] usList = sm.getSessionList(); for (UserSession us : usList) { System.out.println("Client IPAddress::" + us.getIpAddress()); System.out.println("Session Username::" + us.getUserName()); System.out.println("Application/UserAgent::" + us.getUserAgent()); System.out.println("--------------------------------------------------"); } } catch (Exception e) { System.err.println("Error ServiceInstance::" + e.getLocalizedMessage()); } }      
Asking here since I may have asked in the wrong location... Im using Terraform to build VM's. We have specific roles defined for VM's (app, web, login, etc). In my main.tf I have the computer cluste... See more...
Asking here since I may have asked in the wrong location... Im using Terraform to build VM's. We have specific roles defined for VM's (app, web, login, etc). In my main.tf I have the computer cluster name defined, server/s gets built, configured and all is well. We currently have multiple clusters in vCenter. What Im running into now is lets say we have 8 servers for each role. I want terraform to balance them across the multiple clusters in vCenter and not place all the web servers on one cluster. How can I get VMWare to NOT put all 8 servers for a specific role on one host in the cluster? Either put 2 from each role type on 4 servers, or 4 on 2 different servers? I've used Anti-Affinity rules before but I dont think theres a way, using Terraform, to tell it which anti-affinity rule to use when deployed and the vm's need to be created first before adding them to a VM/Host rule?
Hello Folks, I am getting to know the api for vmware(ViewAdmin 8, 2111) but unfortunately the solution provided to get this csv is with powercli. Unfortunately my environment does not have these mod... See more...
Hello Folks, I am getting to know the api for vmware(ViewAdmin 8, 2111) but unfortunately the solution provided to get this csv is with powercli. Unfortunately my environment does not have these modules and I am not able to install them. I have looked at the swagger ui section and do not see the endpoint for this. Here is the pictures where I show you the steps of what I like to accomplish from the api query. 1) On picture one I select the subcategory Sessions from Monitor 2) After the query is made there is a table that is created and you have the option of downloading a csv. That is displayed on two.png. 3) I have a little snippet you can view on three.png Thanks.
Hello All. I am currently capturing hardware related parameters in Esxi (Eg. Fan, Temperature, Voltage, Power, etc.) as part of our task. While there are specific MIB's related to VMWare i am able t... See more...
Hello All. I am currently capturing hardware related parameters in Esxi (Eg. Fan, Temperature, Voltage, Power, etc.) as part of our task. While there are specific MIB's related to VMWare i am able to get the hardware components associated with Esxi I am not able to fetch the hardware values associated with each of the hardware information directly from the VMWare MIB's Is there any specific MIB's where i can get values of the hardware components associated with Esxi.   It would be great if someone has a solution to the above question. 
Hi all, Now we are using the VMware Daemon Software Development Kit to develop the esxcli-plugin, however it has the limitation that we can only output the result at the end of the plugin executaion... See more...
Hi all, Now we are using the VMware Daemon Software Development Kit to develop the esxcli-plugin, however it has the limitation that we can only output the result at the end of the plugin executaion(as the xml format), and we would like to output something in real-time when the plugin executed instead. Is there any way to output in real-time when the esxcli plugin is executed?            
When I use the TagStub.get(String tagId) method in vsphereautomation-client-sdk-4.0.0.jar to get the tag multiple times concurrently, a 503 status code is returned to me. If I don't use concurrency a... See more...
When I use the TagStub.get(String tagId) method in vsphereautomation-client-sdk-4.0.0.jar to get the tag multiple times concurrently, a 503 status code is returned to me. If I don't use concurrency and reduce the number of interface calls, everything is normal
Below python SDK script taking about ~4 mili sec (which lists all required attributes).  real 0m4.137s user 0m3.021s sys 0m0.074s similar script on perl VMware SDK taking 1 sec. Can someone help ... See more...
Below python SDK script taking about ~4 mili sec (which lists all required attributes).  real 0m4.137s user 0m3.021s sys 0m0.074s similar script on perl VMware SDK taking 1 sec. Can someone help me improve the execution to nearly 1 mili sec similar to perl script.    [$$]# cat getallvms2.py #!/usr/bin/env python # VMware vSphere Python SDK # Copyright (c) 2008-2021 VMware, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """ Python program for listing the VMs on an ESX / vCenter host """ import re from pyVmomi import vmodl, vim from tools import cli, service_instance def print_vm_info(virtual_machine): """ Print information for a particular virtual machine or recurse into a folder with depth protection """ vm_config = {} summary = virtual_machine.summary host_ref = virtual_machine.runtime.host if not host_ref: print("Can't find host ref") accessibility = summary.runtime.connectionState extra_config = virtual_machine.config.extraConfig vname = summary.config.name uuid = summary.config.uuid if uuid: vm_config.update({ "uuid": uuid }) iuuid = summary.config.instanceUuid if iuuid: vm_config.update({ "instanceUuid": iuuid }) cversion = virtual_machine.config.version if cversion is not None: vm_config.update({ "version": cversion }) change_tracking_enable = virtual_machine.config.changeTrackingEnabled if change_tracking_enable is not None: vm_config.update({ "changeTrackingEnabled": "1" if change_tracking_enable else "0" }) change_tracking_support = virtual_machine.capability.changeTrackingSupported if change_tracking_support is not None: vm_config.update({ "changeTrackingSupported": "1" if change_tracking_support else "0"}) ctemplate = summary.config.template if ctemplate: vm_config.update({ "template": "1" if ctemplate else "0" }) gfullname = summary.config.guestFullName if gfullname: vm_config.update({"guestFullName": gfullname}) devs = virtual_machine.config.hardware.device extra_config = virtual_machine.config.extraConfig if extra_config: config_name = virtual_machine.config.name for entry in extra_config: if entry.key == 'unitrends.vm.type': if entry.value in ['instant_recovery_audit', 'replica_vm', 'virtual_appliance']: debug_message("Skipping VM %s since .it was created for VMware IR." % config_name) exclude_vm_from_inventory = 1 break print("Name : ", summary.config.name) print("Template : ", summary.config.template) print("Path : ", summary.config.vmPathName) print("Guest : ", summary.config.guestFullName) print("Instance UUID : ", summary.config.instanceUuid) print("Bios UUID : ", summary.config.uuid) annotation = summary.config.annotation if annotation: print("Annotation : ", annotation) print("State : ", summary.runtime.powerState) if summary.guest is not None: ip_address = summary.guest.ipAddress tools_version = summary.guest.toolsStatus if tools_version is not None: print("VMware-tools: ", tools_version) else: print("Vmware-tools: None") if ip_address: print("IP : ", ip_address) else: print("IP : None") if summary.runtime.question is not None: print("Question : ", summary.runtime.question.text) print("") def main(): """ Simple command-line program for listing the virtual machines on a system. """ parser = cli.Parser() parser.add_custom_argument('-f', '--find', required=False, action='store', help='String to match VM names') args = parser.get_args() si = service_instance.connect(args) try: content = si.RetrieveContent() container = content.rootFolder # starting point to look into view_type = [vim.VirtualMachine] # object types to look for recursive = True # whether we should look into it recursively container_view = content.viewManager.CreateContainerView( container, view_type, recursive) children = container_view.view if args.find is not None: pat = re.compile(args.find, re.IGNORECASE) for child in children: if args.find is None: print_vm_info(child) else: if pat.search(child.summary.config.name) is not None: print_vm_info(child) except vmodl.MethodFault as error: print("Caught vmodl fault : " + error.msg) return -1 return 0 # Start program if __name__ == "__main__": main()  
But if ESXi is not connected with any vCenter, where should I get the certification?