Add options to deployed VMs
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 1.3k
- Forks
- 304
- PR merge metrics
- No merged PRs in 30d
Description
Please consider the following user story for automation:
I know that most, if not all, labs include a dual-homed VM to run the Scenario.ps1 commands from - whether the DC, Windows 10, or other. On this dual-homed VM, I want to configure a static MAC address on the vNIC connected to the external vSwitch. This would allow me to create a DHCP reservation outside of the MSLabs environment that will ensure that the external interface always gets the same IP. This will allow me to RDP directly to the dual-homed VM from my lab's launch pad rather than jumping to the Hyper-V host and connecting to the VM.
This story also requires that RDP and ICMPv4 requests are enabled on the dual-homed VM. I am accomplishing this on the cluster nodes using the CustomPowerShellCommands option:
1..4 | ForEach-Object { $LABConfig.VMs += @{ VMName = "AzSHCI$_" ; Configuration = 'S2D' ; ParentVHD = 'AzSHCI20H2_G2.vhdx' ; HDDNumber = 10 ; HDDSize = 10TB ; MemoryStartupBytes = 1GB; VMProcessorCount = "Max" ; CustomPowerShellCommands = "Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -name 'fDenyTSConnections' -value 0","Enable-NetFirewallRule -DisplayGroup 'Remote Desktop'","New-NetFirewallRule -DisplayName 'Allow inbound ICMPv4' -Direction Inbound -Protocol ICMPv4 -IcmpType 8 -Action Allow" } }
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Scenario.ps1 and the VM configuration path that handles CustomPowerShellCommands. Trace how deployed VM network adapters and post-deployment commands are configured, then verify that the requested external vNIC MAC option, RDP access, and ICMPv4 access are applied consistently to the dual-homed VM.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100