Skip to content

Step 3: Datacenters and Arc (T-3)

Who: Team lead. Students still have nothing to run at T-3. When: By T-3 (3 days before day one). About 35 to 60 minutes per concurrent wave of MAX_PARALLEL member jobs (default 20).

In Step 3, the team lead dispatches the member stage from <event>-lead across all n workload subscriptions. Each member job creates rg-datacenter (vm-app01, vm-dev01, Bastion Standard, and NAT Gateway), runs Test-Datacenter.ps1 before Azure Arc disables guest run commands, and—only when every check passes—onboards vm-app01 and its SQL Server 2022 instance to Azure Arc.

Datacenter resources start billing at Step 3 and continue until teardown at T+2 (Bastion, NAT Gateway, and Premium disks continue to bill while VMs are deallocated; see Cost).

Your datacenter in your own workload subscription: vm-app01 runs the legacy Contoso University on IIS with SQL Server 2022 and is Arc-enabled; vm-dev01 is your Windows 11 workstation with VS Code, GitHub Copilot and the Upgrade agent. Both have no public IP and are reached through Azure Bastion, with a NAT gateway for outbound traffic.
What each member job deploys in its assigned workload subscription: vm-app01 (legacy app + Arc) and vm-dev01 (student workstation). Open full size

3.1 Deploy all datacenters and onboard Azure Arc

Section titled “3.1 Deploy all datacenters and onboard Azure Arc”

Run all dispatches from factory/ in <event>-lead.

  1. Tune job concurrency if needed (optional). By default, <event>-lead runs up to 20 concurrent member jobs (MAX_PARALLEL). To adjust concurrency for your GitHub runner pool or regional ARM throttling limits, set the MAX_PARALLEL repository variable on <event>-lead before dispatching:

    Terminal window
    gh variable set MAX_PARALLEL --body "20"
  2. Dispatch the member stage across the cohort (wait for each run to finish before starting the next). Decide before your first dispatch which slots hold eligible Windows Server Azure Hybrid Benefit licenses—once a slot is Arc-onboarded, re-running member refuses to overwrite it (see Azure Hybrid Benefit):

    • All slots eligible (up to 256 members):

      Terminal window
      gh workflow run platform.yml -f stage=member -f members=all
    • Mixed Hybrid Benefit cohort: partition your roster into disjoint index sets before deploying—run eligible indexes without the flag, wait for that run to finish green, then run ineligible indexes with -f no-hybrid-benefit=true:

      Terminal window
      gh workflow run platform.yml -f stage=member -f members=<eligible-indexes>

      Once the first batch finishes green:

      Terminal window
      gh workflow run platform.yml -f stage=member -f members=<ineligible-indexes> -f no-hybrid-benefit=true
    • Large cohort (above 256 members, or staged waves): dispatch in index ranges of at most 256 jobs—waiting for each batch to finish green before dispatching the next:

      Terminal window
      gh workflow run platform.yml -f stage=member -f members=1-50

      Once 1-50 finishes green:

      Terminal window
      gh workflow run platform.yml -f stage=member -f members=51-100
  3. Verify Test-Datacenter results in the Actions summary. Open the workflow run in <event>-lead > Actions. Confirm every member job is green and every row in its Test-Datacenter.ps1 summary reports PASS (VM sizes and running state, license type, Trusted Launch secure boot and vTPM, zero public IPs, Bastion Standard, IIS response, SQL Server online, and performance dataset present).

  4. Verify Azure Arc status across the cohort. Check that vm-app01 reports Connected in Azure Arc for every slot in .local/roster.json:

    Terminal window
    $roster = Get-Content .local/roster.json | ConvertFrom-Json
    foreach ($m in $roster) {
    $status = az connectedmachine show -g rg-datacenter -n vm-app01 --subscription $m.subscriptionId --query status -o tsv 2>$null
    [pscustomobject]@{ Index = $m.index; ArcStatus = $status ?? 'MISSING' }
    }

    Every slot must show Connected, and Azure Arc > SQL Server instances in the portal will list vm-app01’s SQL Server instance once the SQL extension finishes registering. Step 4 (vending) re-verifies vnet-datacenter and vm-app01 Connected automatically before vending each spoke.

3.2 Deliver readiness test evidence to each student repo

Section titled “3.2 Deliver readiness test evidence to each student repo”

Run Initialize-CohortRepos.ps1 with -PushReadinessEvidence from factory/ in <event>-lead. It fetches each slot’s readiness-test-datacenter-member-<index> artifact from <event>-lead’s Actions run and commits factory/evidence/readiness/test-datacenter.txt straight to main on <org>/<event>-student-<nn>:

Terminal window
./scripts/Initialize-CohortRepos.ps1 `
-RosterPath .local/roster.json `
-TemplateRepository '<org>/<event>-student-template' `
-RepoPrefix '<event>-student' `
-PushReadinessEvidence

Done when each <event>-student-<nn> repository contains factory/evidence/readiness/test-datacenter.txt on main.

3.3 Start the Arc SQL assessments and manage VM power state

Section titled “3.3 Start the Arc SQL assessments and manage VM power state”
  1. Trigger or verify the Azure Arc SQL migration assessments. In the Azure portal under Azure Arc > SQL Server instances, open vm-app01 in a sample subscription (or across subscriptions) and check Migration > Assessments (see SQL Server enabled by Azure Arc migration assessment). If automatic assessment has not started yet, select Run assessment so findings for ContosoUniversity against Azure SQL Managed Instance are ready when students review and export them during Student onboarding and C3: Assess the source.

  2. Optionally deallocate VMs until T-1 to reduce compute spend. Once Arc shows Connected and test-datacenter.txt is pushed, you can stop VM compute billing across the cohort until Step 4 (T-1):

    Terminal window
    $roster = Get-Content .local/roster.json | ConvertFrom-Json
    foreach ($m in $roster) {
    az vm deallocate -g rg-datacenter -n vm-app01 --subscription $m.subscriptionId --no-wait
    az vm deallocate -g rg-datacenter -n vm-dev01 --subscription $m.subscriptionId --no-wait
    }

    Remember to start both VMs across every subscription at the beginning of Step 4 (T-1) before running vending.

Never run an unfiltered teardown in <event>-lead before T+2—always scope recovery to the affected slot indexes:

  • Failure before Arc onboarding started: fix the quota or transient error and re-run the member stage for those indexes only:

    Terminal window
    gh workflow run platform.yml -f stage=member -f members=<index>
  • Failure after Arc onboarding started (before C5): member refuses to overwrite an existing Arc machine resource, and a half-onboarded VM has guest run commands disabled. Tear down that single member index first, wait for teardown to finish green in Actions, and then re-run member for that index:

    Terminal window
    gh workflow run platform.yml -f stage=teardown -f members=<index>

    Once teardown finishes green:

    Terminal window
    gh workflow run platform.yml -f stage=member -f members=<index>

    (Add -f no-hybrid-benefit=true on member if that slot has no Windows Server Azure Hybrid Benefit.) Re-run Initialize-CohortRepos.ps1 ... -MemberIndex <index> -PushReadinessEvidence afterward so the student’s repo holds the fresh test-datacenter.txt report.

Next: Step 4: Vending and collaborator invites (T-1).