0

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) obtain the file location of the snapshot 3) and upload the snapshot file into an OpenStack Swift object store

What is the actual syntax of creating a vm snapshot using pyvmomi? Also - what is the syntax to request the actual snapshot file from vCenter?

Eugene Goldberg
  • 14,286
  • 20
  • 94
  • 167
  • Here is a sample to show how to create a snapshot. I uses UUID instead of name though. https://github.com/vmware/pyvmomi-community-samples/pull/160 – Michael Rice Apr 16 '15 at 23:10

1 Answers1

0

https://github.com/rreubenur/vmware-pyvmomi-examples/blob/master/create_and_remove_snapshot.py

This should be helpful

Snapshot task result itself contains Moref to snashot created So that you can get reference to created snapshot.

Nikhil Rupanawar
  • 4,061
  • 10
  • 35
  • 51