Skip to content

Commit

Permalink
Avset public ip upgrade v2 (#127)
Browse files Browse the repository at this point in the history
* fix carlm params

* added vmss backup state file path to log

* corrected recovery parameter sets

* version bump

* fix nsg assocation check

* NSGs

* ipv6 check

* v1.0.0

* readme updates
  • Loading branch information
mbrat2005 authored Aug 30, 2024
1 parent 21a5966 commit ddf57c2
Show file tree
Hide file tree
Showing 7 changed files with 724 additions and 70 deletions.
12 changes: 6 additions & 6 deletions AzureAvSetBasicPublicIPUpgrade/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Because the Public IP allocation is set to 'Static' before detaching from the VM
even in the event of a script failure. For added peace of mind, the module double-checks that the Public IP allocation method is 'Static'
prior to detaching the Public IP from the VMs.

The module logs all upgrade activity to a file named `PublicIPUpgrade.log`, created in the same location where the module was executed (by default).
The module logs all upgrade activity to a file named `AvSetPublicIPUpgrade.log`, created in the same location where the module was executed (by default).

## Unsupported Scenarios

Expand Down Expand Up @@ -64,14 +64,14 @@ The Azure Powershell module must be installed. See [Install the latest Az PowerS

### Recovering from a Failed Migration

When a migration fails due to a transient issue, such as a network outage or client system crash, the migration can be re-run to configure the Availability Set VMs and Public IPs in the goal state. At execution, the script outputs a recovery log file which is used to ensure the Av Set is properly reconfigured. Review the log file `PublicIPUpgrade.log` created in the location where the script was executed.
When a migration fails due to a transient issue, such as a network outage or client system crash, the migration can be re-run to configure the Availability Set VMs and Public IPs in the goal state. At execution, the script outputs a recovery log file which is used to ensure the Av Set is properly reconfigured. Review the log file `AvSetPublicIPUpgrade.log` created in the location where the script was executed.

To recover from a failed upgrade, pass the recovery log file path to the script with the `-recoverFromFile` parameter and identify the VM to recover with the `-AvailabilitySetName` and `-ResourceGroup` or `-AvailabilitySetResourceID` parameters.
To recover from a failed upgrade, pass the recovery log file path to the script with the `-recoverFromFile` parameter and identify the Availability Set to recover with the `-AvailabilitySetName` and `-ResourceGroup` or `-AvailabilitySetResourceID` parameters.

**EXAMPLE: Recover from a failed migration, passing the name and resource group of the VM to recover, along with the recovery log file**

```powershell
Start-AvSetPublicIPUpgrade -RecoverFromFile ./PublicIPUpgrade_Recovery_2020-01-01-00-00.csv -AvailabilitySetName myAvSet -ResourceGroup -rg-myrg
Start-AvSetPublicIPUpgrade -RecoverFromFile ./AvSetPublicIPUpgrade_Recovery_2020-01-01-00-00.csv -AvailabilitySetName myAvSet -ResourceGroup -rg-myrg
```

## Frequently Asked Questions
Expand All @@ -84,10 +84,10 @@ The time it takes to upgrade an Availability Set's VM's Public IPs will depend o

It is not possible to downgrade a Public IP address from Standard to Basic, so our recommendation is to fail-forward and address the issue with the Standard SKU IPs.

### Can I test a migration before executing?
### Can I test a migration before executing?

There is no way to evaluate upgrading a Public IP without completing the action. This script includes a `-whatif` parameter, which checks that your Availability Set will support the upgrade and walks through the steps without taking action.

### Does this script support Zonal Basic SKU Public IPs?
### Does this script support Zonal Basic SKU Public IPs?

Yes, the process of upgrading a Zonal Basic SKU Public IP to a Zonal Standard SKU Public IP is the same as a Regional Public IP.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'AzureAvSetBasicPublicIPUpgrade'

# Version number of this module.
ModuleVersion = '0.0.0'
ModuleVersion = '1.0.0'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -107,7 +107,7 @@ PrivateData = @{
# IconUri = ''

# ReleaseNotes of this module
ReleaseNotes = 'Inital release'
ReleaseNotes = 'NSG detection improvements, recovery fixes'

# Prerelease string of this module
# Prerelease = ''
Expand Down
Loading

0 comments on commit ddf57c2

Please sign in to comment.