A Storage Mover is a top-level resource and is deployed into an Azure resource group. Storage Mover agents are registered with a storage mover. The storage mover also holds migration projects and everything you need to define and monitor the migration of your individual sources to their targets in Azure.
In this article, you'll learn how to deploy a storage mover to your resource group.
Prerequisites
You should read the Planning for a storage mover deployment article before continuing with your first deployment. The article shares best practices for selecting an Azure region for your storage mover, the number of storage mover resources you should consider creating and more useful insights.
Before deploying a storage mover resource, make sure you have the appropriate permissions in your selected subscription and resource group.
If there has never been a storage mover deployed in this subscription and you are not a subscription owner, review the section Getting your subscription ready in the planning guide mentioned before.
To deploy a storage mover into a resource group, you must be a member of the Contributor or OwnerRBAC (Role Based Access Control) role for the selected resource group. The section Permissions in the planning guide has a table outlining the permissions you need for various migration scenarios.
Navigate to the Create a resource link in the Azure portal.
Search for Azure Storage Mover. When you identify the correct search result, select the Create button. A wizard to create a storage mover resource opens.
If you prefer to run CLI reference commands locally, install the Azure CLI. If you're running on Windows or macOS, consider running Azure CLI in a Docker container. For more information, see How to run the Azure CLI in a Docker container.
If you're using a local installation, sign in to the Azure CLI by using the az login command. To finish the authentication process, follow the steps displayed in your terminal. For other sign-in options, see Sign in with the Azure CLI.
When you're prompted, install the Azure CLI extension on first use. For more information about extensions, see Use extensions with the Azure CLI.
Run az version to find the version and dependent libraries that are installed. To upgrade to the latest version, run az upgrade.
To create a storage mover resource, use the az storage-mover create command. You'll need to supply values for the required --name, --resource-group, --location parameters. The -description and tags parameters are optional.
## Log into your Azure CLI account, a browser window will appear so that you can confirm your login.
az login
## The Azure Storage Mover extension for CLI is not installed by default and needs to be installed manually. Install the Azure Storage Mover extension without a prompt.
az config set extension.use_dynamic_install=yes_without_prompt
## Set variables
$storageMoverName = "The name of the Storage Mover resource."
$resourceGroupName = "Name of resource group"
$description = "A description for the storage mover."
$location = "The geo-location where the resource lives. When not specified, the location fo the resource group will be used."
$tags = "Resource tags. Support shorthand-syntax, json-file and yaml-file. Try '??' to show more."
## Create a Storage Mover resource.
az storage-mover create --Name $storageMoverName \
--ResourceGroupName $resourceGroupName \
--Location $location \
The New-AzStorageMover cmdlet is used to create new storage mover resource in a resource group. If you haven't yet installed the Az.StorageMover module:
## Ensure you are running the latest version of PowerShell 7
$PSVersionTable.PSVersion
## Your local execution policy must be set to at least remote signed or less restrictive
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
## If you don't have the general Az PowerShell module, install it first
Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force
## Lastly, the Az.StorageMover module is not installed by default and must be manually requested.
Install-Module -Name Az.StorageMover -Scope CurrentUser -Repository PSGallery -Force
To deploy a storage mover resource, you'll need to supply values for the required -Name, -ResourceGroupName, and -Region parameters. The -Description parameter is optional.
## Set variables
$subscriptionID = "Your subscription ID"
$resourceGroupName = "Your resource group name"
$storageMoverName = "Your storage mover name"
$description = "Optional, up to 1024 characters"
## Log into Azure with your Azure credentials
Connect-AzAccount -SubscriptionId $subscriptionID
## If this is the first storage mover resource deployed in this subscription:
## You need to manually register the resource provider namespaces Microsoft.StorageMover and Microsoft.HybridCompute with your subscription.
## This only needs to be done once per subscription. You must have at least Contributor permissions (RBAC role) on the subscription.
Register-AzResourceProvider -ProviderNamespace Microsoft.StorageMover
Register-AzResourceProvider -ProviderNamespace Microsoft.HybridCompute
## The value for the Azure region of your resource stems from an enum.
## To find the correct Location value for your selected Azure region, run:
## Get-AzLocation | select displayname,location
## Create a storage mover resource
New-AzStorageMover `
-Name $storageMoverName `
-ResourceGroupName $resourceGroupName `
-Location "Your Location value"
Next steps
Advance to one of the next articles to learn how to deploy a Storage Mover agent or create a migration project.