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
1
vote
1 answer

open vm tools fails to customize guest

I am trying to deploy a cent-os 7 VM on a vcenetr from pyvmomi python library and then before powering on the VM I am trying to setup static IP and DNS for the VM. VM creation goes fine , but guest customization fails, givimg following…
1
vote
2 answers

Copying file from Vcentre datastore to VM

I use salt-stack and pyvmomi module to communicate with vcenter and create the VM. On this newly created VM I want to copy files(around 1 GB) from vcenter Datastore. InitiateFileTransferToGuest can be used to upload the file to VM but how can we…
1
vote
1 answer

pyVmomi start service on virtual machine

I am trying to start a service within the client virtual machine through pyVmomi. I couldn't find much in the official documentation on this, and I searched the net to no avail. I then modified the code I have used to successfully launch a silent…
Will
  • 11
  • 2
1
vote
1 answer

Error when I try to execute a script: ImportError: No module named tools

I am playing arround with pyvmomi and I managed to get the "sample" script (getallvms.py) working. I am now trying an other script that I found…
I-1
  • 39
  • 1
  • 7
1
vote
2 answers

How to find vm in particular folder using pyvmomi

Hi I am new in python and I am exploring pyvmomi. Here I want to fetch vm info.Like I have one data center i.e "DataCenter1" In that data center there are two folders LinuxServer and WindowsServer these folder contains vms.So I want to fetch…
Student
  • 15
  • 1
  • 5
1
vote
1 answer

How to specify virtual machine name while vm deploy using ovf template in pyvmomi

I am using pyvmomi to to deploy virtual machine to vCenter using ovf template. By default it takes virtual machine name as specified in .ovf file. I am not able to figure out where in my code (i.e while creating import specifications or in…
Luminos
  • 311
  • 1
  • 3
  • 12
1
vote
1 answer

pyVmomi exception on manager.CreateImportSpec

I am trying to deploy ovf using pyVmomi. I am trying to follow this example: https://github.com/vmware/pyvmomi-community-samples/blob/master/samples/deploy_ovf.py. There are two VCenter setups and there are differences. On one VCenter, I can deploy…
aitang
  • 11
  • 3
1
vote
1 answer

Suppress 'SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed' errors in python

I am having trouble using pyVmomi with python 2.7.5. I get SSL certificate errors when trying to run the sample scripts from the SDK. I tried all the solutions mentioned on this post but none of them worked for me. Below is the complete console…
1
vote
0 answers

Deploy_ovf gives error after calling ImportVApp function in pyvmomi

spec_params = vim.OvfManager.CreateImportSpecParams() import_spec = manager.CreateImportSpec(ovfd, objs["resource pool"], objs["datastore"], spec_params) lease = objs["resource pool"].ImportVApp(import_spec.importSpec) Error : TypeError:…
AAN
  • 11
  • 3
1
vote
2 answers

Get vmId via pyVmomi

Currently Im using vim-cmd to perform multiple operations in my VMware center. I'm using SSH paramiko module to connect and retrieve vim-cmd command status: vim-cmd vmsvc/getallvms vim-cmd vmsvc/power.getstate 13 vim-cmd vmsvc/power.on 13 vim-cmd…
gogasca
  • 9,283
  • 6
  • 80
  • 125
1
vote
2 answers

pyvmomi 5.5 and vsphere 6 - Can I get tags?

I've wanted to get the vmware-tags from vSphere 5.5 using pyvmomi 5.5 - which is not possible because of limitations in the vSphere 5.5 Python API. But now when we've upgraded vSphere to 6.0 - is it possible to get the tags somehow?
mram
  • 11
  • 2
1
vote
5 answers

pyvmomi SmartConnect: throw error requests.exceptions.SSLError: [Errno 8] _ssl.c

SmartConnect method throw error requests.exceptions.SSLError:[Errno8]_ssl.c ? how to resolve it I am using pyvmomi-5.5.0.2014.1.1 package to automate the VMWare server. Using same credenticals through VMware ESXi 5.1, I am able to connect to…
rocky
  • 139
  • 3
  • 16
1
vote
1 answer

Pyvmomi what does this do?

i'm currently working on the VMware SDK in python (with Pyvmomi) and I see in all sample or example this line: atexit.register(Disconnect, self.si) Does anyone know what does is supposed do ? I don't understand, thanks for ur help.
Anthony
  • 177
  • 1
  • 4
  • 14
1
vote
2 answers

create vm using pyvmomi module from .vmx and .vmdk files

I have been trying to create a new vm with using existing vm's .vmx and .vmdk files from ESX host in Python using pyvmomi module. I am new to pyvmomi and there isnt much online help available for pyvmomi. I have checked sample code in…
pythonuser
  • 197
  • 5
  • 10
1
vote
1 answer

Adding orphaned VMs to inventory using pyVmomi?

I've done a good bit of research over the last day or two, both on here and good ole Google and can't seem to find any examples of adding orphaned vms to inventory with pyVmomi(or any other vSphere module for that matter). Thanks to some examples…