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

pyvmomi: How to get the sms.StorageManager instance?

I try to get the sms.StorageManager instance in pyvmomi, and register storage provider later. But I cannot find the way to get sms.StorageManager. The objects I get from RetrieveContent() method is all like "sessionManager", "scheduledTaskManager",…
Vincent
  • 26
  • 4
0
votes
3 answers

How to revert a VM snapshot with Pyvmomi?

I've been playing around with the official Python binding for vSphere Pyvmomi (https://github.com/vmware/pyvmomi) I've managed to get a code sample working to power on a vm but I'd like to first revert the vm to a specified snapshot before being…
bearaman
  • 1,071
  • 6
  • 23
  • 43
0
votes
1 answer

How to check booting status of VM using pyvmomi?

I have created VM using pyvmomi module and made it to boot from ISO. Once the vm is powered on, the VM will be booting from ISO. How to check the status whether the VM is booted or not?
0
votes
2 answers

How to get the name and IP of the host of a VMware virtual machine?

My program is running inside a VMware virtual machine, my purpose is to get some information about the machine which this vm is hosted on. I've already done some googling and find a library called pyVmomi. But I still can't figure out how to get the…
satoru
  • 31,822
  • 31
  • 91
  • 141
0
votes
1 answer

HostHardwareSummary in pyvomi

I want to retrieve ESXi information (Model and hardware BIOS identification) https://www.vmware.com/support/developer/vc-sdk/visdk2xpubs/ReferenceGuide/vim.host.Summary.HardwareSummary.html I found we need to browse HostHardwareSummary, but can't…
gogasca
  • 9,283
  • 6
  • 80
  • 125
0
votes
1 answer

Listing valid controllerKey values with pyVmomi

I'm using some example code to attach a new disk to a virtual machine as I create it using pyVmomi. Right now I have the controllerKey hardcoded to 200 (which happens to be an IDE controller in my setup--I have no idea how consistent this value is…
codekoala
  • 715
  • 11
  • 17
0
votes
1 answer

Pyvmomi : Capture vcenter reset event for vms

I am using pyvmomi for capturing vcenter events using WaitForUpdatesEx method. But it is not able to capture vm's reset event as there is no property change in this case. It is capturing poweron, poweroff, suspend events as state changes for…
tarun
  • 11
  • 1
0
votes
1 answer

Clone virtual machine xxx A specified parameter was not correct. spec.identity Customizing the new Virtual Machine

I get the following error when I try to run the below code: "Clone virtual machine xxx A specified parameter was not correct. spec.identity Customizing the new Virtual Machine" When I run it without customSpecs everything works fine. Not sure…
Haris Farooqui
  • 944
  • 3
  • 12
  • 28
0
votes
1 answer

Get list of templates with pyvmomi Vmware vCenter

I would like to list all template available un my vCenter. I dont know how do this. I try to get all object in content.rootFolder and compare if it's a virtualmachine or not. But I can't find templates. I see i can do this: container =…
Anthony
  • 177
  • 1
  • 4
  • 14
0
votes
1 answer

Changing vmFolder of existing VM

Currently I've got a pice of code that lists all the vmFolder.Childentities through pyVmomi, these are used to structurize the VM's in vCenter. But now I want to change the vmFolder of an existing virtual machine. PS: I can't show any code because…
Jonas Libbrecht
  • 768
  • 1
  • 8
  • 17
0
votes
1 answer

Is there any way to restart ESX management network through python PyVmomi

I am trying to restart an ESX management network through Python Pyvmomi. Even after Google search I did not find any relevant API to do so. Please help me if there is any API which can restart/stop ESX management network which is managed by VCentre.
openstk
  • 137
  • 9
0
votes
1 answer

how to create a vm snapshot using pyvmomi

I have a task of implementing a basic backup and recovery system within a django app. I have heard of pyvmomi, but never used it before. My specific tasks at hand is: 1) make a call to a vCenter, pass the vm name, and request to make a snapshot 2) …
Eugene Goldberg
  • 14,286
  • 20
  • 94
  • 167
0
votes
1 answer

How to clone a VM to a specific Datastore?

I would like to use pyvmomi to clone VMs and attach it to specific datastore (specifically with most free space). I couldn't find a solution for this in pysphere therefore I trying luck with pyvmomi but the it seems that learning curve for this…
Patryk
  • 22,602
  • 44
  • 128
  • 244
-1
votes
1 answer

using python to retrieve ESXI system info

I'm trying to figure out a way to retrieve only the system information from the ESXI so I can retrieve the service tag or a serial number of the hardware. I'm already using python and have made the connection. I just don't know how to set the fields…
austink
  • 1
  • 1
-1
votes
1 answer

can I see the owner/creator of a vcenter vm with pyvmomi

The closest info I can find in the vSphere UI is the user of the "Clone completed" event in the events list in monitoring. Can i access this list with pyvmomi? Or any better alternative would be appreciated.
davka
  • 13,974
  • 11
  • 61
  • 86
1 2 3
12
13