Skip to content

Commit ada93a3

Browse files
committed
adding images and a bit of PowerShell
1 parent 1ec2fbf commit ada93a3

File tree

6 files changed

+69
-31
lines changed

6 files changed

+69
-31
lines changed

articles/storage-mover/bandwidth-management.md

Lines changed: 69 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: stevenmatthew
55
ms.author: shaas
66
ms.service: azure-storage-mover
77
ms.topic: how-to
8-
ms.date: 06/01/2022
8+
ms.date: 07/02/2022
99
---
1010

1111
# Manage network bandwidth of a Storage Mover agent
@@ -24,13 +24,7 @@ A schedule is an attribute of a registered server. In the portal, you can set an
2424

2525
A bandwidth management schedule describes time windows throughout a week, during which you can set a limit on how much upload bandwidth a Storage Mover agent is allowed to use.
2626

27-
<!--
28-
!########################################################
29-
30-
IMAGE of week-long b/w schedule window
31-
32-
!########################################################
33-
-->
27+
:::image type="content" source="media/bandwidth-management/bandwidth-full-schedule-small.png" alt-text="Azure portal dialog showing a calendar, similar to Outlook, with scheduled bandwidth limitation windows." lightbox="media/bandwidth-management/bandwidth-full-schedule.png":::
3428

3529
This schedule looks a lot like a calendar in outlook, but there are a few important differences:
3630

@@ -40,41 +34,28 @@ This schedule looks a lot like a calendar in outlook, but there are a few import
4034
- The schedule doesn't store a timezone. When you set a limit that starts for instance at 9am, then that means agent-local time. You can see what timezone is configured for the agent. Pay close attention, the agent's timezone may be different from the timezone of your site where the agent is deployed.
4135

4236
## Enabling or changing a bandwidth management schedule
43-
<!-- ########################################################
44-
Tabs: portal / PowerShell
45-
########################################################-->
4637

4738
Using the Azure portal, you can enable a bandwidth schedule on a registered agent resource.
4839
1. With the portal showing your Storage Mover resource, select the "*Registered agents*" in the menu on the left.
4940
1. You now have two options to set or view a schedule. You can find the column "*Bandwidth management*" and click on the link for your selected agent. Or, you can select the checkbox in front of your agent. That enables and a command button above the list of agents, labeled "*Manage bandwidth limit*".
50-
<!-- !########################################################
51-
IMAGE of column and command button
52-
!######################################################## -->
41+
:::image type="content" source="media/bandwidth-management/bandwidth-registered-agents-command-small.png" alt-text="Azure portal, registered agents blade, showing to select and agent and then select the Bandwidth Management command." lightbox="media/bandwidth-management/bandwidth-registered-agents-command.png":::
5342
1. The bandwidth management window opens and displays the schedule currently in effect for the agent. When an empty schedule is shown, there are no bandwidth limitations defined for this agent.
5443

5544

