Questions tagged [pyvmomi]

pyVmomi is the Python SDK for the VMware vSphere API that allows you to manage ESX, ESXi, and vCenter.

pyVmomi is the Python SDK for the VMware vSphere API that allows you to manage ESX, ESXi, and vCenter.

https://github.com/vmware/pyvmomi

183 questions
0
votes
1 answer

Is it possible to import ovf directly from datastore?

I am looking for the solution to deploy ovf directly from the datastore rather than local directory
user1316502
  • 809
  • 2
  • 10
  • 21
0
votes
1 answer

How to retrieve the WWNN of a host using pyvmomi?

I want to retrieve the WWNN number of a host using pyvmomi python library? Tried using vim.host.HostBusAdapter but it doesnt provide the WWNN.
0
votes
1 answer

pyvmomi: Retrieving "Transport" information

I am trying to print out Transport Details (From the vCenter - Host > Storage Devices > Device Details > Transport > SAS (for example) using pyvmomi. This is the API I have been using as a…
v dev
  • 1
  • 1
0
votes
2 answers

vSphere Build Version via API

Is there a way do get the vsphere build versing using any API/SDK/REST? I know it's possible using powershell on vcenter for that, but it'd be great if there was another option. Like described here:…
Quirinux
  • 310
  • 2
  • 7
0
votes
0 answers

Pyvmomi 6.5 and LACP

I'm unable to create a Distributed vSwitch(DVS) with LACP support using pyvmomi 6.5 on vCenter 6.5. If I create the DVS manually using vCenter, it automatically has LACP support. However, when using jsut pyvmomi it doesn't have LACP support. …
0
votes
1 answer

How to query a datastore in a specific datacenter by name in pyvmomi

I am querying a datastore with its name in vcenter using an example of pyvmomi sample code: si = connect.SmartConnectNoSSL(host=192.168.1.2, user=Administrator, pwd=password, port=443) content = si.RetrieveContent() container =…
pylearn
  • 8,119
  • 4
  • 11
  • 12
0
votes
1 answer

Get IPs of vCenter networks using pyVmomi

I use pyVmomi to create VM on our vCenter. We have a few networks, like 'PRD-DB'. I can change the network interface of a VM to 'PRD-DB' using pyVmomi. I know that this network address is 10.125.10.0/24. But I can't find a way of getting this…
Jean Coiron
  • 632
  • 8
  • 24
0
votes
1 answer

Deploy VM from template and set VM and DNS name

I’m using pyVmomi to deploy a VM from a template on vSphere, this woks ok, the new VM get the name I sent as parameter but I want that the DNS name \ hostname will be same as VM. Is there a way to set the hostname when doing the actual clone ? If…
Epligam
  • 741
  • 2
  • 14
  • 36
0
votes
1 answer

Pyvmomi - Assign VM to specific folder with non-unique name

I'm trying to figure out how to assign a VM to a folder that does not contain a unique name. I'm currently testing with the clone_vm.py template. With the sample, I have the ability to set the folder, but it does not work correctly if there's nested…
user3704433
  • 33
  • 1
  • 5
0
votes
1 answer

Pyvmomi: delete resource pool

The documentation and samples do not have any examples of deleting a resource pool... can anyone point me in the right direction? is there a method similar to CreateResourcePool(name,spec) ?? thanks in advance
0
votes
1 answer

How to get windows vCenter server's license expiration date and license type using python script

Can someone please suggest me a module which gets vCenter server's license expiration date and license type. I tried to search from https://github.com/vmware/pyvmomi-community-samples but could not find any. I need information(Displayed in…
0
votes
1 answer

Want to write a python module for VMware (ansible) to get the mapping from VM to Storage

How to exactly use the pyvmomi library to get the above mapping, I mean what data structures to use particularly. I suppose it should be done via data store. def getdatastore(datastore): try: summary = datastore.summary return…
Amruthapv
  • 3
  • 5
0
votes
1 answer

pyvmomi specific folder name

Struggling with grasping OOP and pyvmomi in general. Have a question about calling a specific folder by name - it seems that the object names can be folder or VM, and calling hasattr is the best way to differentiate the two? Also, when I want to…
ndizz
  • 11
  • 2
0
votes
1 answer

Can I edit those fields values via pyvmomi

I'm struggeling to get my head around Vmware's MOB. I have found the page in MOB which has got the coresponding fields I'm interested in i.e. DRS and HA setting for a cluster. However I'm not sure if I can edit them via pyvmomi since the page in the…
MMT
  • 1,931
  • 3
  • 19
  • 35
0
votes
1 answer

getobject timeout in pyvmomi

If the virtual machine being searched for does not exist, the delay in returning output is about one minute. If the virtual machine being searched for does exist, the delay is about two seconds. I know I'm hitting a timeout value, but is there a…
markc
  • 1
  • 3