简体   繁体   中英

How to force ip change on a Windows Azure Virtual machine?

I'd like to know how to force an IP change on a Windows Azure machine? Calling ipconfig -renew seems not to be working.

You'll get a new IP after you shutdown your machine.

Eg click on shutdown in the portal and you should see this message:

If you continue, the IP addresses that were assigned to this virtual machine will be released. Are you sure you want to shut down virtual machine [name]?

First of all you really don't have any requirement to change IP address of any Windows Azure Virtual Machine. I will try explaining more on Windows Azure IP address details.

Windows Azure Machine(s) have a fixed IP address which is internal and Windows Azure Service have virtual IP address which is publicly faced. The internal IP address is specific to each virtual machine (Cloud Service Instance or Virtual Machine Instance) which is assigned when the VM Instance is configured and stay the same during the life of Virtual Machine instance.

With Windows Azure Cloud Service Instance (PaaS) you don't have any control over Virtual Machine IP address. However if you creating Windows Azure Virtual Machine (IaaS) you can use Windows Azure Virtual Network to put together all the virtual machines within a IP Address/Subnet group as described here . This may or may not be your requirement however this is one way in IaaS VM, you can put together a VM with your virtual network.

在此处输入图片说明

Delete the deployment or cloud service, wait about 10 minuets and re-create. This will assignee a new PUBLIC IP address to the new cloud service.

Powershell way if you use Resource Manager:

Get-AzureRmVM | Stop-AzureRmVM -Force
Get-AzureRmVM | Start-AzureRmVM

or for classic VM:

Get-AzureVM | Stop-AzureVM -Force
Get-AzureVM | Start-AzureVM

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM