Migrate Labs (Lab Plan/ Lab Account) to CloudLabs
  • 15 Jul 2024
  • 4 Minutes to read
  • Contributors
  • Dark
    Light

Migrate Labs (Lab Plan/ Lab Account) to CloudLabs

  • Dark
    Light

Article summary

Overview

This document is designed to guide you through the process of migrating labs associated with a lab account or lab plan from Azure Lab Services to CloudLabs using our specialized migration tool. It provides detailed instructions on every step of the migration process and provides a breakdown of the various flags available with the tool.


Prerequisites

  • Azure account with one of the following accesses:

    • Role: Reader or higher
      Scope: Target lab account/lab plan, resource group, or subscription hosting lab account.

  • An admin account on portal.cloudlabs.ai with the following information

    • CloudLabs tenant ID

    • CloudLabs client ID

    • CloudLabs client secret

    • CloudLabs directory ID

    **This information should have been provided by the CloudLabs team


Premigration Checklist

  1. Identify and gather the following information about the target labs from the Azure Portal:

    1. Lab account or Lab Plan name

    2. Resource group name

    3. Subscription ID

    4. Lab names if you are planning to migrate specific labs.

  2. If the lab uses custom images, ensure they are migrated before proceeding. For image migration instructions, refer to the Migrate VM Images guide.

  3. If you intend for your newly migrated lab to use an existing virtual network, set up the virtual network on CloudLabs using the Migrate with Advanced Network guide, and note the virtual network's name on CloudLabs for the next steps.


Lab Migration Scope

Before starting your migration plan, it's crucial to understand what the migration process involves and what it doesn't cover. This clarity will help you determine whether to migrate an existing lab or start from scratch.

  • Creation of New Lab: Migrating a lab results in the creation of a new lab with the same name and configurations.

  • Virtual Machine Size and SKU: CloudLabs supports all the current available SKUs on Azure, although for some deprecated SKUs, the migration tool automatically identifies the closest SKU and maps it automatically.

  • Lab User List: It is possible to migrate the user list. Existing VMs of users will not be migrated to CloudLabs.

  • Custom Images: CloudLabs facilitates the migration of custom images using an image migration tool. These migrated images can either be used with a new lab or mapped to the migrated lab.

  • Virtual Network: CloudLabs supports using your existing virtual networks for labs by peering your virtual network with CloudLabs managed virtual network, allowing you to maintain your network setup.

  • Exclusions in Migration:

    • Active VMs: The migration process does not migrate any currently running VMs or the template VM.

    • User Credentials: Since newly migrated labs will have new credentials, the user won’t be able to access the new VM using old credentials. They can use the CloudLabs portal to access new credentials or connect directly to the VM using direct web connect.

    • Schedules: Existing schedules are not transferred during the migration.

    • VM Quotas: VM quotas per user will not be maintained in the new lab after migration.


