pyvmomi-community-samples
pyvmomi-community-samples copied to clipboard
A place for community contributed samples for the pyVmomi library.
Hello, I am trying to get the events for the following: => DVS and DVS-PG (DPG) Events like Add, Delete. => Regular PG events like Add, delete => VLAN modified...
I run some tasks with celery,one task will established a connect,how to disconnect the connects? tcp 0 0 192.168.4.81:51665 192.168.24.28:443 ESTABLISHED off (0.00/0/0) tcp 0 0 192.168.4.81:51669 192.168.24.28:443 ESTABLISHED off...
Trying to use the VmomiJSONEncoder on ComputeResource or ClusterComputeResource objects. I have tried it two different ways but keep getting an InvalidProperty error from pyvmomi. Could you please point me...
Traceback (most recent call last): File "./add_nic_to_vm-new.py", line 165, in main() File "./add_nic_to_vm-new.py", line 158, in main add_nic(serviceInstance, vm, args.port_group) File "./add_nic_to_vm-new.py", line 113, in add_nic nic_spec.device.backing.deviceName = network File...
Hello, I need to create a new vsphere.local user using api. So far I have not been successful. I tried something like: user_spec = vim.HostAccountSpec () user_spec.id = 'test' user_spec.password...
I am currently writing a cleanup script wherein, I am trying to clean the inactive datastores from a vcenter, but I can't find any such function for that. Need help...
I am working on getting vsan performance information and I can query disk-group info for all disk groups. It returns perf data by uuid. However, the configuration data does not...
All the samples(https://github.com/vmware/pyvmomi-community-samples/blob/master/samples/get_vm_storage_policy.py#L82, https://github.com/vmware/pyvmomi-community-samples/blob/master/samples/list_vm_storage_policy.py#L36, https://github.com/vmware/pyvmomi-community-samples/blob/master/samples/tools/pbmhelper.py#L44) that use SoapStubAdapter are using cookies for authentication. Can we have any sample of SoapStubAdapter that uses certificates instead? We can set certificates using this...
Is it possible to itemize vcenters? The existing examples all start by connecting to a specific host and that works great. I'm looking for a dynamic way to itemize the...
Hello, I try to bind a vmk to an iscsi software adapter but iscsi manager don't have any attribute: dir(hosts[0].configManager.iscsiManager) ['__class__', '__delattr__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__new__', '__reduce__', '__reduce_ex__',...