Skip to content

Commit

Permalink
Merge branch 'add-sh' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
danycontre authored Nov 16, 2023
2 parents 1b7627b + ce345e8 commit 18a5b4e
Show file tree
Hide file tree
Showing 17 changed files with 13,162 additions and 83 deletions.
6,221 changes: 6,221 additions & 0 deletions workload/arm/brownfield/deployNewSessionHostsToHostPools.json

Large diffs are not rendered by default.

473 changes: 473 additions & 0 deletions workload/bicep/brownfield/addSessionHosts/deploy.bicep

Large diffs are not rendered by default.

6,221 changes: 6,221 additions & 0 deletions workload/bicep/brownfield/addSessionHosts/deploy.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// ========== //
// Parameters //
// ========== //

@description('Required. The name of the host pool.')
param hostPoolName string


// ========== //
// Deployments //
// ========== //

// Host pool.
resource hostPool 'Microsoft.DesktopVirtualization/hostPools@2021-07-12' existing = {
name: hostPoolName
}


// ========== //
// Outputs //
// ========== //

output info object = hostPool.properties
35 changes: 35 additions & 0 deletions workload/bicep/brownfield/addSessionHosts/modules/hostPool.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// ========== //
// Parameters //
// ========== //

@description('Required. The name of the host pool.')
param hostPoolName string

@description('Required. The type of host pool.')
param hostPoolType string

@description('Required. The type of load balancer for the host pool.')
param loadBalancerType string

@description('Required. The location of the host pool.')
param location string

@description('Required. The preferred app group type for the host pool.')
param preferredAppGroupType string


// ========== //
// Deployments //
// ========== //

