Skip to content

Commit

Permalink
Moved DSC configuration for Hyper-V (#2675)
Browse files Browse the repository at this point in the history
* Moved DSC configuration for Hyper-V and VM Switch from Common to DataOps and ITPro

Signed-off-by: Jan Egil Ring <[email protected]>

* Updated Hyper-V DSC for ITPro and DevOps

Signed-off-by: Jan Egil Ring <[email protected]>

* Do not install Hyper-V if flavor is DevOps

Signed-off-by: Jan Egil Ring <[email protected]>

---------

Signed-off-by: Jan Egil Ring <[email protected]>
  • Loading branch information
janegilring authored Aug 16, 2024
1 parent a630c8c commit bda322d
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 33 deletions.
4 changes: 4 additions & 0 deletions azure_jumpstart_arcbox/artifacts/Bootstrap.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,8 @@ else {
# Disabling Windows Server Manager Scheduled Task
Get-ScheduledTask -TaskName ServerManager | Disable-ScheduledTask

if ($flavor -eq "ITPro") {

Write-Header "Installing Hyper-V"

# Install Hyper-V and reboot
Expand All @@ -437,6 +439,8 @@ else {
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform -NoRestart
Install-WindowsFeature -Name Hyper-V -IncludeAllSubFeature -IncludeManagementTools -Restart

}

# Clean up Bootstrap.log
Write-Host "Clean up Bootstrap.log"
Stop-Transcript
Expand Down
31 changes: 0 additions & 31 deletions azure_jumpstart_arcbox/artifacts/dsc/common.dsc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,35 +86,4 @@ properties:
settings:
FontName: Cascadia Mono
FontFile: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.18.3181.0_x64__8wekyb3d8bbwe\CascadiaMono.ttf
- resource: PSDscResources/WindowsFeature
id: Hyper-V
directives:
description: Install Hyper-V
settings:
Name: Hyper-V
Ensure: Present
- resource: HyperVDsc/VMHost
id: VMHost
directives:
description: Configure VM Host settings
settings:
IsSingleInstance: Yes
EnableEnhancedSessionMode: True
- resource: HyperVDsc/VMSwitch
id: VMSwitch
directives:
description: Configure VM Switch
settings:
Name: InternalNATSwitch
Ensure: Present
Type: Internal
- resource: NetworkingDsc/IPAddress
id: IPAddress.VMSwitch
directives:
description: Configure VM Switch vNIC IP Address
settings:
InterfaceAlias: 'vEthernet (InternalNATSwitch)'
IPAddress: '10.10.1.1/24'
AddressFamily: IPv4
KeepExistingAddress: false
configurationVersion: 0.2.0
32 changes: 31 additions & 1 deletion azure_jumpstart_arcbox/artifacts/dsc/dataops.dsc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,35 @@ properties:
settings:
id: Istio.Istio
source: winget

- resource: PSDscResources/WindowsFeature
id: Hyper-V
directives:
description: Install Hyper-V
settings:
Name: Hyper-V
Ensure: Present
- resource: HyperVDsc/VMHost
id: VMHost
directives:
description: Configure VM Host settings
settings:
IsSingleInstance: Yes
EnableEnhancedSessionMode: True
- resource: HyperVDsc/VMSwitch
id: VMSwitch
directives:
description: Configure VM Switch
settings:
Name: InternalNATSwitch
Ensure: Present
Type: Internal
- resource: NetworkingDsc/IPAddress
id: IPAddress.VMSwitch
directives:
description: Configure VM Switch vNIC IP Address
settings:
InterfaceAlias: 'vEthernet (InternalNATSwitch)'
IPAddress: '10.10.1.1/24'
AddressFamily: IPv4
KeepExistingAddress: false
configurationVersion: 0.2.0
1 change: 0 additions & 1 deletion azure_jumpstart_arcbox/artifacts/dsc/devops.dsc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,4 @@ properties:
settings:
id: Istio.Istio
source: winget

configurationVersion: 0.2.0
31 changes: 31 additions & 0 deletions azure_jumpstart_arcbox/artifacts/dsc/itpro.dsc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,35 @@ properties:
settings:
id: 7zip.7zip
source: winget
- resource: PSDscResources/WindowsFeature
id: Hyper-V
directives:
description: Install Hyper-V
settings:
Name: Hyper-V
Ensure: Present
- resource: HyperVDsc/VMHost
id: VMHost
directives:
description: Configure VM Host settings
settings:
IsSingleInstance: Yes
EnableEnhancedSessionMode: True
- resource: HyperVDsc/VMSwitch
id: VMSwitch
directives:
description: Configure VM Switch
settings:
Name: InternalNATSwitch
Ensure: Present
Type: Internal
- resource: NetworkingDsc/IPAddress
id: IPAddress.VMSwitch
directives:
description: Configure VM Switch vNIC IP Address
settings:
InterfaceAlias: 'vEthernet (InternalNATSwitch)'
IPAddress: '10.10.1.1/24'
AddressFamily: IPv4
KeepExistingAddress: false
configurationVersion: 0.2.0

0 comments on commit bda322d

Please sign in to comment.