Azure: Moving an App Service to another existing App Service Plan
Asked Answered
M

7

64

I'm attempting to move an App Service from one service plan to another. When I use the portal to do so, the other App Service plan is not displaying.

Both App Services are in the same Location and Resource Group. The two App Services Plans are in the same location and have the same pricing tier.

I use the "Change App Service Plan" option for the web app. The only App Service Plan that is displayed is the current one. There is also a "Create New" option.

So, in summary: 1) Why is the other App Service Plan not able to be selected. 2) How can I move the App Service (Web App) to the other App Service Plan.

Madlynmadman answered 10/1, 2016 at 17:45 Comment(4)
Is the pricing tier the same between the two app service plans?Filing
Does the answer help you?Adame
@RickRainey Yes, as stated in the question, the two plans are the same pricing tier.Madlynmadman
I have just tested this, and it does appear to work with a Service plan in the same Resource Group. Pricing tier makes no difference either (I could move from Standard to Shared and back again) Try creating two new plans and see if it works as a basic test. It might give some pointersArtillery
A
26

The reason why you are not able to see the other App Service Plan when you try to change the App Service Plan is due to current limitations in moving the Azure web app resources.

The other App Service Plan which you intend to move your Web Apps to is in another resource group with existing Azure Web Apps, which is not supported currently

Azure Web Apps current move limitations updated 01/04/2016

Hope this answer your question.

Adame answered 11/1, 2016 at 1:8 Comment(9)
The web apps are in the same resource group, but the plans are not. In which case, how can I change the resource group of a app service plan?Madlynmadman
It is easier to create a new app service plan in your current resource group and switch overAdame
Also, according to this link, the fact that the App Service Plans are in different resource groups should not matter.Madlynmadman
If I did that, I'd run into the same issue still. I currently have Web Apps in both app service plans. The idea is the need to all be in the same app service plan.Madlynmadman
@StephanieJ., I updated my answer after more in-depth and find the actual root cause, hope this is the answer you need.Adame
Yes based on your scenarioAdame
It's still not possible to do so. I don't get why it is not technically possible.Zagreb
Geez this limitation is dumb.Genuine
For all searching who searching for the solution this is possible now, please see my answer below.Posticous
E
26

Not sure if it is something recent, but it seems it is finally possible. The option is in the main resource menu as "Change App Service plan". See:

Change Azure App service plan

I was able to move an app service(website) and also its deployment slot to a different plan (with same parameters and location - but did not try if this is a requirement).

Extracanonical answered 24/9, 2018 at 17:50 Comment(2)
Unfortunately I've got "No App Service Plans Found" message but my plans are in different resource groups. Maybe this is the reason.Plural
This portal option can only be used if THREE conditions are met: The new App Service plan must (1) exist in the same resource group, (2) exist in the same geographical region, and (3) exist in the same webspace (source). The first two conditions are easy, the third is hard to determine and impossible to fix currently, if they are in different webspaces. Cloning is currently the only option if you still can't move to the plan you want toImmobilize
P
6

Yes, we can now move the App Service Plan using the Change App Service Plan.

But sometime you will get No App Service Plan Found as this is the known restriction for the moving App Service plan.

Restrictions

  • We can move the App service plan only if the new plan is in the same resource group and geographical location.- These two conditions is is to ensure the new plan is in same webspace
Webspace

Azure deploys each new App Service plan into a deployment unit, internally called a webspace. Each region can have many webspaces, but your app can only move between plans that are created in the same webspace. An App Service Environment is an isolated webspace, so apps can be moved between plans in the same App Service Environment, but not between plans in different App Service Environments.

You can’t specify the webspace you want when creating a plan, but it’s possible to ensure that a plan is created in the same webspace as an existing plan. In brief, all plans created with the same resource group and region combination are deployed into the same webspace. For example, if you created a plan in resource group A and region B, then any plan you subsequently create in resource group A and region B is deployed into the same webspace. Note that plans can’t move webspaces after they’re created, so you can’t move a plan into “the same webspace” as another plan by moving it to another resource group.

You can find this in the official doc here and here

You can also refer this SO

Posticous answered 1/11, 2018 at 1:31 Comment(1)
June 2019 - is this still a restriction? Also wondering, does a content and visual studio product download of an Azure function save App configuration like app variables?Huckleberry
P
0

You can configure a backup and restore on the new App Service under the new APp Service Plan.

Backup an app: https://learn.microsoft.com/en-us/azure/app-service/manage-backup#:~:text=The%20Backup%20and%20Restore%20feature,or%20restoring%20to%20another%20app.

Particularism answered 21/7, 2020 at 4:21 Comment(0)
C
0

Put your code in DevOps and deploy it to the new service plan and point DNS.

Cushat answered 29/1, 2021 at 14:59 Comment(0)
K
0

This is 2024 update.

You said that

Both App Services are in the same Location and Resource Group

so normally when you will click on Change App Service Plan within the web app in azure portal, the other app service plans list which reside in the same region and Resource Group must show up.

There is a possible explanation for this, that the app service plans that you created, were in other resource groups, then you moved them within the same RG and Region, that's why they didn't appear for you, just those app service plans which were created within the same RG and Region are the ones that you can move web app between them.

as stated in the Microsoft Documentation:

You can move an app to another App Service plan, as long as the source plan and the target plan are in the same resource group, geographical region, and of the same OS type.

BUT NOTE THAT:

Each region can have many webspaces, but your app can only move between plans that are created in the same webspace. An App Service Environment can have multiple webspaces, but your app can only move between plans that are created in the same webspace.

so there is something which is called webspaces, let's say we have :

App Service Plan called A and another one called B:

   A Plan:  within `Main RG` and in `North Europe` with 1 web app hosted
   B Plan:  within `Sub RG` and in `North Europe` with 1 web app hosted

Let's say both of them have one web app, later I decided to move my app service plan B to the same region and RG of A Plan.

everything is fine now, days has passed, and I decided to move an app from B Plan to A Plan and delete B Plan, normally it would work because I moved the plans in the same Place, but unfortunately both of them when they have been created, they have been assigned to different webspaces, so you can't move apps between them.

You can check webspace of your web app under Overview -> JSON View

you will see something like:

"properties": {
        "name": "webapp-Production-name",
        "state": "Running",
        "hostNames": [
            "webapp-production.azurewebsites.net"
        ],
        "webSpace": "WebAppProductionRG-NorthEuropewebspace",

enter image description here

#Solution

  • Either you will have to Create a new app service plan and recreate your desired web apps within it, then redeploy to them.
  • or you can try the clone option within azure portal, you can do it too using AZ cli, It can be found under web app -> Development Tools -> Clone App '(Unfortunately the clone option is available only in windows web apps, and not available for Function Apps :/)':

Clone Azure App

Karaganda answered 14/2 at 18:32 Comment(0)
S
-1

thank you for the tips i found a work around. you can move app service plan to the same resource group, and then you can move apps from one plan to another. Move resource first will do a check, after that you can review and finally move.

Schott answered 9/5, 2022 at 8:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.