Azure-docs: Please provide alternatives for moving VM with marketplace plan

Created on 15 Nov 2020  Â·  10Comments  Â·  Source: MicrosoftDocs/azure-docs

Please provide some alternatives when it comes to moving Azure virtual machines with a marketplace plan attached to it. Preferably non-distructive ways of doing so.

Neither documentation provides such information:

For instance:

  • Can the VM be deleted and the OS disk be moved to new subscription, then recreate the VM from

    • The marketplace offer in question?

    • Regular VM re-using the OS disk, or will it fail because of no marketplace plan?

  • Can a marketplace plan VM be cloned using say Azure Backup to clone OS disk, then recreate VM on top of it?
  • Are they really no non-destructive ways of moving a marketplace plan VM to a new subscription?

Side note

The offer in question here is (from PowerShell Az.Resources Get-AzResource):

image

From Azure portal export template on VM

image

which also doesn't really provide me enough info into what marketplace offer was used, or if it even exists anymore. Is it this one?

Resources


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

assigned-to-author azure-resource-managesvc doc-enhancement managemensubsvc triaged

All 10 comments

@o-l-a-v Thanks for your comment! We will review and provide an update as appropriate.

@o-l-a-v - thanks for this feedback. I am trying to get more information from internal experts.

@o-l-a-v - I have been given a workaround that might work but I am not seeing your plan in any of the current offerings, which might be a problem. Before getting into the workaround, did you try moving the VM and get an error?

Here's the workaround:

  1. Copy plan info
  2. Clone the OS disk to the destination subscription OR move the original disk after deleting the VM from source subscription
  3. In the destination subscription, accept the marketplace terms for your plan so you can use it for new deployments (this step could be the problem if the plan is no longer available)
  4. In the destination subscription, recreate the VM from the cloned OS disk using PowerShell, CLI, or ARM Template. Include the marketplace plan info that's attached to the disk. This should match the plan you purchased in the new subscription.

Let me know if that works.

@tfitzmac

Thank you.

I'm pretty sure the customer tried regular move first, but I've asked for a confirmation on that one.

Regarding marketplace plans/ offerings:

  • Seems not thought through when offerings, even from Microsoft, can just disappear, expire, and then a VM can't be moved to new subscriptions.
  • Also it's strange not to have a unique identifier like a GUID so there can be no confusion about what plan we're talking about.

    • So you can't tell which one it is either? Can't confirm it's the one I linked in OP? (https://azuremarketplace.microsoft.com/en-us/marketplace/apps/microsoft-dsvm.ubuntu-1804?tab=Overview)

  • Would be great in these scenarios to either allow for move just like a regular VM, or for VMs where plan/ offer is discontinued, allow to recreate VM on top of the os disk from a regular OS image, like Ubuntu 18.04 if that's the OS in use here.

Will come back when I know more.

We have difficulties to determine what marketplace plan/ offer a given plan (by info from ARM export or Az PowerShell) is referencing to. Do you have any guidence to share here?

We've found one more plan for current customer:

image

How do I know if a Marketplace offer is this exact plan?

Edit:

So I tried following, found the offers, thats good I guess? "PlanName" etc. is directly from ARM template export of the VM.

# Bitnami Mattermost 3-6
$VMLocation    = [string] 'North Europe'
$PlanName      = [string] '3-6'
$PlanProduct   = [string] 'mattermost'
$PlanPublisher = [string] 'bitnami'

# Microsoft-Ads Linux-Data-Science-Vm-Ubuntu Linuxdsvmubuntu 
$VMLocation    = [string] 'North Europe'
$PlanName      = [string] 'linuxdsvmubuntu'
$PlanProduct   = [string] 'linux-data-science-vm-ubuntu'
$PlanPublisher = [string] 'microsoft-ads'

# Get
(Get-AzVMImageSku -Location $VMLocation -PublisherName $PlanPublisher -Offer $PlanProduct).Where{$_.'Skus' -eq $PlanName}

@tfitzmac

I've found what I think is the Azure marketplace offer for the one critical VM that has to be moved.

https://azuremarketplace.microsoft.com/en-us/marketplace/apps/bitnami.mattermost

How would you go about "In the destination subscription, accept the marketplace terms for your plan so you can use it for new deployments"? Add a dummy VM from the Marketplace offer, delete it, all good?

Edit: Probably here?

image

@o-l-a-v - you can add an instance and delete it. Or, run the following PowerShell command:

Get-AzMarketplaceTerms -Publisher {publisher} -Product {product/offer} -Name {name/SKU} | Set-AzMarketplaceTerms -Accept

The workaround steps have been added to the article.

We'll close this item for now. If there is more that needs to be added to the docs, let us know.

please-close

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ianpowell2017 picture ianpowell2017  Â·  3Comments

JeffLoo-ong picture JeffLoo-ong  Â·  3Comments

spottedmahn picture spottedmahn  Â·  3Comments

Favna picture Favna  Â·  3Comments

mrdfuse picture mrdfuse  Â·  3Comments