Is it possible to re-deploy Azure VM with different image

Hrvoje Kusulja 146 Reputation points MVP
2019-11-04T11:48:17.65+00:00

I need to re-deploy existing Azure VM , but choose different image (for example from Debian 9 to Debian 10 linux VM), so leaving other settings, like network, ip addreses etc, will stay the same. Re-deploy currently works with existing start image, but how to choose another image during deployment?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,035 questions
0 comments No comments
{count} votes

Accepted answer
  1. Micah McKittrick 946 Reputation points Microsoft Employee Moderator
    2019-11-05T00:58:46.287+00:00

    This is not possible. Redeploying the VM simply moves the VM to a new host node in the data center. It keeps the same OS disk and everything else just is allocated to a new node.

    If you want to deploy a different image you will need to create a new VM.

    You could attempt to manually update from Debian 9 to 10 however Azure does not support in place upgrades that require user input during the update process. For example, updating from Windows Server 2012 to Server 2016 is not supported as during the update process it requires the user to input some details. However during the upgrade process RDP is not running so there is no way for the user to actually input the data hence the VM gets stuck in that mode.

    You can also consider deleting the Virtual Machine and keeping the Network Interface, Vnet, etc. That way you can create a new VM with the image you want then attach the old NIC with the old IP address to it. Make sure the IP address is set to Static though. Also, a VM must always have at least 1 NIC attached so you would likely need to create a secondary NIC on of the VMs so you can actually detach it from the VM prior to deleting.

    You can find some information about static IPs and attaching an existing IP to a new VM using the following Links:

    6 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.