Daniel's Tech Blog

Cloud Computing, Cloud Native & Kubernetes

Shutdown and Startup Order for the Microsoft Azure Stack TP2 VMs

In my previous blog post I described how to install the Microsoft Azure Stack TP2 PoC on lower hardware specifications. Because my home lab does not run 24/7 I had to think about the correct shutdown and startup order for the Microsoft Azure Stack Technical Preview 2 VMs.

-> https://www.danielstechblog.io/microsoft-azure-stack-technical-preview-2-on-lower-hardware-specifications/

The Azure Stack TP2 consists of one physical Hyper-V host and 13 VMs. First I want to let you know which VMs are belonging to the AD domain.

Name Membership
MAS-ACS01 Domain
MAS-ADFS01 Domain
MAS-BGNAT01 Domain
MAS-ASql01 Domain
MAS-CA01 Domain
MAS-Con01 Domain
MAS-DC01 Domain
MAS-Gwy01 Domain
MAS-NC01 Domain
MAS-SLB01 Domain
MAS-SUS01 Domain
MAS-WAS01 Domain
MAS-Xrp01 Domain

Per default every VM will be set into save state when you shutdown the Hyper-V host. This is not a problem when you are running Azure Stack on the recommended hardware. On lower hardware specification it is an issue. My shutdown sequence is the following one.

Stop-VM -Name "MAS-Con01" -Force -Verbose
Stop-VM -Name "MAS-WAS01" -Force -Verbose
Stop-VM -Name "MAS-Xrp01" -Force -Verbose
Stop-VM -Name "MAS-SUS01" -Force -Verbose
Stop-VM -Name "MAS-ACS01" -Force -Verbose
Stop-VM -Name "MAS-CA01" -Force -Verbose
Stop-VM -Name "MAS-ADFS01" -Force -Verbose
Stop-VM -Name "MAS-ASql01" -Force -Verbose
Stop-VM -Name "MAS-Gwy01" -Force -Verbose
Stop-VM -Name "MAS-SLB01" -Force -Verbose
Stop-VM -Name "MAS-NC01" -Force -Verbose
Stop-VM -Name "MAS-BGPNAT01" -Force –Verbose

The VM MAS-DC01 will shutdown together with the Hyper-V host.

During the startup of the Hyper-V host only the VM MAS-DC01 will start automatically. The other ones will be started through a PowerShell script after the RDP login. But there is one issue left. After the startup of the Hyper-V host you will only see the DC01 and CA01 or at least only the DC01 VM in the Hyper-V Manager.

StartStop01

So you cannot use Start-VM for the start sequence of the other VMs. Because that all VMs are a cluster role, this is not a issue.

StartStop02

The startup order is the following one.

Start-ClusterResource -Name "Virtual Machine MAS-BGPNAT01" -Verbose
Start-Sleep -Seconds 60 -Verbose
Start-ClusterResource -Name "Virtual Machine MAS-NC01" -Verbose
Start-Sleep -Seconds 60 -Verbose
Start-ClusterResource -Name "Virtual Machine MAS-SLB01" -Verbose
Start-Sleep -Seconds 60 -Verbose
Start-ClusterResource -Name "Virtual Machine MAS-Gwy01" -Verbose
Start-Sleep -Seconds 60 -Verbose
Start-ClusterResource -Name "Virtual Machine MAS-ASql01" -Verbose
Start-Sleep -Seconds 60 -Verbose
Start-ClusterResource -Name "Virtual Machine MAS-ADFS01" -Verbose
Start-Sleep -Seconds 60 -Verbose
Start-ClusterResource -Name "Virtual Machine MAS-CA01" -Verbose
Start-Sleep -Seconds 60 -Verbose
Start-ClusterResource -Name "Virtual Machine MAS-ACS01" -Verbose
Start-Sleep -Seconds 60 -Verbose
Start-ClusterResource -Name "Virtual Machine MAS-SUS01" -Verbose
Start-Sleep -Seconds 60 -Verbose
Start-ClusterResource -Name "Virtual Machine MAS-Xrp01" -Verbose
Start-Sleep -Seconds 60 -Verbose
Start-ClusterResource -Name "Virtual Machine MAS-WAS01" -Verbose
Start-Sleep -Seconds 60 -Verbose
Start-ClusterResource -Name "Virtual Machine MAS-Con01" –Verbose
WordPress Cookie Notice by Real Cookie Banner