0
votes

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?

1
Here is a sample to show how to create a snapshot. I uses UUID instead of name though. github.com/vmware/pyvmomi-community-samples/pull/160Michael Rice

1 Answers

0
votes

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.