5 Essential Tips for Maximizing Your Experience at Nutanix .NEXT for Bloggers
Hi, Could someone help below requirements? How to use ansible to remove nutanix vm ?How to get if the vm snapshot sucessful or failure with ansible?The vms are placed different nutanix cluster while taking vm snapshot how to make condition if vm not present in one cluster then check for other cluster?How to list vm snapshot along with date ansible? RegardsRaj
Hi,Thanks for the information.Could you help to provide complete ansible playbook for snapshot removal? I tried it something like below doesn’t seems working. - name: DELETE VM Snapshot {{ inventory_hostname }} uri: url: "{{ base_urlv2 }}/{{ vm_uuid }}" method: DELETE user: "{{ username }}" password: "{{ password }}" body: snapshot_specs: - uuid: "{{ vm_uuid }}" snapshot_name: "{{ inventory_hostname }}_test" body_format: json headers: Content-Type: application/json Accept: application/json force_basic_auth: yes validate_certs: no status_code: 201 Yes we are using prism console to manage hosts/VM.We have vm placed in different cluster it would be great if any condition can be made if vm doesn’t present in one cluster then search for other. RegardsRaj
Hi Fredouye, Thanks.It’s working as expected. Is there way to get snapshot creation time in human readable format? By default it shows in epoch format. Is there way to make condition if the vm not present in one prism then check other prism? The challenge is we have vm’s placed across different cluster manage through different prism. RegardsRaj
Hi Fredouye, Thanks for all the previous help. Could you help with below issues?- During snapshot creation sometimes facing below issues while taking bunch of vms? Is there any timeout or something need to be increased? TASK [Get the UUID of VM] **********************************************************************************************************************************************Sunday 28 November 2021 23:27:21 +0800 (0:00:17.746) 0:00:17.746 *******fatal: FAILED! => {"changed": false, "content": "", "elapsed": 30, "msg": "Status code was -1 and not [200]: Connection failure: ('The read operation timed out',)", "redirected": false, "status": -1, "url": ""} - The condition are failing(Wait till task complete) for few vm's after taking snapshot though snapshot sucessful in previous task {"msg": "The conditional check 'task_status.json.progress_status == \"Succeeded\"' failed. The error was: error while evaluating conditional (task_status.json.progress_status == \"Succeeded\"): '
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.