Question

I had two VMs running in azure and went over my free limit for this month. I enabled the ability to charge my account and found they were gone.

The VM disks are still there but the VMs themselves have been made into hosted services. To recreate the VM I deleted the hosted service, then went to the create new VM dialog like I've seen others post previously. Under the "create from disk" option I do not see either of my OS disks as options to create a VM. Is this the right way to recreate VMs or am I missing something?

Also of note, the disks still show up as attached to the deleted VMs in the portal.

Était-ce utile?

La solution

As you mentioned that your OS VHD still shows connected with deleted VM, you would need to take care that first. You can run the BreakLease.ps1 Powershell script in this forum discussion to remove the lease first and then use the Os disk VHD to create a new OS Image. Finally you can use the new OS image to create your new Virtual machine.

Alternatively if you just want to reuse the same OS disk vhd to create a new virtual machine, you can follow the blog below and look for section at the bottom "To reuse the OS VHD blob to create OS Image" to copy the blocked OS blob into a new blob and then use it:

Using OS disk VHD to create a new Virtual Machine if OS VHD is still on lease in Windows Azure Virtual Machines

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top