locked
Internal IP Address RRS feed

  • Question

  • Hi,

    Would there be a way to change the Internal IP Address to a Virtual Network while preserving the Public VIP Address.

    The VM and Virtual Network are in the same location.

    Any  assistance would be appreciated.

    Thanks,

    Thursday, October 2, 2014 7:18 PM

Answers

  • Wayne,

    As Susie mentioned, to move a VM to an existing VNet, you will need to delete the VM, retain the disks, and recreate the VM in the VNet. As you wish to retain your public IP, during this time, you can spin up a small VM and place it in the same cloud service so that it is running during the process of moving the existing VM to the VNet. Create the VM back in to the cloud service, then once it is turned on, you can delete the small VM you created to hold the IP.

    The best practice, for going forward, if you need to always have a static public IP address, is to use ReservedIP or Public-Instance IP addressing. Both are generally available for use and guarantee you will not lose the Public IP address for any reason.

    Thanks,

    Phillip
    Wednesday, October 8, 2014 12:23 PM
  • Hi Wayne,

    Since the existing VM doesn't belong to a virtual network, maybe you need to delete that VM and keep the attached disks, then you can use that disk to create a new VM and choose the virtual network when creating the VM.

    Best regards,

    Susie

    • Proposed as answer by Susie Long Tuesday, October 14, 2014 2:58 AM
    • Marked as answer by Susie Long Thursday, October 16, 2014 1:53 AM
    Wednesday, October 8, 2014 1:09 AM

All replies

  • Hi,

    Since this issue is more related to Microsoft Azure Virutal Networking. I move it to the Virutal Networking forum. It is appropriate and more experts will assist you.

    Regards,

    Jambor


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, October 3, 2014 6:13 AM
  • Hi,

    Are you talking about change the internal IP address for an Azure VM? If yes, you can assign a static internal IP address within the virtual network to an Azure VM via Azure PowerShell. For more detailed information, please refer to the link below:

    Configure a Static Internal IP Address (DIP) for a VM

    In addition, how many VMs are there in the same cloud service? The public IP address would change only if all the VMs in that cloud service are in the stopped (deallocated ) status.

    Best regards,

    Susie    
    Friday, October 3, 2014 9:10 AM
  • Susie,

    I'm talking about moving the Internal IP Address from the one generated when the Virtual Machine was created to a Virtual Network that I have the rest of my Virtual Machines on.  But I need to retain the Public IP, I have a third party depositing files nightly to the current IP address.

    Thanks,

    Wayne

    Friday, October 3, 2014 11:43 AM
  • Hi Wayne,

    Thanks for your reply.

    You can follow the link above to assign a static internal IP address to an exsiting Azure VM. I did a test on my Azure VM. It seems that no matter if that VM is the unique VM in the cloud service or not, you can use the Powershell commands in the link above to assign a different internal IP address within the virtual network to that VM and the public IP address won't be changed.

    Best regards,

    Susie

    Monday, October 6, 2014 3:10 AM
  • Suzie,

    I've tried some commands that were recommended.

    $context = Get-AzureVM -ServiceName IPTestChange -Name IPTestChange
    Set-AzureSubnet -SubnetNames "Static" -VM $context
    Update-AzureVM -ServiceName IPTestChange -Name IPTestChange -VM $context.VM

    This is what I get:

    Update-AzureVM : BadRequest: The virtual network name cannot be null or empty.
    At line:3 char:1
    + Update-AzureVM -ServiceName IPTestChange -Name IPTestChange -VM $context.VM
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : CloseError: (:) [Update-AzureVM], CloudException
        + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.UpdateAzureVMCommand

    Any idea where I'm going wrong?

    Many thanks for the help in advance.  :.)

    Wayne



     

    Monday, October 6, 2014 5:06 PM
  • Hi,

    Thanks for your reply.

    In addition, it seems that the commands you used is not correct. If you want to assign a static IP address to an existing VM, you can use the commands below:

    Get-AzureVM -ServiceName xxx -Name xxx | Set-AzureStaticVNetIP -IPAddress xxx | Update-AzureVM
    

    note: the IP address is an IP address within the virtual network that VM belongs to.

    According to the error message, it seems that you haven't define the virtual network name. I assume that Azure VM hadn't been added to a virtual network when you created it, right? You can check that in the Resources page within the Virtual network to see if that VM is included in that virtual network.

    Best regards,

    Susie

    Tuesday, October 7, 2014 1:46 AM
  • Susie,

    That is my issue, it was was created before the Virtual Network and am trying to add the VM to the Virtual Network.

    Thanks,

    Wayne

    Tuesday, October 7, 2014 12:00 PM
  • Hi Wayne,

    Since the existing VM doesn't belong to a virtual network, maybe you need to delete that VM and keep the attached disks, then you can use that disk to create a new VM and choose the virtual network when creating the VM.

    Best regards,

    Susie

    • Proposed as answer by Susie Long Tuesday, October 14, 2014 2:58 AM
    • Marked as answer by Susie Long Thursday, October 16, 2014 1:53 AM
    Wednesday, October 8, 2014 1:09 AM
  • Wayne,

    As Susie mentioned, to move a VM to an existing VNet, you will need to delete the VM, retain the disks, and recreate the VM in the VNet. As you wish to retain your public IP, during this time, you can spin up a small VM and place it in the same cloud service so that it is running during the process of moving the existing VM to the VNet. Create the VM back in to the cloud service, then once it is turned on, you can delete the small VM you created to hold the IP.

    The best practice, for going forward, if you need to always have a static public IP address, is to use ReservedIP or Public-Instance IP addressing. Both are generally available for use and guarantee you will not lose the Public IP address for any reason.

    Thanks,

    Phillip
    Wednesday, October 8, 2014 12:23 PM
  • Hi,
     
    As this thread has been quiet for a while, we will mark it as ‘Answered’ as the information provided should be helpful. If you need further help, please feel free to reply this post directly so we will be notified to follow it up. You can also choose to unmark the answer as you wish.
      
    BTW, we’d love to hear your feedback about the solution. By sharing your experience you can help other community members facing similar problems. Thanks for your understanding and efforts.

    Best regards,

    Susie   

    Thursday, October 16, 2014 1:53 AM