-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Azure.VM.MultiTenantHosting (#3023)
* Added Azure.VM.MultiTenantHosting * Additional updates * Fix --------- Co-authored-by: Bernie White <bewhite@microsoft.com>
- Loading branch information
1 parent
1f2cc28
commit 4cb06a4
Showing
8 changed files
with
400 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
--- | ||
severity: Awareness | ||
pillar: Cost Optimization | ||
category: CO:05 Rate optimization | ||
resource: Virtual Machine | ||
online version: https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.VM.MultiTenantHosting/ | ||
--- | ||
|
||
# Multi-tenant Hosting Rights | ||
|
||
## SYNOPSIS | ||
|
||
Deploy Windows 10 and 11 virtual machines in Azure using Multi-tenant Hosting Rights to leverage your existing Windows licenses. | ||
|
||
## DESCRIPTION | ||
|
||
Multi-tenant Hosting Rights allow you to bring your Windows 10 and 11 licenses to the cloud, enabling you to run virtual machines (VMs) on Azure without incurring additional licensing costs. | ||
This benefit is applicable if you have Windows licenses with Software Assurance or qualifying subscription licenses, making it a cost-effective option for your Azure deployments. | ||
|
||
By utilizing Multi-tenant Hosting Rights, you can reduce the total cost of ownership when running Windows VMs in Azure. | ||
This is particularly advantageous for organizations that already have on-premises Windows licenses covered under Software Assurance or eligible subscription plans. | ||
|
||
Please note that this benefit is available exclusively for Windows 10 Enterprise and Windows 11 Enterprise editions. | ||
|
||
## RECOMMENDATION | ||
|
||
Consider using Multi-tenant Hosting Rights to maximize your existing licensing investments when deploying Windows VMs in Azure. | ||
|
||
### Configure with Azure template | ||
|
||
To deploy virtual machines that pass this rule: | ||
|
||
- Set the `properties.licenseType` property to `Windows_Client`. | ||
|
||
For example: | ||
|
||
```json | ||
{ | ||
"type": "Microsoft.Compute/virtualMachines", | ||
"apiVersion": "2024-07-01", | ||
"name": "[parameters('name')]", | ||
"location": "[parameters('location')]", | ||
"properties": { | ||
"hardwareProfile": { | ||
"vmSize": "Standard_D2s_v3" | ||
}, | ||
"osProfile": { | ||
"computerName": "[parameters('name')]", | ||
"adminUsername": "[parameters('adminUsername')]", | ||
"adminPassword": "[parameters('adminPassword')]" | ||
}, | ||
"storageProfile": { | ||
"imageReference": { | ||
"publisher": "MicrosoftWindowsDesktop", | ||
"offer": "windows-11", | ||
"sku": "win11-23h2-ent", | ||
"version": "latest" | ||
}, | ||
"osDisk": { | ||
"name": "[format('{0}-disk0', parameters('name'))]", | ||
"caching": "ReadWrite", | ||
"createOption": "FromImage", | ||
"managedDisk": { | ||
"storageAccountType": "Premium_LRS" | ||
} | ||
} | ||
}, | ||
"licenseType": "Windows_Client", | ||
"networkProfile": { | ||
"networkInterfaces": [ | ||
{ | ||
"id": "[resourceId('Microsoft.Network/networkInterfaces', format('{0}-nic0', parameters('name')))]" | ||
} | ||
] | ||
} | ||
}, | ||
"dependsOn": [ | ||
"[resourceId('Microsoft.Network/networkInterfaces', format('{0}-nic0', parameters('name')))]" | ||
] | ||
} | ||
``` | ||
|
||
### Configure with Bicep | ||
|
||
To deploy virtual machines that pass this rule: | ||
|
||
- Set the `properties.licenseType` property to `Windows_Client`. | ||
|
||
For example: | ||
|
||
```bicep | ||
resource vm 'Microsoft.Compute/virtualMachines@2024-07-01' = { | ||
name: name | ||
location: location | ||
properties: { | ||
hardwareProfile: { | ||
vmSize: 'Standard_D2s_v3' | ||
} | ||
osProfile: { | ||
computerName: name | ||
adminUsername: adminUsername | ||
adminPassword: adminPassword | ||
} | ||
storageProfile: { | ||
imageReference: { | ||
publisher: 'MicrosoftWindowsDesktop' | ||
offer: 'windows-11' | ||
sku: 'win11-23h2-ent' | ||
version: 'latest' | ||
} | ||
osDisk: { | ||
name: '${name}-disk0' | ||
caching: 'ReadWrite' | ||
createOption: 'FromImage' | ||
managedDisk: { | ||
storageAccountType: 'Premium_LRS' | ||
} | ||
} | ||
} | ||
licenseType: 'Windows_Client' | ||
networkProfile: { | ||
networkInterfaces: [ | ||
{ | ||
id: nic.id | ||
} | ||
] | ||
} | ||
} | ||
} | ||
``` | ||
|
||
## NOTES | ||
|
||
This rule may produce false negatives because it does not verify whether the installed Windows OS is an Enterprise edition. | ||
|
||
### Rule configuration | ||
|
||
<!-- module:config rule AZURE_VM_USE_MULTI_TENANT_HOSTING_RIGHTS --> | ||
|
||
By default, this rule is ignored. | ||
For this rule to apply, set the `AZURE_VM_USE_MULTI_TENANT_HOSTING_RIGHTS` configuration value to `true`. | ||
|
||
For example: | ||
|
||
```yaml | ||
configuration: | ||
AZURE_VM_USE_MULTI_TENANT_HOSTING_RIGHTS: true | ||
``` | ||
## LINKS | ||
- [CO:05 Rate optimization](https://learn.microsoft.com/azure/well-architected/cost-optimization/get-best-rates) | ||
- [Multi-tenant Hosting Rights](https://learn.microsoft.com/azure/virtual-machines/windows/windows-desktop-multitenant-hosting-deployment) | ||
- [Azure deployment reference](https://learn.microsoft.com/azure/templates/microsoft.compute/virtualmachinescalesets/virtualmachines) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.