\u00a0<\/p>
Level up your Nutanix skills and get certified for free with Nutanix University Summer School! For the next two months, anyone who completes one of the following courses - whether it\u2019s online or in person - will also receive a FREE certification exam voucher.<\/span><\/p> Eligible courses:<\/strong><\/p> Enterprise Cloud Administration<\/span><\/p>\t<\/li>\t Nutanix Data Services Administration<\/span><\/p>\t<\/li>\t Nutanix End User Computing Administration<\/span><\/p>\t<\/li>\t Nutanix Database Management & Automation<\/span><\/p>\t<\/li>\t Nutanix Multicloud Automation Administration<\/span><\/p>\t<\/li><\/ul> \u00a0<\/p> Take this opportunity to invest in your career and grow your skill set.\u00a0<\/span><\/p> \u00a0<\/p> Thanks for waiting to everyone who got our sneak peek of this last week!\u00a0\ud83d\ude09<\/p> \u00a0<\/p> Terms and Conditions<\/strong><\/em><\/p> The exam voucher will be provided to you after you have completed the course. Self-paced online student\u2019s vouchers will be assigned through the Learning Plan within 24-hours after the completion of the course.<\/span><\/em><\/p>\t<\/li>\t You must complete the course between June 14, 2022 and August 16, 2022.\u00a0<\/span><\/em><\/p>\t<\/li>\t For online students, your exam voucher must be redeemed by 8\/23\/22. For instructor-led students, your exam voucher must be redeemed 6 months after you complete the course.\u00a0<\/span><\/em><\/p>\t<\/li>\t The exam voucher code can only be used once.<\/span><\/em><\/p>\t<\/li>\t You will receive one (1) NCP exam voucher for each class completed. The voucher can be used on any NCP exam.\u00a0\u00a0<\/span><\/em><\/p>\t<\/li><\/ul> \u00a0<\/p> This article was written by Karlie Beil, Customer Marketing Specialist.\u00a0<\/p><\/div><\/div><\/section> \u00a0<\/p> \u00a9\ufe0f\ufe0f\ufe0f 2022 Nutanix, Inc. \u00a0All rights reserved. Nutanix, the Nutanix logo and all Nutanix product, feature and service names mentioned herein are registered trademarks or trademarks of Nutanix, Inc. in the United States and other countries. Other brand names mentioned herein are for identification purposes only and may be the trademarks of their respective holder(s). This post may contain links to external websites that are not part of Nutanix.com. Nutanix does not control these sites and disclaims all responsibility for the content or accuracy of any external site. Our decision to link to an external site should not be considered an endorsement of any content on such a site. This post may contain express and implied forward-looking statements, which are not historical facts and are instead based on our current expectations, estimates and beliefs. The accuracy of such statements involves risks and uncertainties and depends upon future events, including those that may be beyond our control, and actual results may differ materially and adversely from those anticipated or implied by such statements. Any forward-looking statements included herein speak only as of the date hereof and, except as required by law, we assume no obligation to update or otherwise revise any of such forward-looking statements to reflect subsequent events or circumstances.<\/p> \u00a0<\/p>","id":40952,"featuredImage":"https:\/\/uploads-us-west-2.insided.com\/nutanix-us\/attachment\/78f47513-ef06-4bf4-9b57-0269259ac6da_thumb.png","label":"Blog","replyCount":0,"views":4214,"post":{"id":61291,"author":{"id":113632,"url":"\/members\/karlie-beil-113632","name":"Karlie Beil","avatar":"https:\/\/uploads-us-west-2.insided.com\/nutanix-us\/icon\/200x200\/1581aab3-bcf6-49f4-b2fb-3d11e8c010dc.png","userTitle":"Community Manager","rank":{"isBold":false,"isItalic":false,"isUnderline":false,"name":"Community Manager","color":"#0873ba"},"userLevel":2},"content":" \u00a0<\/p> Level up your Nutanix skills and get certified for free with Nutanix University Summer School! For the next two months, anyone who completes one of the following courses - whether it\u2019s online or in person - will also receive a FREE certification exam voucher.<\/span><\/p> Eligible courses:<\/strong><\/p> Enterprise Cloud Administration<\/span><\/p>\t<\/li>\t Nutanix Data Services Administration<\/span><\/p>\t<\/li>\t Nutanix End User Computing Administration<\/span><\/p>\t<\/li>\t Nutanix Database Management & Automation<\/span><\/p>\t<\/li>\t Nutanix Multicloud Automation Administration<\/span><\/p>\t<\/li><\/ul> \u00a0<\/p> Take this opportunity to invest in your career and grow your skill set.\u00a0<\/span><\/p> \u00a0<\/p> Thanks for waiting to everyone who got our sneak peek of this last week!\u00a0\ud83d\ude09<\/p> \u00a0<\/p> Terms and Conditions<\/strong><\/em><\/p> The exam voucher will be provided to you after you have completed the course. Self-paced online student\u2019s vouchers will be assigned through the Learning Plan within 24-hours after the completion of the course.<\/span><\/em><\/p>\t<\/li>\t You must complete the course between June 14, 2022 and August 16, 2022.\u00a0<\/span><\/em><\/p>\t<\/li>\t For online students, your exam voucher must be redeemed by 8\/23\/22. For instructor-led students, your exam voucher must be redeemed 6 months after you complete the course.\u00a0<\/span><\/em><\/p>\t<\/li>\t The exam voucher code can only be used once.<\/span><\/em><\/p>\t<\/li>\t You will receive one (1) NCP exam voucher for each class completed. The voucher can be used on any NCP exam.\u00a0\u00a0<\/span><\/em><\/p>\t<\/li><\/ul> \u00a0<\/p> This article was written by Karlie Beil, Customer Marketing Specialist.\u00a0<\/p><\/div><\/div><\/section> \u00a0<\/p> \u00a9\ufe0f\ufe0f\ufe0f 2022 Nutanix, Inc. \u00a0All rights reserved. Nutanix, the Nutanix logo and all Nutanix product, feature and service names mentioned herein are registered trademarks or trademarks of Nutanix, Inc. in the United States and other countries. Other brand names mentioned herein are for identification purposes only and may be the trademarks of their respective holder(s). This post may contain links to external websites that are not part of Nutanix.com. Nutanix does not control these sites and disclaims all responsibility for the content or accuracy of any external site. Our decision to link to an external site should not be considered an endorsement of any content on such a site. This post may contain express and implied forward-looking statements, which are not historical facts and are instead based on our current expectations, estimates and beliefs. The accuracy of such statements involves risks and uncertainties and depends upon future events, including those that may be beyond our control, and actual results may differ materially and adversely from those anticipated or implied by such statements. Any forward-looking statements included herein speak only as of the date hereof and, except as required by law, we assume no obligation to update or otherwise revise any of such forward-looking statements to reflect subsequent events or circumstances.<\/p> \u00a0<\/p>","url":"\/education-blog-153\/level-up-your-nutanix-skills-this-summer-and-get-a-free-exam-voucher-40952?postid=61291#post61291","creationDate":"2022-06-14T15:30:05+0000","relativeCreationDate":"27 days ago"},"contentType":"article","type":3,"likes":5,"hasCurrentUserLiked":false},"phrases":{"Forum":{"{n} year|{n} years":"{n} year|{n} years","{n} month|{n} months":"{n} month|{n} months","{n} day|{n} days":"{n} day|{n} days","{n} hour|{n} hours":"{n} hour|{n} hours","{n} minute|{n} minutes":"{n} minute|{n} minutes","just":"just now","{plural} ago":"{plural} ago"}}}">
我刚刚创造了一个明智的角色(https://galaxy.ansible.com/cybergavin/nutanix_vm_create)用于使用不同图像和不同子网中的VMS创建。它还安装并启用NGT。
- 谢谢您的回复! 过滤器规格正在杀死我!感谢您分享这一点。一旦我知道上下文和语法,它就可以完美地工作。 - Thanks for reply! The Filter specification was KILLING ME!\u00a0 \u00a0 Thank you for sharing this.\u00a0 It worked perfectly once I knew the context and syntax.\u00a0<\/span><\/span><\/p>","quoteUsername":"JebBrinkman","translations":{"Common":{"like":"Like","unlike":"Unlike"},"Forum":{"Quote":"Quote","Share":"Share"}}}">
伙计们, 是否可以使用Ansible自动化VM快照过程? 我想在维护活动之前/之后进行VM的快照,并在维护活动之前恢复相同的快照。 Is it possible to automate VM snapshots process with Ansible ?<\/p> I want to take VM\u2019s snapshot as well as restore the same before\/after maintenance activity.<\/p>","quoteUsername":"Jitendra Ingale","translations":{"Common":{"like":"Like","unlike":"Unlike"},"Forum":{"Quote":"Quote","Share":"Share"}}}">
I added an Ansible role to take snapshots of a VM :\u00a0https:\/\/github.com\/Fredouye\/nutanix_ansible<\/a><\/p> There are also roles to create a VM, and to add disks to an existing VM.<\/p>","quoteUsername":"Fredouye","translations":{"Common":{"like":"Like","unlike":"Unlike"},"Forum":{"Quote":"Quote","Share":"Share"}}}">
你好, 有人可以帮助低于要求吗? 如何使用Ansible删除Nutanix VM? 如果VM快照成功或Ansible失败,该如何获得? 在服用VM快照时,将VM放置在不同的Nutanix群集中,如果一个群集中不存在VM,请检查其他群集吗? 如何列出VM快照以及日期Ansible? 问候 拉吉 \u00a0<\/p> Could someone help below requirements?<\/p> \u00a0<\/p> How to use ansible to remove nutanix vm ?<\/p> How to get if the vm snapshot sucessful or failure with ansible?<\/p> 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?<\/span><\/p> How to list vm snapshot along with date ansible?<\/p> \u00a0<\/p> Regards<\/p> Raj<\/p>","quoteUsername":"RAJ_78","translations":{"Common":{"like":"Like","unlike":"Unlike"},"Forum":{"Quote":"Quote","Share":"Share"}}}">
你好 您可以使用“ delete /vms /{{uuid}}” API调用轻松使用Ansible删除VM。 我的Ansible角色检查快照完成,如果有问题,任务将失败。 要列出快照,您可以使用“获取 /快照” API调用。 拍摄快照时,您无需指定群集,但我想您的Prism必须管理所有主机。我是Nutanix的新手,如果我错了,请原谅我:) you can easily use Ansible to delete a VM, using the \u201cDELETE \/vms\/{{ uuid }}\u201d API call.<\/p> My Ansible role checks for snapshot completion, if there\u2019s an issue the task will fail.<\/p> To list snapshots, you can use the \u201cGET \/snapshots\u201d API call.<\/p> When taking a snapshot, you don\u2019t need to specify the cluster, but I guess your Prism has to manage all your hosts.\u00a0I\u2019m new to Nutanix, please forgive me if I\u2019m wrong :)<\/p>","quoteUsername":"Fredouye","translations":{"Common":{"like":"Like","unlike":"Unlike"},"Forum":{"Quote":"Quote","Share":"Share"}}}">
你好, 感谢您提供的信息。您是否可以帮助您提供完整的Ansible Playbook以删除快照?我尝试了下面的事情似乎不起作用。 - 名称:删除vm快照{{invoctory_hostname}} 是的,我们使用Prism控制台来管理主机/VM。我们将VM放置在不同的群集中,如果可以在一个群集中存在VM,则可以做出任何条件,然后搜索另一个群集。 问候 拉吉 Thanks for the information.Could you help to provide complete ansible playbook for snapshot removal? I tried it something like below doesn\u2019t seems working.<\/p> \u00a0<\/p> \u00a0 \u00a0 - name: DELETE VM Snapshot {{ inventory_hostname }} 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\u2019t present in one cluster\u00a0then search for other.<\/p> \u00a0<\/p> Regards<\/p> Raj<\/p>","quoteUsername":"RAJ_78","translations":{"Common":{"like":"Like","unlike":"Unlike"},"Forum":{"Quote":"Quote","Share":"Share"}}}">
我添加了角色,该角色删除了给定VM的所有快照:https://github.com/fredouye/nutanix_ansible/tree/main/main/roles/vm_snapshots_remove 嗨,弗雷德, 谢谢。它按预期工作。 有没有办法以人类可读格式获得快照创建时间?默认情况下,它以时期格式显示。 是否有方法可以使情况下VM不存在,然后检查其他棱镜吗?面临的挑战是,我们通过不同的棱镜将VM放置在不同的集群中。 问候 拉吉 \u00a0<\/p> Thanks.It\u2019s working as expected.<\/p> \u00a0<\/p> Is there way to get snapshot creation time in human readable format? By default it shows in epoch format.<\/p> \u00a0<\/p> Is there way to make condition if the vm not present in one prism then check other prism? The challenge is we have vm\u2019s placed across different cluster manage through different prism.<\/p> \u00a0<\/p> Regards<\/p> Raj<\/p>","quoteUsername":"RAJ_78","translations":{"Common":{"like":"Like","unlike":"Unlike"},"Forum":{"Quote":"Quote","Share":"Share"}}}">
嗨,拉吉 似乎Nutanix的API仅在微观秒内返回日期: 您可以使用Strfime过滤器将其转换为人类可读格式:https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#handling-dates-dates-and and-times 结果将是: \u00a0<\/p> it seems Nutanix\u2019s API only returns dates in micro seconds :<\/p> \u00a0<\/p> \u00a0<\/p> 关于多个集群,由于我只能访问一个节点社区版群集,所以我不知道... 也许您可以使用“ get /vms /”,并在簇上循环,直到找到VM。 \u00a0<\/p> Maybe you can use \u201cGET \/vms\/\u201d, and loop over your clusters until you find the VM.<\/p>","quoteUsername":"Fredouye","translations":{"Common":{"like":"Like","unlike":"Unlike"},"Forum":{"Quote":"Quote","Share":"Share"}}}">
你好弗雷德,,,, 感谢您以前的所有帮助。 您能帮下面的问题吗? - 在快照创建期间,有时会在采用一堆VM时面对以下问题?是否有超时或需要增加的东西? 任务[获取VM的UUID] *************************************************************************************************************************************************************************** - 在拍摄快照后,该条件正在失败(等到任务完成),但在以前的任务中取得了成功 {“ msg”:“条件检查'task_status.json.progress_status == \“成功\”''失败。对象'没有属性'json'} - 提供的删除快照剧本运行良好,但它删除了与VM相关的所有快照,我们需要删除特定的快照? - 我们正在以库存文件的形式传递VM名称,但是对于库存名称和vm显示名称而言,几个VM的快照失败是对病例敏感的吗? 问候 拉吉 输入您的用户名或电子邮件地址。我们将向您发送带有指令的电子邮件以重置您的密码。\u00a0<\/h3>
Get started today!<\/a><\/h3>
Get a free certification exam when you complete a training course now through August 16! <\/strong><\/h3>
\u00a0<\/h3>
Get started today!<\/a><\/h3>
19回复
我正在使用Ansible来配置Prism设置。DNS,NTP,警报,代理,身份验证等。我将尝试清理所有特定数据,并将其发布在Nutanix Git或我自己的Git门户网站上。
\nI'm using Ansible to configure prism settings. DNS, NTP, Alerts, proxy, authentication, and stuff like that. I will try to clean up all my specific data and publish them on the nutanix git, or my own git portal.","quoteUsername":"itguyadam","translations":{"Common":{"like":"Like","unlike":"Unlike"},"Forum":{"Quote":"Quote","Share":"Share"}}}">
有没有更好的方法可以将cluster_name作为过滤器传递并仅在该特定群集上获得VM?
tia
\n
\nIs there better way where I could pass cluster_name as filter and get VMs only on that particular cluster ?
\n
\nTIA","quoteUsername":"OkBeacon","translations":{"Common":{"like":"Like","unlike":"Unlike"},"Forum":{"Quote":"Quote","Share":"Share"}}}">
https://github.com/ad-code/automation/tree/master/ansible/nutanix_cluster_baseline
\n
\nhttps:\/\/github.com\/AD-Code\/Automation\/tree\/master\/ansible\/nutanix_cluster_baseline<\/a>","quoteUsername":"itguyadam","translations":{"Common":{"like":"Like","unlike":"Unlike"},"Forum":{"Quote":"Quote","Share":"Share"}}}">
我最终弄清楚了如何做(找不到有关过滤器的任何文档)
- import_tasks:get_session_cookie.yml
- 名称:获取VMS列表
URI:
URL:“ {{api_url_v3}}/vms/list”
身体:
KIND:VM
sort_order:上升
偏移:0
长度:1000
sort_attribute:''
过滤器:“ cluster_name == {{cluster_name}}”
方法:帖子
validate_certs:否
Body_Format:JSON
status_code:200
标题:
cookie:“ {{session_cookie}}”
注册:vms_result
\nI eventually figured out how to do it (Couldn't find any documentation about filters)
\n
\n- import_tasks: get_session_cookie.yml
- name: Get VMS list
uri:
url: \"{{ api_url_v3 }}\/vms\/list\"
body:
kind: vm
sort_order: ASCENDING
offset: 0
length: 1000
sort_attribute: ''
filter: \"cluster_name=={{ cluster_name }}\"
method: POST
validate_certs: no
body_format: json
status_code: 200
headers:
Cookie: \"{{ session_cookie }}\"
register: vms_result
<\/pre><\/div>","quoteUsername":"OkBeacon","translations":{"Common":{"like":"Like","unlike":"Unlike"},"Forum":{"Quote":"Quote","Share":"Share"}}}">
https://github.com/mbach04/nutanix_vm_proviseer
目前正在努力在Nutanix上配备K8S群集 - 一旦我对此感到满意,我将把它放在GitHub上。
我最终弄清楚了如何做(找不到有关过滤器的任何文档)
\tI eventually figured out how to do it (Couldn't find any documentation about filters)
\t\u00a0<\/p>\t<\/div><\/content-quote>
URI:
url:“ {{base_urlv2}}/{{vm_uuid}}”
方法:删除
用户:“ {{用户名}}”
密码:“ {{passwass}}”
身体:
snapshot_specs:
- uuid:“ {{{vm_uuid}}”
snapshot_name:“ {{invoctory_hostname}} _ test”
Body_Format:JSON
标题:
内容类型:应用程序/JSON
接受:应用程序/JSON
force_basic_auth:是的
validate_certs:否
status_code:201
\u00a0 \u00a0 \u00a0 uri:
\u00a0 \u00a0 \u00a0 \u00a0 url: \"{{ base_urlv2 }}\/{{ vm_uuid }}\"
\u00a0 \u00a0 \u00a0 \u00a0 method: DELETE
\u00a0 \u00a0 \u00a0 \u00a0 user: \"{{ username }}\"
\u00a0 \u00a0 \u00a0 \u00a0 password: \"{{ password }}\"
\u00a0 \u00a0 \u00a0 \u00a0 body:
\u00a0 \u00a0 \u00a0 \u00a0 \u00a0snapshot_specs:
\u00a0 \u00a0 \u00a0 \u00a0 \u00a0- uuid: \"{{ vm_uuid }}\"
\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0snapshot_name: \"{{ inventory_hostname }}_test\"
\u00a0 \u00a0 \u00a0 \u00a0 body_format: json
\u00a0 \u00a0 \u00a0 \u00a0 headers:
\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 Content-Type: application\/json
\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 Accept: application\/json
\u00a0 \u00a0 \u00a0 \u00a0 force_basic_auth: yes
\u00a0 \u00a0 \u00a0 \u00a0 validate_certs: no
\u00a0 \u00a0 \u00a0 \u00a0 status_code: 201
\u00a0<\/p>
“ json”:{
“ cluster_uuid”:“ 0005CEC4-5D52-EFBF-2BB0-00505698BC02”,
“完整_time_usecs”:1636384114684320,
“ create_time_usecs”:1636384114376874- 名称:等待任务结束
URI:
url:'{{api_url_v2}}/tasks/{{task_uuid}}}'
方法:获取
validate_certs:false
force_basic_auth:正确
url_username:“ {{prism_user}}”
url_password:“ {{prism_password}}”
return_content:true
注册:task_status
delegate_to:localhost
重试:10
延迟:5
直到:task_status.json.progress_status ==“成功”
- 名称:显示快照创建时间到人类可读格式
调试:
msg:“快照创建时间:{{{'%y-%m-%d%h:%m:%s'| strftime(((task_status.json.create_time_usecs_usecs | string)| string)[:10]}}}}}}}}}”任务[snap_nutanix:显示快照创建时间人类可读格式] **************************************************************************************************************************************************************************************************
确定:[rhel7-1] => {
“ msg”:“快照创建时间:2021-11-08 16:24:04”
}\"json\": {
\"cluster_uuid\": \"0005cec4-5d52-efbf-2bb0-00505698bc02\",
\"complete_time_usecs\": 1636384114684320,
\"create_time_usecs\": 1636384114376874<\/code><\/pre>
2021年11月28日,星期日23:27:21 +0800(0:00:17.746)0:00:17.746 *******
致命:失败!=> {“ change”:false,“ content”:“”,“ apaped”:30,“ msg”:“状态代码为-1而不是[200]:连接失败:('读取操作超时',),“重定向”:false,“状态”:-1,“ url”:“”}
Functional","cookiepolicy.modal.level2":"Normal
Functional + analytics","cookiepolicy.modal.level3":"Complete
Functional + analytics + social media + embedded videos"}}}">