Azure资源管理器:将VM移至可用性组 [英] Azure Resource Manager: move VM to availability group

查看:43
本文介绍了Azure资源管理器:将VM移至可用性组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

似乎无法弄清楚如何更改资源管理器堆栈中现有Azure VM的可用性集.没有它的接口.在ResourceManager模式下,Azure Powershell工具中不存在Set-AzureAvailabilitySet.它确实以服务堆栈模式存在.但这对我没有帮助.

Can't seem to figure out how to change the availability set of an existing Azure VM in the Resource Manager stack. There's no interface for it. Set-AzureAvailabilitySet does not exist in the Azure Powershell tools when in ResourceManager mode. It does exist in service stack mode. But that doesn't help me.

推荐答案

AFAIK,此功能可能在今年年底之前解决.对于MS团队来说,允许这样的操作是一个巨大的挑战.更改可用性集需要对Azure上的VM移动性体系结构进行审查.例如,在已包含VM的可用性集中添加VM意味着将其放入其他默认域.由于VM的移动性是Azure(No Live Migration)的问题,因此操作起来并不容易.

AFAIK, this feature may be addressed by the end of this year. It's a big challenge for the MS team to allow such operation. Changing the availability Set requires a review of the VM mobility architecture on Azure. Fore example, adding a VM in an Availability Set already containing a VM means putting it to different default domain. Becasue VM mobilty is a matter on Azure (No Live Migration), it's not an easy operation.

我编写了一个Powershell脚本,该脚本可让您通过重新创建来更改ARM VM的AS.
试试看,享受:

I have written a Powershell script which let you change the AS of an ARM VM by recreating it.
Give it a try and enjoy:

如何使用它?

1-下载脚本并将其保存到本地位置

How to use it ?

1- Download the script and save it to local location

2-运行它并提供所需的参数

2- Run it and provide the requested parameters

2- ./Set-ArmVmAvailabilitySet.ps1 –VmName虚拟机名称" –ResourceGroup资源组" -AvailabilitySetName名称" -SubscriptionName‘订阅名称’

2- ./Set-ArmVmAvailabilitySet.ps1 –VmName ‘The VM Name’ –ResourceGroup ‘Resource Group’ –AvailabilitySetName ‘As Name’ –SubscriptionName ‘The Subscription name’

要从AvailabilitySet中删除虚拟机,请执行以下操作:

To remove a VM from an AvailabilitySet:

.//Set-ArmVmAvailabilitySet.ps1 –VmName"VM名称" –ResourceGroup资源组" –AvailabilitySetName 0 –SubscriptionName"The订阅名称"

./Set-ArmVmAvailabilitySet.ps1 –VmName ‘The VM Name’ –ResourceGroup ‘Resource Group’ –AvailabilitySetName 0 –SubscriptionName ‘The Subscription name’

版本1.01: https://gallery.technet.microsoft.com/Set-Azure-Resource-Manager-f7509ec4

来源

这篇关于Azure资源管理器:将VM移至可用性组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