Azure / AzLoadBalancerMigration

This repo contains a PowerShell module to support Azure Load Balancer migration from Basic to Standard SKU
MIT License
10 stars 9 forks source link

Add Support for VM Migrations (Prerelease) #39

Closed mbrat2005 closed 1 year ago

mbrat2005 commented 1 year ago

Added VM backend migration support, requiring the -Pre parameter to perform migrations.

Tested VMSS scenarios successfully.

VM Migration Testing Evidence:

Starting discovery in 1 files.
Discovery found 223 tests in 342ms.
Filter 'Tag' set to ('30', '31', '32', '33', '34', '35', '36', '37', '38', '39').
Filters selected 116 tests to run.
Running tests.

Running tests from 'C:\Users\mbratschun\repos\AzLoadBalancerMigration\testEnvs\scripts\scenarios.Tests.ps1'
Describing Validate Migration Script Results
 Context 031-vms-lb-int
   [+] Internal Load Balancer has a Standard SU 11ms (5ms|6ms)
   [+] Internal Load Balancer has 1 FrontendConfiguration 6ms (4ms|2ms)
   [+] Internal Load Balancer FrontendConfiguration has a Private Ip Address 10ms (8ms|3ms)
   [+] Internal Load Balancer has 1 LoadBalancing Rule 7ms (5ms|2ms)
   [+] Internal Load Balancer has 1 Probe 9ms (7ms|2ms)
   [+] Internal load balancer has 1 backend pools 6ms (4ms|2ms)
   [+] VM has a LoadBalancer BackendAddress Pools 6ms (4ms|2ms)
   [+] VMSS nic 1 ipconfig 1 should belong to backend pool 1 8ms (6ms|2ms)
 Context 032-vms-multivm-lb-int
   [+] Internal Load Balancer has a Standard SU 7ms (4ms|4ms)
   [+] Internal Load Balancer has 1 FrontendConfiguration 5ms (3ms|2ms)
   [+] Internal Load Balancer FrontendConfiguration has a Private Ip Address 10ms (6ms|4ms)
   [+] Internal Load Balancer has 1 LoadBalancing Rule 6ms (4ms|2ms)
   [+] Internal Load Balancer has 1 Probe 7ms (5ms|3ms)
   [+] Internal load balancer has 1 backend pools 5ms (3ms|2ms)
   [+] VM1 has a LoadBalancer BackendAddress Pools 6ms (3ms|2ms)
   [+] VM2 has a LoadBalancer BackendAddress Pools 6ms (4ms|2ms)
   [+] Vm1 nic 1 ipconfig 1 should belong to backend pool 1 40ms (8ms|32ms)
   [+] Vm2 nic 1 ipconfig 1 should belong to backend pool 1 11ms (5ms|6ms)
 Context 033-vms-multi-be
   [+] Internal Load Balancer has a Standard SU 7ms (4ms|4ms)
   [+] Internal Load Balancer has 1 FrontendConfiguration 6ms (4ms|2ms)
   [+] Internal Load Balancer FrontendConfiguration has a Private Ip Address 6ms (4ms|2ms)
   [+] Internal Load Balancer has 1 LoadBalancing Rule 10ms (7ms|3ms)
   [+] Internal Load Balancer has 1 Probe 6ms (4ms|2ms)
   [+] Internal load balancer has 2 backend pools 8ms (5ms|2ms)
   [+] VM has 2 LoadBalancer BackendAddress Pools 6ms (4ms|2ms)
   [+] VMSS nic 1 ipconfig 1 should belong to backend pool 1 7ms (5ms|2ms)
   [+] VMSS nic 1 ipconfig 2 should belong to backend pool 2 9ms (6ms|3ms)
 Context 034-vms-lb-ext
   [+] External Load Balancer has a Standard SKU 11ms (8ms|3ms)
   [+] External load balancer has 1 outbound rules 6ms (5ms|2ms)
   [+] External Load Balancer has 1 FrontendConfiguration 7ms (5ms|2ms)
   [+] External Load Balancer FrontendConfiguration has a Public Ip Address 6ms (3ms|2ms)
   [+] External Load Balancer has 1 LoadBalancing Rule 5ms (3ms|2ms)
   [+] External Load Balancer has 1 Probe 5ms (4ms|2ms)
   [+] External load balancer has 1 backend pools 5ms (3ms|2ms)
   [+] VM has a LoadBalancer BackendAddress Pools 10ms (7ms|2ms)
   [+] VMSS nic 1 ipconfig 1 should belong to backend pool 1 7ms (5ms|2ms)
   [+] Public Ip has a Static Address 6ms (4ms|3ms)
   [+] Public Ip has a Standard SKu 6ms (4ms|2ms)
   [+] New NSG should exist 5ms (3ms|2ms)
 Context 035-vms-pip-lb-ext
   [+] lbExt.count should be 1 11ms (8ms|4ms)
   [+] External Load Balancer has a Standard SKU 5ms (3ms|2ms)
   [+] External Load Balancer has 1 FrontendConfiguration 6ms (4ms|2ms)
   [+] External Load Balancer FrontendConfiguration has a Public Ip Address 6ms (4ms|2ms)
   [+] External Load Balancer has 1 LoadBalancing Rule 7ms (5ms|2ms)
   [+] External Load Balancer has 1 Probe 5ms (4ms|2ms)
   [+] External load balancer has 1 backend pools 7ms (5ms|2ms)
   [+] External load balancer has 0 outbound rules 8ms (6ms|2ms)
   [+] VM has a LoadBalancer BackendAddress Pools 6ms (4ms|2ms)
   [+] VMSS nic 1 ipconfig 1 should belong to backend pool 1 7ms (5ms|2ms)
   [+] Public Ip has a Static Address 5ms (3ms|2ms)
   [+] VM Public Ip 1 has a Static Address 6ms (4ms|2ms)
   [+] VM Public Ip 1 has a Standard SKU 5ms (4ms|2ms)
   [+] VM Public Ip 2 has a Static Address 8ms (6ms|2ms)
   [+] VM Public Ip 2 has a Standard SKU 6ms (4ms|2ms)
   [+] Public Ip has a Standard SKu 7ms (5ms|2ms)
   [+] New NSG should exist 6ms (4ms|2ms)
 Context 036-vms-multi-nic-pip-lb-ext
   [+] External Load Balancer has a Standard SKU 7ms (4ms|3ms)
   [+] External Load Balancer has 1 FrontendConfiguration 8ms (5ms|2ms)
   [+] External Load Balancer FrontendConfiguration has a Public Ip Address 9ms (6ms|3ms)
   [+] External Load Balancer has 1 LoadBalancing Rule 8ms (5ms|3ms)
   [+] External Load Balancer has 1 Probe 7ms (4ms|3ms)
   [+] External load balancer has 1 backend pools 6ms (4ms|3ms)
   [+] External load balancer has 0 outbound rules 6ms (4ms|3ms)
   [+] VM has a LoadBalancer BackendAddress Pools 6ms (5ms|2ms)
   [+] VM nic 1 ipconfig 1 should belong to backend pool 1 7ms (5ms|2ms)
   [+] VM nic 1 ipconfig 2 should belong to backend pool 1 7ms (5ms|2ms)
   [+] VM nic 2 ipconfig 1 LoadBalancerBackendAddressPools count should be 0 6ms (4ms|2ms)
   [+] LB Public Ip Address [0] has version 'IPv4' 6ms (3ms|2ms)
   [+] LB Public Ip has a Static Address 6ms (4ms|2ms)
   [+] LB Public Ip has a SKU of Standard 5ms (3ms|2ms)
   [+] VM Public Ip Address [1] has version 'IPv4' 6ms (4ms|2ms)
   [+] VM Public Ip 1 has a Static Address 7ms (5ms|2ms)
   [+] VM Public Ip 1 has a Standard SKU 6ms (4ms|2ms)
   [+] VM Public Ip Address [2] has version 'IPv4' 6ms (5ms|2ms)
   [+] VM Public Ip 2 has a Static Address 6ms (3ms|2ms)
   [+] VM Public Ip 2 has a Standard SKU 6ms (4ms|2ms)
   [+] VM Public Ip Address 3 has version 'IPv4' 5ms (3ms|2ms)
   [+] VM Public Ip 3 has a Static Address 6ms (4ms|2ms)
   [+] VM Public Ip 3 has a Standard SKU 6ms (4ms|2ms)
   [+] Public Ip has a Standard SKu 7ms (5ms|2ms)
 Context 037-vms-nsg-nic-lb-ext
   [+] Interal Load Balancer has a Standard SKU 9ms (4ms|5ms)
   [+] Internal Load Balancer has 1 FrontendConfiguration 5ms (3ms|2ms)
   [+] VM has a LoadBalancer BackendAddress Pools 11ms (9ms|2ms)
   [+] Only one NSG should exist (no NSG created) 6ms (4ms|2ms)
 Context 038-vms-nsg-subnet-lb-ext
   [+] Interal Load Balancer has a Standard SKU 8ms (4ms|4ms)
   [+] Public IP SKU should be Standard 5ms (3ms|2ms)
   [+] Internal Load Balancer has 1 FrontendConfiguration 5ms (3ms|2ms)
   [+] VM IP Config [0] has 1 LoadBalancer BackendAddress Pools 16ms (14ms|2ms)
   [+] VM IP Config [1] has 1 LoadBalancer BackendAddress Pools 18ms (14ms|4ms)
   [+] Only one NSG should exist (no NSG created) 7ms (4ms|3ms)
 Context 039-vms-multivm-mix-pip-lb-ext
   [+] External Load Balancer has a Standard SKU 9ms (5ms|4ms)
   [+] External Load Balancer has 1 FrontendConfiguration 8ms (5ms|2ms)
   [+] External Load Balancer FrontendConfiguration has a Public Ip Address 7ms (4ms|3ms)
   [+] External Load Balancer has 1 LoadBalancing Rule 5ms (3ms|2ms)
   [+] External Load Balancer has 1 Probe 6ms (4ms|2ms)
   [+] External load balancer has 1 backend pools 7ms (5ms|2ms)
   [+] External load balancer has 0 outbound rules 5ms (3ms|2ms)
   [+] VM has a LoadBalancer BackendAddress Pools 8ms (6ms|2ms)
   [+] VM-01 nic 1 ipconfig 1 should belong to backend pool 1 6ms (4ms|2ms)
   [+] VM-01 nic 1 ipconfig 2 should belong to backend pool 1 8ms (5ms|3ms)
   [+] VM-02 nic 1 ipconfig 1 should belong to backend pool 1 8ms (6ms|2ms)
   [+] VM-02 nic 1 ipconfig 2 should belong to backend pool 1 6ms (4ms|2ms)
   [+] VM nic 2 ipconfig 1 LoadBalancerBackendAddressPools count should be 0 9ms (6ms|3ms)
   [+] LB Public Ip Address [0] has version 'IPv4' 5ms (3ms|2ms)
   [+] LB Public Ip has a Static Address 6ms (4ms|3ms)
   [+] LB Public Ip has a SKU of Standard 5ms (3ms|2ms)
   [+] VM Public Ip Address [1] has version 'IPv4' 5ms (4ms|2ms)
   [+] VM Public Ip 1 has a Static Address 8ms (6ms|2ms)
   [+] VM Public Ip 1 has a Standard SKU 5ms (3ms|2ms)
   [+] VM Public Ip Address [2] has version 'IPv4' 7ms (4ms|3ms)
   [+] VM Public Ip 2 has a Static Address 5ms (3ms|2ms)
   [+] VM Public Ip 2 has a Standard SKU 6ms (4ms|2ms)
   [+] VM Public Ip Address 3 has version 'IPv4' 5ms (3ms|2ms)
   [+] VM Public Ip 3 has a Static Address 6ms (3ms|2ms)
   [+] VM Public Ip 3 has a Standard SKU 6ms (4ms|2ms)
   [+] Public Ip has a Standard SKu 5ms (3ms|2ms)
Tests completed in 52.11s
Tests Passed: 116, Failed: 0, Skipped: 0 NotRun: 107