VM Snapshot Process With Ansible | Nutanix Community
Skip to main content
Question

VM Snapshot Process With Ansible

  • October 20, 2021
  • 5 replies
  • 1429 views

Forum|alt.badge.img

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.

5 replies

Michael.Manuele
Nutanix Employee
Forum|alt.badge.img+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


Forum|alt.badge.img

Thanks @Michael.Manuele 

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

I will further try to integrate with Ansible.


Forum|alt.badge.img

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.


Forum|alt.badge.img
  • Adventurer
  • 6 replies
  • November 4, 2021

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 :)


  • Voyager
  • 1 reply
  • December 19, 2024

That’s it? Use api or CLI ?

I cannot believe that nutanix.ncp ansible module does not containe most often used function in system maintenance.

Install updates ? Make snapshot first. Change configuration - make snapshot before that.

Same with volume groups - it is essential to make snapshots before some data chunching tasks or DB upgrades.

And this is not implemented…. What are you thinking? Do you have any ideas how sysadmin work mwhat they do and what they need to automate ? We never  create ndb.sla with ansible , but we are making snapshots all the time. 

I am effin disappointed as this renders whole nutanix.ncp collection unusable for my automation project and I will have go down deep in rabbit hole of nutanix API instead of  doing my job. 

I am deeply disappointed.


Reply