Migrate Labs

  1. Download the latest version of the lab migration tool, as shared by your account manager.

  2. Open the command prompt and navigate to the tool location using the command below.

    cd <location>

    Here’s a sample to navigate to the location: C:\Users\labuser\Downloads.

    cd C:\Users\labuser\Downloads
  3. The migration tool lets you migrate labs from lab-plan to lab-account using a combination of different parameters. Following is a breakdown of all the parameters available with the migration tool
    Parameters Specific to Lab Account

    Parameters

    Description

    migrate-lab-account

    Use this flag if target labs are associated with a lab account.

    --lab-account-name

    Name of the source lab account

    Parameters Specific to the Lab Plan

    Parameters

    Description

    migrate-lab-plan

    Use this flag if target labs are associated with a lab plan.

    --lab-plan-name

    Name of the source lab plan

    General Parameters

    Parameters

    Description

    --tenant-id

    The tenant ID of the source Azure environment.

    --subscription-id

    The subscription ID of the source Azure environment.

    --resource-group

    The name of the resource group in the source Azure environment that contains the image gallery.

    --lab-name

    Optional, names of labs need to be migrated, multiple labs can be migrated by reusing this flag. If not mentioned, all the labs under the lab plan/account will be migrated.

    --client-id

    Optional, Azure application client ID. Provide only if you want to authenticate using the service principal. If you do not want to provide, you will have to do browser authentication.

    --client-secret

    Optional, Azure application client secret. Provide only if you want to authenticate using the service principal. If you do not want to provide, you will have to do browser authentication.

    --cloudlabs-tenant-id

    Provided by CloudLabs Team

    --cloudlabs-client-id

    Provided by CloudLabs Team

    --cloudlabs-client-secret

    Provided by CloudLabs Team

    --cloudlabs-directory-id

    Provided by CloudLabs Team

    --migrate-users

    Optional: When specified, users under mentioned/all labs will be migrated to CloudLabs.

    --network-name

    Optional: The name of the virtual network that has already been created from CloudLabs. This is mandatory only if you have an advanced networking setup for your lab plan/account.

    Sample command to migrate all the labs associated with the lab account.

    AzLabsCloudLabsMigrationCLI.exe migrate-lab-account --tenant-id "12345678-90ab-cdef-1234-567890abcdef" --subscription-id "abcdef12-3456-7890-abcd-ef1234567890" --resource-group "resourceGroup1" --lab-account-name "testaccount1" --cloudlabs-tenant-id "87654321-4321-8765-4321-987654321098" --cloudlabs-client-id "4f4697a9-b291-4f46-aa0f-3711b6g7f29b" --cloudlabs-client-secret "95z8Q~-s54KVm.HPkbVu5QmtPsRwdspxcxzdZMa7r" --cloudlabs-directory-id "a4a7bceb-5150-430f-9da8-91f66slwenu723w"

    Sample command to migrate lab1, lab2,  and lab3 associated with the lab plan.

    AzLabsCloudLabsMigrationCLI.exe migrate-lab-plan --tenant-id "12345678-90ab-cdef-1234-567890abcdef" --subscription-id "abcdef12-3456-7890-abcd-ef1234567890" --resource-group "resourceGroup1" --lab-plan-name "testplan1" --lab-name "lab1" --lab-name "lab2" --lab-name "lab3" --cloudlabs-tenant-id "87654321-4321-8765-4321-987654321098" --cloudlabs-client-id "4f4697a9-b291-4f46-aa0f-3711b6g7f29b" --cloudlabs-client-secret "95z8Q~-s54KVm.HPkbVu5QmtPsRwdspxcxzdZMa7r" --cloudlabs-directory-id "a4a7bceb-5150-430f-9da8-91f66slwenu723w"

    Sample command to migrate a lab1 with users.

    AzLabsCloudLabsMigrationCLI.exe migrate-lab-plan --tenant-id "12345678-90ab-cdef-1234-567890abcdef" --subscription-id "abcdef12-3456-7890-abcd-ef1234567890" --resource-group "resourceGroup1" --lab-plan-name "testplan1" --lab-name "lab1" --migrate-users --cloudlabs-tenant-id "87654321-4321-8765-4321-987654321098" --cloudlabs-client-id "4f4697a9-b291-4f46-aa0f-3711b6g7f29b" --cloudlabs-client-secret "95z8Q~-s54KVm.HPkbVu5QmtPsRwdspxcxzdZMa7r" --cloudlabs-directory-id "a4a7bceb-5150-430f-9da8-91f66slwenu723w"

    Sample command to migrate a lab2 with advanced networking using testVnet1.

    AzLabsCloudLabsMigrationCLI.exe migrate-lab-plan --tenant-id "12345678-90ab-cdef-1234-567890abcdef" --subscription-id "abcdef12-3456-7890-abcd-ef1234567890" --resource-group "resourceGroup1" --lab-plan-name "testplan1" --lab-name "lab2" --network-name "testVnet1" --cloudlabs-tenant-id "87654321-4321-8765-4321-987654321098" --cloudlabs-client-id "4f4697a9-b291-4f46-aa0f-3711b6g7f29b" --cloudlabs-client-secret "95z8Q~-s54KVm.HPkbVu5QmtPsRwdspxcxzdZMa7r" --cloudlabs-directory-id "a4a7bceb-5150-430f-9da8-91f66slwenu723w"
  4. Wait for execution to complete. You should not close the command prompt window or press Ctrl+C while the migration is in progress.


Verification

Verify the migration by lab by navigating to the Manage VM section of the CloudLabs portal. You should be able to see a new lab tile for all the migrated labs.