// Host pool.
resource hostPool 'Microsoft.DesktopVirtualization/hostPools@2021-07-12' = {
name: hostPoolName
location: location
properties: {
hostPoolType: hostPoolType
loadBalancerType: loadBalancerType
preferredAppGroupType: preferredAppGroupType
startVMOnConnect: true
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"avdObjectId": {
"value": "<<Object ID for AVD Microsoft Application>>"
},
"hostPoolResourceId": {
"value": "<<Resource ID for the AVD Host Pool>>"
},
"location": {
"value": "<<Deployment Location>>"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"subnetId": {
"value": "/subscriptions/a7bc841f-34c0-4214-9469-cd463b66de35/resourceGroups/rg-avd-x036-dev-use-network/providers/Microsoft.Network/virtualNetworks/vnet-x036-dev-use-001/subnets/snet-avd-x036-dev-use-001"
},
"location": {
"value": "eastus"
},
"computeRgResourceID": {
"value": "/subscriptions/a7bc841f-34c0-4214-9469-cd463b66de35/resourceGroups/rg-avd-x036-dev-use-pool-compute"
},
"countIndex": {
"value": 16
},
"vmLocalAdminPasswordSecretName": {
"value": "vmLocalUserPassword"
},
"keyVaultResourceId": {
"value": "/subscriptions/a7bc841f-34c0-4214-9469-cd463b66de35/resourceGroups/rg-avd-x036-dev-use-service-objects/providers/Microsoft.KeyVault/vaults/kv-sec-x036-dev-use-fv"
},
"hostPoolResourceID": {
"value": "/subscriptions/a7bc841f-34c0-4214-9469-cd463b66de35/resourceGroups/rg-avd-x036-dev-use-service-objects/providers/Microsoft.DesktopVirtualization/hostpools/vdpool-x036-dev-use-001"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"subnetId": {
"value": "<<Resource ID of subnet>>"
},
"location": {
"value": "<<Location where to deploy session hosts>>"
},
"computeRgResourceID": {
"value": "<<Resource group ID where to deploy session hosts>>"
},
"countIndex": {
"value": "<<Count index of session hosts>>"
},
"vmLocalAdminPasswordSecretName": {
"value": "<<VM local admin keyvault secret name>>"
},
"keyVaultResourceId": {
"value": "<<Key vault where user password secrets are>>"
},
"hostPoolResourceID": {
"value": "<<Host pool resource ID>>"
}
}
}
38 changes: 38 additions & 0 deletions workload/bicep/brownfield/addSessionHosts/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Start VM On Connect

This solution will deploy Start VM On Connect. The feature allows stopped / deallocated VMs to be started on demand when an end user requests a session host from their assigned application group using the AVD client. For more details, see the Microsoft Learn page for this feature: [Start VM On Connect](https://learn.microsoft.com/azure/virtual-desktop/start-virtual-machine-connect?tabs=azure-portal).

## Requirements

- Permissions: below are the minimum required permissions to deploy this solution.
- User Access Administrator on the target Subscription
- Desktop Virtualization Host Pool Contributor on the resource group containing the target host pool
- Resources: this solution assumes a host pool already exists in the target subscription.

## Deployment Options

### Azure portal UI

[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#blade/Microsoft_Azure_CreateUIDef/CustomDeploymentBlade/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Favdaccelerator%2Fmain%2Fworkload%2Farm%2Fbrownfield%2FdeployStartVmOnConnect.json/uiFormDefinitionUri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Favdaccelerator%2Fmain%2Fworkload%2Fportal-ui%2Fbrownfield%2FportalUiStartVmOnConnect.json) [![Deploy to Azure Gov](https://aka.ms/deploytoazuregovbutton)](https://portal.azure.us/#blade/Microsoft_Azure_CreateUIDef/CustomDeploymentBlade/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Favdaccelerator%2Fmain%2Fworkload%2Farm%2Fbrownfield%2FdeployStartVmOnConnect.json/uiFormDefinitionUri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Favdaccelerator%2Fmain%2Fworkload%2Fportal-ui%2Fbrownfield%2FportalUiStartVmOnConnect.json)

### PowerShell

```powershell
New-AzDeployment `
-Location '<Azure location>' `
-TemplateFile 'https://raw.githubusercontent.com/Azure/avdaccelerator/main/workload/brownfield/startVmOnConnect/solution.json' `
-AvdObjectId '<Object ID for the AVD / WVD application in Microsoft Entra ID>' `
-HostPoolResourceId '<Resource ID for the target host pool>' `
-Verbose
```

### Azure CLI

```azurecli
az deployment sub create \
--location '<Azure location>' \
--template-uri 'https://raw.githubusercontent.com/Azure/avdaccelerator/main/workload/brownfield/startVmOnConnect/solution.json' \
--parameters \
AvdObjectId '<Object ID for the AVD / WVD application in Microsoft Entra ID>' \
HostPoolResourceId '<Resource ID for the target host pool>'
```
76 changes: 2 additions & 74 deletions workload/bicep/deploy-baseline.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -678,80 +678,8 @@ var varScalingPlanSchedules = [
}
}
]
var varMarketPlaceGalleryWindows = {
win10_21h2: {
publisher: 'MicrosoftWindowsDesktop'
offer: 'windows-10'
sku: 'win10-21h2-avd'
version: 'latest'
}
win10_21h2_office: {
publisher: 'MicrosoftWindowsDesktop'
offer: 'office-365'
sku: 'win10-21h2-avd-m365'
version: 'latest'
}
win10_22h2_g2: {
publisher: 'MicrosoftWindowsDesktop'
offer: 'windows-10'
sku: 'win10-22h2-avd-g2'
version: 'latest'
}
win10_22h2_office_g2: {
publisher: 'MicrosoftWindowsDesktop'
offer: 'office-365'
sku: 'win10-22h2-avd-m365-g2'
version: 'latest'
}
win11_21h2: {
publisher: 'MicrosoftWindowsDesktop'
offer: 'Windows-11'
sku: 'win11-21h2-avd'
version: 'latest'
}
win11_21h2_office: {
publisher: 'MicrosoftWindowsDesktop'
offer: 'office-365'
sku: 'win11-21h2-avd-m365'
version: 'latest'
}
win11_22h2: {
publisher: 'MicrosoftWindowsDesktop'
offer: 'Windows-11'
sku: 'win11-22h2-avd'
version: 'latest'
}
win11_22h2_office: {
publisher: 'MicrosoftWindowsDesktop'
offer: 'office-365'
sku: 'win11-22h2-avd-m365'
version: 'latest'
}
winServer_2022_Datacenter: {
publisher: 'MicrosoftWindowsServer'
offer: 'WindowsServer'
sku: '2022-datacenter-g2'
version: 'latest'
}
winServer_2022_Datacenter_smalldisk_g2: {
publisher: 'MicrosoftWindowsServer'
offer: 'WindowsServer'
sku: '2022-datacenter-smalldisk-g2'
version: 'latest'
}
winServer_2022_datacenter_core: {
publisher: 'MicrosoftWindowsServer'
offer: 'WindowsServer'
sku: '2022-datacenter-core-g2'
version: 'latest'
}
winServer_2022_Datacenter_core_smalldisk_g2: {
publisher: 'MicrosoftWindowsServer'
offer: 'WindowsServer'
sku: '2022-datacenter-core-smalldisk-g2'
version: 'latest'
}
}

var varMarketPlaceGalleryWindows = loadJsonContent('../variables/osMarketPlaceImages.json')
var varStorageAzureFilesDscAgentPackageLocation = 'https://github.com/Azure/avdaccelerator/raw/main/workload/scripts/DSCStorageScripts/1.0.0/DSCStorageScripts.zip'
var varStorageToDomainScriptUri = '${varBaseScriptUri}scripts/Manual-DSC-Storage-Scripts.ps1'
var varStorageToDomainScript = './Manual-DSC-Storage-Scripts.ps1'
Expand Down
3 changes: 0 additions & 3 deletions workload/bicep/modules/avdSessionHosts/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@ param useSharedImage bool
@sys.description('Source custom image ID.')
param avdImageTemplateDefinitionId string

@sys.description('Storage Managed Identity Resource ID.')
param storageManagedIdentityResourceId string

@sys.description('Local administrator username.')
param vmLocalUserName string

Expand Down
4 changes: 2 additions & 2 deletions workload/portal-ui/brownfield/portalUiAlerts.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"view": {
"kind": "Form",
"properties": {
"title": "Create AVD Alerts",
"steps": [
"title": "Azure Virtual Desktop LZA: Create AVD Alerts",
"steps": [
{
"name": "basics",
"label": "Basics",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"view": {
"kind": "Form",
"properties": {
"title": "Deploy App Attach VM with Tools",
"title": "Azure Virtual Desktop LZA: Deploy App Attach VM with Tools",
"steps": [
{
"name": "basics",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"view": {
"kind": "Form",
"properties": {
"title": "AVD Landing Zone Accelerator: Auto Increase Premium File Share Quota",
"title": "Azure Virtual Desktop LZA: Auto Increase Premium File Share Quota",
"steps": [
{
"name": "basics",
Expand Down
2 changes: 1 addition & 1 deletion workload/portal-ui/brownfield/portalUiScalingTool.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"view": {
"kind": "Form",
"properties": {
"title": "AVD Landing Zone Accelerator: Scaling Tool",
"title": "Azure Virtual Desktop LZA: Scaling Tool",
"steps": [
{
"name": "basics",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"view": {
"kind": "Form",
"properties": {
"title": "AVD Accelerator: Start VM On Connect",
"title": "Azure Virtual Desktop LZA: Start VM On Connect",
"steps": [
{
"name": "basics",
Expand Down
74 changes: 74 additions & 0 deletions workload/variables/osMarketPlaceImages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"win10_21h2": {
"publisher": "MicrosoftWindowsDesktop",
"offer": "windows-10",
"sku": "win10-21h2-avd",
"version": "latest"
},
"win10_21h2_office": {
"publisher": "MicrosoftWindowsDesktop",
"offer": "office-365",
"sku": "win10-21h2-avd-m365",
"version": "latest"
},
"win10_22h2_g2": {
"publisher": "MicrosoftWindowsDesktop",
"offer": "windows-10",
"sku": "win10-22h2-avd-g2",
"version": "latest"
},
"win10_22h2_office_g2": {
"publisher": "MicrosoftWindowsDesktop",
"offer": "office-365",
"sku": "win10-22h2-avd-m365-g2",
"version": "latest"
},
"win11_21h2": {
"publisher": "MicrosoftWindowsDesktop",
"offer": "Windows-11",
"sku": "win11-21h2-avd",
"version": "latest"
},
"win11_21h2_office": {
"publisher": "MicrosoftWindowsDesktop",
"offer": "office-365",
"sku": "win11-21h2-avd-m365",
"version": "latest"
},
"win11_22h2": {
"publisher": "MicrosoftWindowsDesktop",
"offer": "Windows-11",
"sku": "win11-22h2-avd",
"version": "latest"
},
"win11_22h2_office": {
"publisher": "MicrosoftWindowsDesktop",
"offer": "office-365",
"sku": "win11-22h2-avd-m365",
"version": "latest"
},
"winServer_2022_Datacenter": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2022-datacenter-g2",
"version": "latest"
},
"winServer_2022_Datacenter_smalldisk_g2": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2022-datacenter-smalldisk-g2",
"version": "latest"
},
"winServer_2022_datacenter_core": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2022-datacenter-core-g2",
"version": "latest"
},
"winServer_2022_Datacenter_core_smalldisk_g2": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2022-datacenter-core-smalldisk-g2",
"version": "latest"
}
}

0 comments on commit 18a5b4e

Please sign in to comment.