Skip to content

Commit 87559f1

Browse files
authored
Merge pull request #185437 from Blackmist/workspace-move
Workspace move
2 parents 52bf62d + 94911b4 commit 87559f1

File tree

5 files changed

+120
-1
lines changed

5 files changed

+120
-1
lines changed

articles/machine-learning/how-to-create-workspace-template.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,4 +654,5 @@ To avoid this problem, we recommend one of the following approaches:
654654
* [Deploy resources with Resource Manager templates and Resource Manager REST API](../azure-resource-manager/templates/deploy-rest.md).
655655
* [Creating and deploying Azure resource groups through Visual Studio](../azure-resource-manager/templates/create-visual-studio-deployment-project.md).
656656
* [For other templates related to Azure Machine Learning, see the Azure Quickstart Templates repository](https://github.com/Azure/azure-quickstart-templates).
657-
* To check for problems with your workspace, see [How to use workspace diagnostics](how-to-workspace-diagnostic-api.md).
657+
* [How to use workspace diagnostics](how-to-workspace-diagnostic-api.md).
658+
* [Move an Azure Machine Learning workspace to another subscription](how-to-move-workspace.md).

articles/machine-learning/how-to-manage-workspace-cli.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,3 +439,5 @@ The Azure Machine Learning workspace uses Azure Container Registry (ACR) for som
439439
For more information on the Azure CLI extension for machine learning, see the [az ml](/cli/azure/ml) documentation.
440440

441441
To check for problems with your workspace, see [How to use workspace diagnostics](how-to-workspace-diagnostic-api.md).
442+
443+
To learn how to move a workspace to a new Azure subscription, see [How to move a workspace](how-to-move-workspace.md).

articles/machine-learning/how-to-manage-workspace.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,3 +405,5 @@ Once you have a workspace, learn how to [Train and deploy a model](tutorial-trai
405405
To learn more about planning a workspace for your organization's requirements, see [Organize and set up Azure Machine Learning](/azure/cloud-adoption-framework/ready/azure-best-practices/ai-machine-learning-resource-organization).
406406

407407
To check for problems with your workspace, see [How to use workspace diagnostics](how-to-workspace-diagnostic-api.md).
408+
409+
If you need to move a workspace to another Azure subscription, see [How to move a workspace](how-to-move-workspace.md).
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
---
2+
title: Move workspace between subscriptions (preview)
3+
titleSuffix: Azure Machine Learning
4+
description: Learn how to move an Azure Machine Learning workspace between Azure subscriptions.
5+
services: machine-learning
6+
author: rastala
7+
ms.author: roastala
8+
ms.service: machine-learning
9+
ms.subservice: core
10+
ms.reviewer: larryfr
11+
ms.topic: how-to
12+
ms.date: 01/20/2022
13+
---
14+
15+
# Move Azure Machine Learning workspaces between subscriptions (preview)
16+
17+
As the requirements of your machine learning application change, you may need to move your workspace to a different Azure subscription. For example, you may need to move the workspace in the following situations:
18+
19+
* Promote workspace from test subscription to production subscription.
20+
* Change the design and architecture of your application.
21+
* Move workspace to a subscription with more available quota.
22+
* Move workspace to a subscription with different cost center.
23+
24+
Moving the workspace enables you to migrate the workspace and its contents as a single, automated step. The following table describes the workspace contents that are moved:
25+
26+
| Workspace contents | Moved with workspace |
27+
| ----- |:-----:|
28+
| Datasets | Yes |
29+
| Experiment runs | Yes |
30+
| Environments | Yes |
31+
| Models and other assets stored in the workspace | Yes |
32+
| Compute resources | No |
33+
| Endpoints | No |
34+
35+
> [!IMPORTANT]
36+
> Workspace move is currently in public preview. This preview is provided without a service level agreement, and it's not recommended for production workloads. Certain features might not be supported or might have constrained capabilities.
37+
> For more information, see [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/).
38+
39+
## Prerequisites
40+
41+
- An Azure Machine Learning workspace in the source subscription. For more information, see [Create an Azure Machine Learning workspace](how-to-manage-workspace.md).
42+
- You must have permissions to manage resources in both source and target subscriptions. For example, Contributor or Owner role at the __subscription__ level. For more information on roles, see [Azure roles](/azure/role-based-access-control/rbac-and-directory-admin-roles#azure-roles)
43+
- The destination subscription must be registered for required resource providers. The following table contains a list of the resource providers required by Azure Machine Learning:
44+
45+
| Resource provider | Why it's needed |
46+
| ----- | ----- |
47+
| __Microsoft.MachineLearningServices__ | Creating the Azure Machine Learning workspace. |
48+
| __Microsoft.Storage__ | Azure Storage Account is used as the default storage for the workspace. |
49+
| __Microsoft.ContainerRegistry__ | Azure Container Registry is used by the workspace to build Docker images. |
50+
| __Microsoft.KeyVault__ | Azure Key Vault is used by the workspace to store secrets. |
51+
| __Microsoft.Notebooks/NotebookProxies__ | Integrated notebooks on Azure Machine Learning compute instance. |
52+
| __Microsoft.ContainerService__ | If you plan on deploying trained models to Azure Kubernetes Services. |
53+
54+
If you plan on using a customer-managed key with Azure Machine Learning, then the following service providers must be registered:
55+
56+
| Resource provider | Why it's needed |
57+
| ----- | ----- |
58+
| __Microsoft.DocumentDB/databaseAccounts__ | Azure CosmosDB instance that logs metadata for the workspace. |
59+
| __Microsoft.Search/searchServices__ | Azure Search provides indexing capabilities for the workspace. |
60+
61+
For information on registering resource providers, see [Resolve errors for resource provider registration](/azure/azure-resource-manager/templates/error-register-resource-provider).
62+
63+
- The [Azure CLI](/cli/azure/install-azure-cli).
64+
65+
> [!TIP]
66+
> The move operation does not use the Azure CLI extension for machine learning.
67+
68+
## Limitations
69+
70+
* Workspace move is not meant for replicating workspaces, or moving individual assets such as models or datasets from one workspace to another.
71+
* Workspace move doesn't support migration across Azure regions or Azure Active Directory tenants.
72+
* The workspace mustn't be in use during the move operation. Verify that all experiment runs, data profiling runs, and labeling projects have completed. Also verify that inference endpoints aren't being invoked.
73+
* The workspace will become unavailable during the move.
74+
* Before to the move, you must delete or detach computes and inference endpoints from the workspace.
75+
76+
## Prepare and validate the move
77+
78+
1. In Azure CLI, set the subscription to that of your origin workspace
79+
80+
```azurecli-interactive
81+
az account set -s origin-sub-id
82+
```
83+
84+
2. Verify that the origin workspace isn't being used. Check that any experiment runs, data profiling runs, or labeling projects have completed. Also verify that inferencing endpoints aren't being invoked.
85+
86+
3. Delete or detach any computes from the workspace, and delete any inferencing endpoints. Moving computes and endpoints isn't supported. Also note that the workspace will become unavailable during the move.
87+
88+
4. Create a destination resource group in the new subscription. This resource group will contain the workspace after the move. The destination must be in the same region as the origin.
89+
90+
```azurecli-interactive
91+
az group create -g destination-rg -l my-region --subscription destination-sub-id
92+
```
93+
94+
5. The following command demonstrates how to validate the move operation for workspace. You can include associated resources such as storage account, container registry, key vault, and application insights into the move by adding them to the ```resources``` list. The validation may take several minutes. In this command, `origin-rg` is the origin resource group, while `destination-rg` is the destination. The subscription IDs are represented by `origin-sub-id` and `destination-sub-id`, while the workspace is `origin-workspace-name`:
95+
96+
```azurecli-interactive
97+
az resource invoke-action --action validateMoveResources --ids "/subscriptions/origin-sub-id/resourceGroups/origin-rg" --request-body "{ \"resources\": [\"/subscriptions/origin-sub-id/resourceGroups/origin-rg/providers/Microsoft.MachineLearningServices/workspaces/origin-workspace-name\"],\"targetResourceGroup\":\"/subscriptions/destination-sub-id/resourceGroups/destination-rg\" }"
98+
```
99+
100+
## Move the workspace
101+
102+
Once the validation has succeeded, move the workspace. You may also include any associated resources into move operation by adding them to the ```ids``` parameter. This operation may take several minutes.
103+
104+
```azurecli-interactive
105+
az resource move --destination-group destination-rg --destination-subsctiption-id destination-sub-id --ids "/subscriptions/origin-sub-id/resourceGroups/origin-rg/providers/Microsoft.MachineLearningServices/workspaces/origin-workspace-name"
106+
```
107+
108+
After the move has completed, recreate any computes and redeploy any web service endpoints at the new location.
109+
110+
## Next steps
111+
112+
* Learn about [resource move](/azure/azure-resource-manager/management/move-resource-group-and-subscription)

articles/machine-learning/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,8 @@
297297
href: how-to-manage-workspace-terraform.md
298298
- name: Use REST
299299
href: how-to-manage-rest.md
300+
- name: How to move a workspace
301+
href: how-to-move-workspace.md
300302
- name: Link to Azure Synapse Analytics workspace
301303
href: how-to-link-synapse-ml-workspaces.md
302304
- name: Workspace Diagnostics

0 commit comments

Comments
 (0)