Azure的VM:添加一个保留的IP地址到现有的虚拟机 [英] Azure VM: Adding a Reserved IP address to an existing VM

查看:235
本文介绍了Azure的VM:添加一个保留的IP地址到现有的虚拟机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我到目前为止阅读在网络上是,有没有办法保留的IP添加到现有的虚拟机(除非我重建我正努力避免VM)。然而,我注意到,我的虚拟机的外部IP和云服务是一样的。


  1. <一个href=\"https://azure.microsoft.com/en-us/documentation/articles/virtual-networks-reserved-public-ip/\">Reserved IP地址页解释了如何使用保留的IP与云服务。我已经到处找在Azure管理门户,但无法找到服务配置架构配置设置。


  2. 我使用Azure的调度关闭虚拟机在晚上和周末。从我了解以下是有,我需要在调度程序脚本重新分配保留的IP时,VM早上开始写东西。难道我得到它的权利?


      

    关闭VM - previously,当所有的虚拟机实例的
      云服务被转移到关闭状态(停止/解除分配)时,
      公网IP将被释放和新公网IP将被分配当
      虚拟机实例中的一个开始。然而,与此
      版本中,如果虚拟机使用保留的IP,则保留IP地址可以是
      使用时,重新部署的虚拟机。



P.S。是堆栈溢出问这种与Azure的问题,最好的地方还是我将在今后的使用服务器故障?我已经看到了Azure的问题,在这两个网站上。


解决方案

在构建2015年他们宣布这是现在有可能,很容易。
只需打开的Azure PowerShell和运行这样的:

 新AzureReservedIP -ReservedIPNameipname-Location美国西部-ServiceNamesomevm

如果你运行这个它会保留一个名为ipname的IP,它与已经部署的实例somevm.cloudapp.net关联

What I have read so far on the web is that there is no way to add a reserved IP to an existing VM (unless I recreate the VM which I am trying to avoid). However, I have noticed that external IP of my VM and the cloud service is same.

  1. Reserved IP Addresses page explains how to "To use a Reserved IP with Cloud Services". I have looked everywhere in the Azure Management Portal but couldn't find a configuration setting for Service Configuration Schema.

  2. I am using the Azure scheduler to turn-off the VMs at night and on the weekends. From the following I understand is that there is something that I need to write in the scheduler script to re-assign the Reserved IP when the VM starts in the morning. Did I get it right?

    Shutdown VM - Previously, when all the Virtual Machine instances in a cloud service were moved to the Shutdown state (stop/deallocated), the public IP would be released and a new public IP would be assigned when one of the Virtual Machines instances was started. However, with this release, if the VM uses a Reserved IP, then the Reserved IP can be used when re-deploying the VMs.

P.S. Is Stack Overflow the best place to ask this sort of questions relating to Azure or shall I use Server Fault in the future? I have seen Azure questions in both websites.

解决方案

At Build 2015 they announced this is now possible and VERY easy. Simply open Azure powershell and run this:

New-AzureReservedIP -ReservedIPName "ipname" -Location "West US" -ServiceName "somevm"

If you run this it will reserve an IP named "ipname" and associate it with the already deployed instance "somevm.cloudapp.net"

这篇关于Azure的VM:添加一个保留的IP地址到现有的虚拟机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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