Skip to content

Variable Reference ​

All VM conversion scripts use a central configuration file: config/variables.yml. This file documents the common values you will need across all scripts. Future versions may support loading from this file directly.

TIP

Getting started Copy the example and fill in your values:

powershell
cp config/variables.example.yml config/variables.yml

Never commit variables.yml — it is excluded by .gitignore because it contains environment-specific values.

!!! note "Current usage" These scripts currently accept parameters directly on the command line. This file documents the common values you will need and serves as the canonical parameter reference.


Naming Rules ​

ScopeConventionExample
Top-level sectionssnake_caseazure_local, conversion
Keys within sectionssnake_casesubscription_id, max_parallel
Azure resource IDsFull ARM resource ID/subscriptions/.../customLocations/cl-01

Azure ​

yaml
azure:
  subscription_id: "00000000-0000-0000-0000-000000000000"
  resource_group: "rg-azurelocal-prod"
  location: "eastus"
VariableTypeRequiredDescriptionDefault
azure.subscription_idstringYesAzure subscription ID—
azure.resource_groupstringYesResource group containing the target VMs—
azure.locationstringYesAzure regioneastus

Azure Local ​

yaml
azure_local:
  custom_location_id: "/subscriptions/.../customLocations/cl-azurelocal-01"
  logical_network_id: "/subscriptions/.../logicalNetworks/lnet-mgmt-01"
VariableTypeRequiredDescriptionDefault
azure_local.custom_location_idstringYesFull ARM resource ID of the Azure Local custom location—
azure_local.logical_network_idstringYesFull ARM resource ID of the logical network for the converted VM—

Conversion Settings ​

yaml
conversion:
  working_directory: "C:\\ClusterStorage\\Volume01\\Gen2Conversion"
  max_parallel: 1
VariableTypeRequiredDescriptionDefault
conversion.working_directorystringYesScratch directory for conversion work files (must have sufficient free space)—
conversion.max_parallelintegerNoNumber of VMs to process in parallel (1 = sequential)1

Tags ​

yaml
tags:
  project: "VM-Conversion"
  environment: "production"
  workload: "gen1-to-gen2"
  solution: "vmconvert-azure-local"
VariableTypeRequiredDescriptionDefault
tags.projectstringNoProject tagVM-Conversion
tags.environmentstringNoEnvironment tagproduction
tags.workloadstringNoWorkload type taggen1-to-gen2
tags.solutionstringNoSolution identifier tagvmconvert-azure-local

Script Parameter Mapping ​

The table below maps variables.yml keys to the actual script parameters:

Variable KeyAzure Local Script ParamHyper-V Script Param
azure.subscription_id-SubscriptionIdN/A
azure.resource_group-ResourceGroupN/A
azure_local.custom_location_id-CustomLocationIdN/A
azure_local.logical_network_id-LogicalNetworkIdN/A
conversion.working_directory-WorkingDirectory-WorkingDirectory
conversion.max_parallel-MaxParallel-MaxParallel

Released under the MIT License.