Azure - Move/Restore a VM from a backup - what is a plan?
Solution 1:
Plan information is metadata Microsoft uses to track Marketplace offers. If you're being prompted for Plan, you have a Marketplace offer--even if it's free. Plan metadata has three parts--Publisher, Offer/Product, and Name/Sku. Depending on where you look, they're referenced differently.
Plan information never changes. It is tattooed into the vhd somehow--I have yet to find out how, but it must be on disk somewhere.
If you're building a VM in Powershell, you just use the Set-AzPlan cmdlet to include the plan data before you create the VM. I don't create a lot thru Powershell, but I've grown into it specifically for Marketplace images.
Undocumented feature--if your publisher pulls the offer that you're using, you will NEVER be able to create a VM with it again. Not from an ASR failover. Not from a backup. So keep an eye on your versions.
I just spent the last 10 hours trying every way I could to recover a VM because the publisher had removed all versions prior to 10.6 of their software. My customer, even tho they're on a fully supported 10.5.1 release, is now fairly hosed.
I even created a HyperV host, downloaded the VHDs and tried to ASR the VM back into Azure to fool it into thinking there was no way this could be a Marketplace image..... no joy.
Couple of very helpful Powershell tidbits for working with Plan: Get-AzVMImageOffer -PublisherName "PUBLISHER" -Location "EastUS" | Get-AzVMImageSku (Lists all SKU/Offer/Publisher combinations in the given region for the given publisher)
Get-AzMarketplaceTerms -Publisher $azureVmPublisherName -Product $azureVmOffer -Name $azureVmSkus | Set-AzMarketplaceTerms -Accept (If you're creating a new VM in Powershell and it's the first time you're deploying this Plan, you have to accept the Marketplace Terms)
Bottom line: Marketplace is great for appliances. We get their lifecycle. Avoid it like the plague for long(er)-term servers. Go to the Virtual Machines list, hit + Add, and pick an OS from the stock drop box they give you.