2
votes

I have resource group "MyResources", that contains 4 resources:

  • AppService - myserver,
  • AppServicePlan - MyServerWestEuFarm,
  • ApplicationInsights - myserver-insights,
  • StoregeAccount - myserverstorage

When I try to move them to another subscription, I get error message:

Cannot move resources because some site(s) are hosted by other resource group(s) but located in resource group 'MyResources'. The list of sites and corresponding hosting resource groups: myserver:vyvojari.sk'. This may be a result of prior move operations. Move the site(s) back to respective hosting resource groups and try again. (Code: BadRequest, Target: Microsoft.Web/serverFarms)

What does that mean? Especially myserver:vyvojari.sk is confusing.

"vyvojari.sk" is another resource group and it may be possible that I've created myserver appservice in that resource group in the past and moved. So what?

In the resource explorer for the myserver AppService I see:

{
  "id": "/subscriptions/xxxxxxxx-d9e0-4769-8440-8cd7968bf94d/resourceGroups/MyResources/providers/Microsoft.Web/sites/myserver",
  "name": "myserver",
  "type": "Microsoft.Web/sites",
  "kind": "app",
  "location": "West Europe",
  "properties": {
    "name": "myserver",
    "state": "Running",
    "hostNames": [
      "myserver.azurewebsites.net"
    ],
    "webSpace": "vyvojari.sk-WestEuropewebspace",
    "selfLink": "https://waws-prod-am2-071.api.azurewebsites.windows.net/subscriptions/xxxxxxxx-d9e0-4769-8440-8cd7968bf94d/webspaces/vyvojari.sk-WestEuropewebspace/site/myserver",
    "repositorySiteName": "myserver",

But what is webspace and selflink? How can I change it?

3

3 Answers

2
votes

This may be too obvious but I think, they want you to move back the 'myserver' resource to the 'vyvojari.sk' resource group. Once that is done, do the subscription operation.

It is possible that although, myserver is in the current resource (you have said that you may have moved it here) is still 'hosted' in that vyvojari resource group despite being part of the current group. By this logic, looks like moving it back to vyvojari should allow you do your subscription related task.

0
votes

You need to consider the following limitations when moving the App Services to another Resource Group/Subscription.

When working with App Service apps, you cannot move only an App Service plan. To move App Service apps, your options are:

  • Move the App Service plan and all other App Service resources in that resource group to a new resource group that does not already have App Service resources. This requirement means you must move even the App Service resources that are not associated with the App Service plan.

  • Move the apps to a different resource group, but keep all App Service plans in the original resource group.

The App Service plan does not need to reside in the same resource group as the app for the app to function correctly.

For more details about limitations, refer to this documentation. You will be able to move the resources only if all the requirements/conditions are met.

0
votes

You should have moved the resources back to original resource group (as per the error, myResources), migrate to different subscription, and than re-segment them into respected resource groups, as needed.