Share via


How to Reimage Azure VM.

Question

Thursday, August 18, 2016 7:30 PM

I set up a new instance with Ubuntu 16.04 in azure.While configuring my Web Application, i screwed some settings. Which i am not able to fix,
I want to start with the new OS image with the current instance, I cant delete the VM as i have configured its Public IP in my DNS server. How can i proceed with it. All I want to format the OS disk with new OS.

All replies (4)

Friday, August 19, 2016 12:31 PM

Hello Junaid,

Greetings from Microsoft Azure.

Are you deleting the VM from the portal?

If yes, you can try deleting the VM through PowerShell by checking the link below:

https://blogs.technet.microsoft.com/parallel_universe_-_ms_tech_blog/2013/12/17/deleting-vm-in-azure-powershell-script/

If it is an ARM VM, please follow the link below:

https://azure.microsoft.com/en-in/documentation/articles/virtual-machines-windows-ps-manage/

Regards,

Sapna Girish

Sapna G


Friday, August 19, 2016 6:02 PM

Hi Sapna,

I dont want to delete the VM, I just want to replace the OS in same VM.

My aim is to retain the Public IP assigned to this instance. If that's possible with any other way, i would love to know.

Thanks
Junaid Baba


Saturday, August 20, 2016 1:03 PM

Hello Junaid,

Thanks for getting back to us.

As per my understanding, there is no option to retain the public IP of the VM instance.

Regards,

Sapna Girish

Sapna G


Saturday, August 20, 2016 1:32 PM

Greetings,

the way to keep a Public IP for a VM instance is fairly simplistic.
the rule is, if there is no resource behind the IP, the IP is released.

1.Create a new machine
2.assign the Public towards that new machine.
3. Delete the old one.

But in believe you're seeking for a different solution that has been documented on the following location:
https://blogs.msdn.microsoft.com/mast/2014/11/20/recover-azure-vm-by-attaching-os-disk-to-another-azure-vm/

just be sure to add the public IP to another resource while you do this :)

with regards,

Sebastian