加入我们虚拟Nutanix用户群会议Jarian Gibson报道Nutanix云集群Azure和AWs与Citrix/span/p

Jarian将深入NC2Azure架构和CitrixNC2Azure\u00a0帮助增强业务连续性和灾难恢复位置He\u2019ll还提供最新NC2更新AWS.QQ/spanQ/p

Plus, we're\u00a0giving away a Nutanix suitcase to one lucky winner!\u00a0Opt-in when you register\u00a0to be entered to win.\u00a0<\/p>","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":4},"type":"Webinar","url":"https:\/\/next.nutanix.com\/events\/global-nug-nc2-on-azure-and-aws-with-citrix-151","image":"https:\/\/uploads-us-west-2.insided.com\/nutanix-us\/attachment\/f9693b5b-436b-427a-9b98-531b4040ff24_thumb.png","location":"","startsAt":1678298400,"endsAt":1678302000,"contentType":"event","attendees":[],"attendeeCount":0,"isLoggedInUserAttendee":false,"createdAt":"1675974969"},"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"}}}">

解决

关闭组合VM

  • 2019年2月13日
  • 6个回复
  • 2339视图

徽章 +1
Hi.

大型VM集群不总需要运行 并想寻找方法关闭这些VM周日晚



现在任何人都知道如何查找一组VM系统(通过标签、项目、类别等)并传递关机命令最理想的i想通过Powershell做这个 但我会拿任何东西
图标

最佳回答德文格勒2019年3月12日01:58

\rn
\r\n接下写脚本查询类别并使用NutixPScmdlets
\rn
r\nit现在每周通过定时任务运行一次,所有非必备VM调用电源
\rn
\r\nhttps:\/\/github.com\/leepryor\/Nutanix_Powershell\/blob\/master\/Shutdown-Categorized-VMs.ps1","className":"post__content__best_answer"}'>
视图原创

专题结束备注

6个回复

用户二级
徽章 +3
有一些方法列表VMs并过滤组,但取决于命名规范



关闭虚拟机并存多选项

Windows:

DOSCmd:

代码 :
关闭//mQ机}{options}


Powershell:

代码 :
stop-compute-计算机{computeName}-证书{AccountID}




inux:

代码 :
ssh-t {userCoputerIP}sudo关机-h




所有你需要做的就是环形图 和过滤计算机列表
用户二级
徽章 +3
可使用RESTAPI



代码 :
获取 vms




获取粗表VMs并接通结果过滤grep并接通LINUX命令



let us to know how you make out. 告诉我们你是怎么搭建的
用户二级
徽章 +3
并检查史蒂夫(akaDude):



代码 :
http://stevenpoitras.com/




我知道它关乎恢复VM
徽章 +1
如何解决这一点:



创建了普里斯特类别 分配所有VM



之后我写脚本 向散列表查询类别并使用NutixPScmdlets



现在它通过定时任务每周运行一次, 关闭所有非必备VM电源



https://github.com/leepryor/Nutanix_Powershell/blob/master/Shutdown-Categorized-VMs.ps1

用户二级
徽章 +3
干得漂亮



感谢您与社区分享

Learn more about our cookies.<\/a>","cookiepolicy.button":"Accept cookies","cookiepolicy.button.deny":"Deny all","cookiepolicy.link":"Cookie settings","cookiepolicy.modal.title":"Cookie settings","cookiepolicy.modal.content":"We use 3 different kinds of cookies.可选择要接受的cookie我们需要基本cookie使网站工作, 因此这是最小选择 更多了解cookie.Q/a>
Functional","cookiepolicy.modal.level2":"Normal
Functional + analytics","cookiepolicy.modal.level3":"Complete
函数+分析+社交媒体+嵌入视频
Baidu