Question

VM Snapshot Process With Ansible

  • 20 October 2021
  • 4 replies
  • 938 views

Badge

We have Nutanix AHV clusters and need to automate VMs snapshot process with Ansible. It require to take snapshot of VM before certain maintenance activity and restore the same in case of rollback. Need to understand considerations and steps involved in it.


4 replies

Userlevel 2
Badge +4

@Jitendra Ingale Hi…  I am not sure regarding doing snapshots of VM via Ansible, but here is our developer site that has several github links to different  use cases.  You might be able to leverage some of that code. 

 

https://next.nutanix.com/how-it-works-22/ansible-modules-for-nutanix-32671

 

Mike

Badge

Thanks @Michael.Manuele 

Can you give me commands to create and restore VM snapshot on Nutanix ?

I will further try to integrate with Ansible.

Badge

Folks,

 

Any update on this ?

 

I am basically looking for commands to create/restore VM snapshot on Nutanix. I want to execute it from bash scripts.

Badge

Hi

using bash, you have 2 options : ssh to your cvm to run acli commands, or curl/jq to call the REST API. But I’d use Ansible to call the API, if I were you :)

Reply