5645
## Setting a bandwidth limit
57-
<!-- ########################################################
58-
Tabs: portal / PowerShell
59-
########################################################-->
46+
6047
1. Open the bandwidth scheduling window. ([see previous section](#enabling-or-changing-a-bandwidth-management-schedule))
6148
1. You can create a custom schedule for this selected agent, or you can [reuse a schedule](#reusing-a-schedule-from-another-agent) that was previously created for another agent.
6249
1. To create a custom schedule, select the "Add limit" command. A dialog opens, allowing you to define a time slice during which you want to set the maximum bandwidth on your WAN link, that the agent is allowed to use.
63-
<!--
64-
!########################################################
65-
IMAGE of Add limit window
66-
!########################################################
67-
-->
68-
1. The dialog requires you to set a start and an end-time during which you want to apply an uplink limit for the agent. You can then pick on which days of the week you like to apply your new limit. Select all weekdays during which you like to apply the same limit. You then need to specify the limit in Mbps (Megabits per second). Overlapping times aren't allowed. Any limit you set, applies at the displayed time in the agent's timezone. You can find the agent's timezone displayed at the top of the bandwidth management window. You may need to offset your schedule or adjust the agent's timezone. Find more details in the paragraph: "*[Reusing a schedule from another agent](#reusing-a-schedule-from-another-agent)*".
50+
:::image type="content" source="media/bandwidth-management/bandwidth-add-limit.png" alt-text="An Azure portal dialog showing the inputs to set a limit for a custom time period.":::
51+
1. The dialog requires you to set a start and an end-time during which you want to apply an uplink limit for the agent. You can then pick on which days of the week you like to apply your new limit. Select all weekdays during which you like to apply the same limit. You then need to specify the limit in Mbps (Megabits per second). Overlapping times aren't allowed. Any limit you set, applies at the displayed time in the agent's timezone. You can find the agent's timezone displayed at the top of the bandwidth management window. You may need to offset your schedule or adjust the agent's timezone. Find more details in the paragraph: "[Reusing a schedule from another agent](#reusing-a-schedule-from-another-agent)".
6952
1. To apply your changes to this agent, select the "*Save*" button at the bottom of the "*Bandwidth management*" window.
7053

7154
> [!NOTE]
7255
> The bandwidth limit you set limits the *migration data stream* the agent will establish to your target storage in Azure. However, in addition to this data stream, there is control plane traffic from the agent to Azure. Control messages, progress telemetry, and copy logs generally require only a small amount of bandwidth. To ensure proper functionality of the agent throughout your migration, the control plane of the agent is not governed by the limit schedule you set. In an extreme case the agent may exceed the limits you defined by a small amount.
7356
7457
## Changing or deleting a bandwidth limit
75-
<!-- ########################################################
76-
Tabs: portal / PowerShell
77-
########################################################-->
58+
7859
Open the bandwidth management schedule for your selected agent. ([see previous section](#enabling-or-changing-a-bandwidth-management-schedule))
7960

8061
If you like to edit or delete a specific limit, select the limit and the "*Edit limit*" dialog opens. You can adjust the time slot or delete the limit. There are no bulk-editing options, so you must edit every limit on every weekday individually.
@@ -85,10 +66,7 @@ Don't forget to apply your changes to this agent. Select the "*Save*" button at
8566

8667

8768
## Reusing a schedule from another agent
88-
You can reuse the bandwidth limit schedule from another agent for your currently selected agent.
89-
90-
> [!IMPORTANT]
91-
> Schedules are stored free of a timezone. That enables them to be reused on other agents. A scheduled limit will be in effect during this time in whatever the agent's timezone is. You need to ensure that you offset your bandwidth management schedule if the agent's timezone is different to the one used in the location you've deployed the agent in. For example, if the agent's timezone is UTC but your agent is actually deployed in the Pacific timezone (PST), you need to offset your schedule by -7 hours or adjust your agent's timezone to the correct one for the location. Alternatively, you can adjust the agent's timezone to the correct one for the location. Doing this removes the need to offset your schedule and also enables your schedule to automatically adjust to Daylight Savings, should your timezone observe that.
69+
You can reuse the bandwidth limit schedule from another agent.
9270

9371
1. Open the bandwidth management schedule for your selected agent. ([See the previous paragraph.](#enabling-or-changing-a-bandwidth-management-schedule))
9472
1. Select the command "*Import limits from other agents*" and select the agent you like to copy the schedule from. If there are no agents in the list, then there's no other agent that has a schedule set.
@@ -97,11 +75,71 @@ You can reuse the bandwidth limit schedule from another agent for your currently
9775
1. Optionally, you can now modify this copied schedule.
9876
1. To apply your changes to this agent, select the "*Save*" button at the bottom of the "*Bandwidth management*" window.
9977

100-
## Use PowerShell to configure a bandwidth limit schedule.
78+
> [!IMPORTANT]
79+
> Schedules are stored free of a timezone. That enables them to be reused on other agents. A scheduled limit will be in effect during this time in whatever the agent's timezone is. You need to ensure that you offset your bandwidth management schedule if the agent's timezone is different to the one used in the location you've deployed the agent in. For example, if the agent's timezone is UTC but your agent is actually deployed in the Pacific timezone (PST), you need to offset your schedule by -7 hours or adjust your agent's timezone to the correct one for the location. Alternatively, you can adjust the agent's timezone to the correct one for the location. Doing this removes the need to offset your schedule and also enables your schedule to automatically adjust to Daylight Savings, should your timezone observe that.
80+
81+
## Use PowerShell to configure a bandwidth limit schedule
10182
<!-- ########################################################
10283
Add all cmdlets - better to have them in one place.
10384
########################################################-->
10485

86+
### Prepare your Azure PowerShell environment
87+
88+
[!INCLUDE [azure-powershell-requirements-no-header.md](~/includes/azure-powershell-requirements-no-header.md)]
89+
90+
If you haven't yet installed the `Az.StorageMover` module:
91+
92+
```powershell
93+
## Ensure you are running the latest version of PowerShell 7
94+
$PSVersionTable.PSVersion
95+
96+
## Your local execution policy must be set to at least remote signed or less restrictive
97+
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
98+
99+
## If you don't have the general Az PowerShell module, install it first
100+
Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force
101+
102+
## Lastly, the Az.StorageMover module is not installed by default and must be manually requested.
103+
Install-Module -Name Az.StorageMover -Scope CurrentUser -Repository PSGallery -Force
104+
105+
```
106+
### Manage a bandwidth limit schedule
107+
108+
109+
```powershell
110+
111+
## Set variables
112+
$subscriptionID = "Your subscription ID"
113+
$resourceGroupName = "Your resource group name"
114+
$storageMoverName = "Your storage mover resource name"
115+
$registeredAgentName = "Name of the agent, registered to your storage mover resource"
116+
117+
## Log into Azure with your Azure credentials
118+
Connect-AzAccount -SubscriptionId $subscriptionID # -DeviceLogin #Leverage DeviceLogin if you need to authenticate your PowerShell session from another machine. # -TenantID #In some environments you may you need to specify the EntraID tenant to authenticate against.
119+
120+
#------------
121+
# GET the schedule configured on an agent:
122+
$schedule = (Get-AzStorageMoverAgent -ResourceGroupName $resourceGroupName -StorageMoverName $storageMoverName -AgentName registeredAgentName).UploadLimitScheduleWeeklyRecurrence[0]
123+
# $schedule then contains a JSON structure with elements for each configured time windows and the upload limit in Mbps that applies during this window.
124+
125+
#------------
126+
# SET a new bandwidth limitation window on Monday and Tuesday:
127+
$timeblock = New-AzStorageMoverUploadLimitWeeklyRecurrenceObject `
128+
-Day ["Monday", "Tuesday"] ` #Mandatory. An array, limited to the English names of all 7 days, Monday through Sunday in any order.
129+
-LimitInMbps 900 ` # Mandatory. limit in "Mega bits per second"
130+
-StartTimeHour 5 ` # Mandatory. 24-hour clock: 5 = 5am
131+
-EndTimeHour 17 ` # Mandatory. 24-hour clock: 17 = 5pm
132+
-EndTimeMinute 30 # Optional. Time blocks are precise to 30 Minutes. -EndTimeMinute 0 is equivalent to omitting the parameter. The only other acceptable value is the half hour mark: 30.
133+
134+
TODO:
135+
I need to see how to add a single new time block to an empty or existing schedule.
136+
I need to see the best method of editing a schedule.
137+
I need to see how I can delete a schedule.
138+
139+
I would like to document the JSON schema through an annotated example schedule.
140+
141+
```
142+
105143

106144
## Next steps
107145

20.5 KB
Loading
23 KB
Loading
36.9 KB
Loading
16 KB
Loading
30 KB
Loading

0 commit comments

Comments
 (0)