From 09c2c9d6585584dbcb97533a45bf5e9e257e7c35 Mon Sep 17 00:00:00 2001 From: Jaromir Kaspar Date: Thu, 30 Jul 2020 12:08:36 +0200 Subject: [PATCH 1/2] scripts url updated --- Scenarios/Running WSLab in Azure/dsc/config.zip | Bin 807 -> 783 bytes .../dsc/config/config.ps1 | 2 +- .../Running WSLab in Azure/dsc/configwin10.zip | Bin 806 -> 785 bytes .../dsc/configwin10/configwin10.ps1 | 2 +- 4 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Scenarios/Running WSLab in Azure/dsc/config.zip b/Scenarios/Running WSLab in Azure/dsc/config.zip index f08e317cd2f232b67ff496b9a2f53b14521db687..44ab894f032dbecddc7a051676815e7e0a9abc77 100644 GIT binary patch delta 756 zcmV@6aWAK2msw+{!pr!Dk60P007$u000UA003ieZf0p`E^u=( z%~juT+At7)uhjp+Lr4W_2GPACO&a6JhSUK9S{_=2Omcunuv6QCF~n z8la8hVmi#Wqz^5GI#=G^+||0s5n!_qG2p_NE8PHQA_e5@It2CL+&koc*bw9+$;2@F zkU8|$g~k}x-%+4Jn3R8eef0uqw^!-ENNhngVW)j51AW07?5IHq!q;tKA&-X(8M=j} zSG|Aid5VXBhEx?|p&B zM*Q;jFi;<;? zD`|J@teQ2s5`kpCGxh5P-Me;u&;nEFfm(78I+6>2gYCkmpoZmg54=cmv+gKqq$dLm z5TlRh?cN}~AL!EU-vmvulyjg17_MDRoXm^~b-7q%b5>aB z;z|c>T=bJ932jHF!2__8YnO51Cl3$lF0Fu6pmTNbiYiD&I$sOtE5UIN(~WYr2JQtC zUQ_^o^&cS~hqR)+8DAc&NoWmI<03w2|D={QSwkuh&I9OEE;ES6a2;^jebzv-}v7gE2qy^xEkE~gv zA~;}3ZusB-egjZT0Rle&6aWAK2msw+{!pr!Dk60P007$ulg|PwE^{JmC|PFK0dpd3 mC|PFK0T>WsBxYdN0Z>Z?1^@s60096209*h70G$E=0001gC{Mxw delta 780 zcmV+n1M~ck2B!vpP)h>@6aWAK2mofMoJ^zWKyQr#00039000UA003ieZf0p`E^u=( z%~erv+At7)uhjqGA*6yd6SaFos{#6q^$FUb1t4HXhqn0R~j*j){;NsTSoy z9-xilVmv4|We81#I#tNRpRtO;^S3Mq^} z6t=ZDLZc0DN0SeaU-A`O|Wp6h0!QeOAh3d6wnuY(*f_fD2c?lUFtw zM`zNW*1>Gn4QR=W@+ikn4SNh1Rp zp@9^=yKc`0;k`(oU;OEyA!hO!XdnCzyd;=FLhm(vW|{|BqZ(@v7ZfKGV`5$PyfHVE z#IFQ$>fP}`Ni9dlOSA0xk@USO(^%D>c41e3@c5%*^Gl-=Ahea3I*-5}Ob)QUsbhJP zGjxc5EpOmT&eCDV9OjGjImnmOL8jabba)g^ZobFZH0hNJCVaM=O+srJ8W(9h{vBFY zigl?1IGEsfrNa3TBUkWJiS>Emec@v0B0)A_^fj)Zb*A|+#K0rD$i(Xim`LJGLVxZm zNM-Vqpzj+NOlZshhFxNR$v+i`t1|LS7{-NEE)_=%vtK^05&W-F`~zC;^p(Fe>sAIV z+Passwn6q1tOLH3#$Kk4Q4=795WN;{*=~8rCj4)HzW`860Rle&6aWAK2mofMoJ^zW zKyQr#00039leYpYF4f1F{UYDf0ncE-aelzl0ncE-aelzl0Z>Z?1^@s60096209*h7 K0JQ=D0000XkXS1K diff --git a/Scenarios/Running WSLab in Azure/dsc/config/config.ps1 b/Scenarios/Running WSLab in Azure/dsc/config/config.ps1 index 1476141b..0e07949c 100644 --- a/Scenarios/Running WSLab in Azure/dsc/config/config.ps1 +++ b/Scenarios/Running WSLab in Azure/dsc/config/config.ps1 @@ -30,7 +30,7 @@ Configuration Config { { SetScript = { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - Invoke-WebRequest -UseBasicParsing -Uri https://github.com/Microsoft/WSLab/blob/master/scripts.zip?raw=true -OutFile d:\scripts.zip + Invoke-WebRequest -UseBasicParsing -Uri https://aka.ms/wslab/download -OutFile d:\scripts.zip } TestScript = {Test-Path -Path d:\scripts.zip} GetScript = { @{Ensure = if (Test-Path -Path d:\scripts.zip) {'Present'} else {'Absent'}} } diff --git a/Scenarios/Running WSLab in Azure/dsc/configwin10.zip b/Scenarios/Running WSLab in Azure/dsc/configwin10.zip index 116ea6c901f409b2e0a2cef012a28f149ca16956..5df93f9da713b365e275ccf64bf5c204ae85aa2b 100644 GIT binary patch delta 752 zcmV@6aWAK2msw+{!kyNlgVuY001xt000jF003ieZf0p`cWG`h zFfMR&G0jy`Z`v>rey`O3;6+FUX$G}>Lz=X%z*eaRRNC^;BIG0oco;ji9T;Q$_nk?A z0E2TpQAb;o={o6HVKSe|b>dIXd4sl_Vht$r9?9?XQXsR7rUnDjUd#yy1GsSQC-NNqWMJkyd8w$06pDq3XpT$G zTD2-t9c-}$ddvf8DlRS7lJ!A%%Ht!2j1p^6?+&y1&kRCNoe0ujj2G$i`=UJ}esmh#>q4m?Q&Jc$6+pAq&d zz1G2ikGHc)Xaz&#axn##p{4CoQ#ycy3I34xF1r}HhPPs5F1?T5RX2$Q>x|J?xEY#M z^Qnt}feSTF#Tx-k#!)IEUNV6eGWksqyUKzAZTLU1llQmfYpy#l6aytK#)8b|lMo(EbP)w6W5fj-k~ zA-ql7Rl2>ZWWE6Jh@&rwzI*PqaHj$$HhyF{=_n(6kNp6?Qr7)}ZhLir5JCjaSslX$ zM*6~MdH(@WO928u02BZK00;oxVE#}asFTTU0ssIolgI)vE^{JmC|PFK0dpd3C|PFK i0c&1jBxYdN0Z>Z?1^@s6009620AT delta 773 zcmV+g1N!`t2BrpoP)h>@6aWAK2mofMoJ^=NfMkLK00348000jF003ieZf0p`cWG`h zFfMR&G0jz9Z`v>rf3MW<;6+FUX(np-hE#1`fvr*tsPxZ6i;$BX;MLfv?UXUbci%Zl zA<)4<+C!5_$@$Lr^WFXKa<1fn4-?HSSCV8BnH?Swyke$**_dSCW%tgnhmKQ#1zo;k zGGbQgX{A>*FjjLp?3G$7f)<))s>-VHU6Ejib~EHssfK?3u8iWrZJE@*ATkH5$bTrefN?Dgm#!6k*GFbb#w!!;K@m;;llhe-MzNy zTM-@QFSCY!G>HZj`GAx+d8v@uQAdLTX^-XvgaKSQ3o?0*ehM)2H+iY6i4=-OnP_%P z%~G`}QVVRg3;KnJ&{14ktR)+Q?$v5t2oufiw4;?(p%UmIwO(I$Sw{04VUADU0$j)! z^#t@Df@^qAFcpN}8u-c#50O9y34#lnlaaNtsrmkYklRrbR6{lPuXw1HQ3LCz`SJsy z0)Na5QqDJ7*wtS={;b*L)anEXZ6~(L1-KL!3|0@dZ^a9aw$*)ysuw){qxNe+b%;Sm zrY+I8_mE-sijCoIW6G^Wz`bbF_!(nI(=#28_{(}W39VyjT&A<)HMG2`no5VTHNhXs z-fvR_NT*C_r2t=8ts-3~Qx}64Km-wjmfXNu!N_0uyxxBRP)h* Date: Fri, 31 Jul 2020 14:35:45 +0200 Subject: [PATCH 2/2] updated json templates --- Scenarios/Running WSLab in Azure/WSLab.json | 813 +++++++++++------- .../WSLab.parameters.json | 6 - .../Running WSLab in Azure/WSLabwin10.json | 273 ++++-- Scenarios/Running WSLab in Azure/readme.md | 4 +- 4 files changed, 701 insertions(+), 395 deletions(-) diff --git a/Scenarios/Running WSLab in Azure/WSLab.json b/Scenarios/Running WSLab in Azure/WSLab.json index 7ec8a01b..285c9d8b 100644 --- a/Scenarios/Running WSLab in Azure/WSLab.json +++ b/Scenarios/Running WSLab in Azure/WSLab.json @@ -1,341 +1,496 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "location": { - "type": "string", - "defaultValue": "westeurope", - "allowedValues": [ - "australiaeast", - "australiasoutheast", - "brazilsouth", - "canadacentral", - "canadaeast", - "centralindia", - "centralus", - "eastasia", - "eastus", - "eastus2", - "japaneast", - "japanwest", - "koreacentral", - "koreasouth", - "northcentralus", - "northeurope", - "southcentralus", - "southeastasia", - "southindia", - "uksouth", - "ukwest", - "westcentralus", - "westeurope", - "westindia", - "westus", - "westus2" - ] - }, - "virtualMachineName": { - "type": "string", - "defaultValue": "WSLab" - }, - "virtualMachineSize": { - "type": "string", - "defaultValue": "Standard_D16s_v3", - "allowedValues": [ - "Standard_D2_v3", - "Standard_D4_v3", - "Standard_D8_v3", - "Standard_D16_v3", - "Standard_D32_v3", - "Standard_D64_v3", - "Standard_D2s_v3", - "Standard_D4s_v3", - "Standard_D8s_v3", - "Standard_D16s_v3", - "Standard_D32s_v3", - "Standard_D64s_v3", - "Standard_E2_v3", - "Standard_E4_v3", - "Standard_E8_v3", - "Standard_E16_v3", - "Standard_E32_v3", - "Standard_E64_v3", - "Standard_E2s_v3", - "Standard_E4s_v3", - "Standard_E8s_v3", - "Standard_E16s_v3", - "Standard_E32-8s_v3", - "Standard_E32-16s_v3", - "Standard_E32s_v3", - "Standard_E64-16s_v3", - "Standard_E64-32s_v3", - "Standard_E64s_v3" - ] - }, - "adminUsername": { - "type": "string", - "defaultValue": "LabAdmin" - }, - "virtualNetworkName": { - "type": "string", - "defaultValue": "WSLab-vnet" - }, - "networkInterfaceName": { - "type": "string", - "defaultValue": "WSLabNIC1" - }, - "networkSecurityGroupName": { - "type": "string", - "defaultValue": "WSLabNIC1" - }, - "adminPassword": { - "type": "securestring" - }, - "addressPrefix": { - "type": "string", - "defaultValue": "10.0.0.0/24" - }, - "subnetName": { - "type": "string", - "defaultValue": "default" - }, - "subnetPrefix": { - "type": "string", - "defaultValue": "10.0.0.0/24" - }, - "publicIpAddressName": { - "type": "string", - "defaultValue": "WSLab-ip" - }, - "publicIpAddressType": { - "type": "string", - "defaultValue": "Dynamic" - }, - "publicIpAddressSku": { - "type": "string", - "defaultValue": "Basic" - }, - "autoShutdownStatus": { - "type": "string", - "defaultValue": "Enabled" - }, - "autoShutdownTime": { - "type": "string", - "defaultValue": "19:00" - }, - "autoShutdownTimeZone": { - "type": "string", - "defaultValue": "UTC" - }, - "autoShutdownNotificationStatus": { - "type": "string", - "defaultValue": "Disabled" - }, - "_artifactsLocation": { + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "virtualMachineName": { "type": "string", + "defaultValue": "WSLab" + }, + "virtualMachineSize": { + "type": "string", + "defaultValue": "Standard_D16s_v3", + "allowedValues": [ + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D64s_v4", + "Standard_D4d_v4", + "Standard_D8d_v4", + "Standard_D16d_v4", + "Standard_D32d_v4", + "Standard_D64d_v4", + "Standard_D4ds_v4", + "Standard_D8ds_v4", + "Standard_D16ds_v4", + "Standard_D32ds_v4", + "Standard_D64ds_v4", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E32-8s_v3", + "Standard_E32-16s_v3", + "Standard_E32s_v3", + "Standard_E64-16s_v3", + "Standard_E64-32s_v3", + "Standard_E64s_v3", + "Standard_E4_v4", + "Standard_E8_v4", + "Standard_E16_v4", + "Standard_E20_v4", + "Standard_E32_v4", + "Standard_E48_v4", + "Standard_E64_v4", + "Standard_E4s_v4", + "Standard_E8s_v4", + "Standard_E16s_v4", + "Standard_E20s_v4", + "Standard_E32s_v4", + "Standard_E48s_v4", + "Standard_E64s_v4", + "Standard_E4d_v4", + "Standard_E8d_v4", + "Standard_E16d_v4", + "Standard_E20d_v4", + "Standard_E32d_v4", + "Standard_E48d_v4", + "Standard_E64d_v4", + "Standard_E4ds_v4", + "Standard_E8ds_v4", + "Standard_E16ds_v4", + "Standard_E20ds_v4", + "Standard_E32ds_v4", + "Standard_E48ds_v4", + "Standard_E64ds_v4" + ] + }, + "managedDiskType": { + "type": "string", + "defaultValue": "StandardSSD_LRS", + "allowedValues": [ + "StandardSSD_LRS", + "Premium_LRS" + ], "metadata": { - "description": "Location of resources that the script is dependent on such as linked templates and DSC modules" - }, - "defaultValue": "https://raw.githubusercontent.com/Microsoft/WSLab/dev/Scenarios/Running%20WSLab%20in%20Azure" - }, - "_artifactsLocationSasToken": { - "type": "securestring", - "metadata": { - "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated." - }, - "defaultValue": "" - } - }, - "variables": { - "vnetId": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", - "subnetRef": "[concat(variables('vnetId'), '/subnets/', parameters('subnetName'))]" - }, - "resources": [ - { - "name": "[parameters('virtualMachineName')]", - "type": "Microsoft.Compute/virtualMachines", - "apiVersion": "2019-07-01", - "location": "[parameters('location')]", - "dependsOn": [ - "[concat('Microsoft.Network/networkInterfaces/', parameters('networkInterfaceName'))]" - ], - "properties": { - "osProfile": { - "computerName": "[parameters('virtualMachineName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]", - "windowsConfiguration": { - "provisionVmAgent": "true" - } - }, - "hardwareProfile": { - "vmSize": "[parameters('virtualMachineSize')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "MicrosoftWindowsServer", - "offer": "WindowsServer", - "sku": "2019-Datacenter", - "version": "latest" - }, - "osDisk": { - "createOption": "fromImage", - "managedDisk": { - "storageAccountType": "Premium_LRS" - } - }, - "dataDisks": [] - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaceName'))]" - } - ] - }, - "licenseType": "Windows_Server" - } + "description": "The Storage type of the VM OS disk. If your VM contains an 's' in the VM size, you can select Premium_LRS storage for increased performance." + } }, - { - "name": "[concat('shutdown-computevm-', parameters('virtualMachineName'))]", - "type": "Microsoft.DevTestLab/schedules", - "apiVersion": "2017-04-26-preview", - "location": "[parameters('location')]", - "properties": { - "status": "[parameters('autoShutdownStatus')]", - "taskType": "ComputeVmShutdownTask", - "dailyRecurrence": { - "time": "[parameters('autoShutdownTime')]" - }, - "timeZoneId": "[parameters('autoShutdownTimeZone')]", - "targetResourceId": "[resourceId('Microsoft.Compute/virtualMachines', parameters('virtualMachineName'))]", - "notificationSettings": { - "status": "[parameters('autoShutdownNotificationStatus')]", - "timeInMinutes": "30" - } - }, - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('virtualMachineName'))]" + "adminUsername": { + "type": "string", + "defaultValue": "LabAdmin" + }, + "virtualNetworkName": { + "type": "string", + "defaultValue": "WSLab-vnet" + }, + "networkInterfaceName": { + "type": "string", + "defaultValue": "WSLabNIC1" + }, + "networkSecurityGroupName": { + "type": "string", + "defaultValue": "WSLabNIC1" + }, + "adminPassword": { + "type": "securestring" + }, + "addressPrefix": { + "type": "string", + "defaultValue": "10.0.0.0/24" + }, + "subnetName": { + "type": "string", + "defaultValue": "default" + }, + "subnetPrefix": { + "type": "string", + "defaultValue": "10.0.0.0/24" + }, + "publicIpAddressName": { + "type": "string", + "defaultValue": "WSLab-ip" + }, + "publicIpAddressType": { + "type": "string", + "defaultValue": "Dynamic" + }, + "publicIpAddressSku": { + "type": "string", + "defaultValue": "Basic" + }, + "autoShutdownStatus": { + "type": "string", + "defaultValue": "Enabled", + "allowedValues": [ + "Enabled", + "Disabled" ] }, - { - "name": "[parameters('virtualNetworkName')]", - "type": "Microsoft.Network/virtualNetworks", - "apiVersion": "2020-04-01", - "location": "[parameters('location')]", - "properties": { - "addressSpace": { - "addressPrefixes": [ - "[parameters('addressPrefix')]" - ] - }, - "subnets": [ - { - "name": "[parameters('subnetName')]", - "properties": { - "addressPrefix": "[parameters('subnetPrefix')]" - } - } - ] - } + "autoShutdownTime": { + "type": "string", + "defaultValue": "22:00" }, - { - "name": "[parameters('networkInterfaceName')]", - "type": "Microsoft.Network/networkInterfaces", - "apiVersion": "2020-04-01", - "location": "[parameters('location')]", - "dependsOn": [ - "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]", - "[concat('Microsoft.Network/publicIpAddresses/', parameters('publicIpAddressName'))]", - "[concat('Microsoft.Network/networkSecurityGroups/', parameters('networkSecurityGroupName'))]" - ], - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "subnet": { - "id": "[variables('subnetRef')]" - }, - "privateIPAllocationMethod": "Dynamic", - "publicIpAddress": { - "id": "[resourceId('Microsoft.Network/publicIpAddresses', parameters('publicIpAddressName'))]" - } - } - } - ], - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroupName'))]" - } - } + "autoShutdownTimeZone": { + "type": "string", + "defaultValue": "UTC", + "allowedValues": [ + "Afghanistan Standard Time", + "Alaskan Standard Time", + "Aleutian Standard Time", + "Altai Standard Time", + "Arab Standard Time", + "Arabian Standard Time", + "Arabic Standard Time", + "Argentina Standard Time", + "Astrakhan Standard Time", + "Atlantic Standard Time", + "AUS Central Standard Time", + "Aus Central W. Standard Time", + "AUS Eastern Standard Time", + "Azerbaijan Standard Time", + "Azores Standard Time", + "Bahia Standard Time", + "Bangladesh Standard Time", + "Belarus Standard Time", + "Bougainville Standard Time", + "Canada Central Standard Time", + "Cape Verde Standard Time", + "Caucasus Standard Time", + "Cen. Australia Standard Time", + "Central America Standard Time", + "Central Asia Standard Time", + "Central Brazilian Standard Time", + "Central Europe Standard Time", + "Central European Standard Time", + "Central Pacific Standard Time", + "Central Standard Time", + "Central Standard Time (Mexico)", + "Chatham Islands Standard Time", + "China Standard Time", + "Cuba Standard Time", + "Dateline Standard Time", + "E. Africa Standard Time", + "E. Australia Standard Time", + "E. Europe Standard Time", + "E. South America Standard Time", + "Easter Island Standard Time", + "Eastern Standard Time", + "Eastern Standard Time (Mexico)", + "Egypt Standard Time", + "Ekaterinburg Standard Time", + "Fiji Standard Time", + "FLE Standard Time", + "Georgian Standard Time", + "GMT Standard Time", + "Greenland Standard Time", + "Greenwich Standard Time", + "GTB Standard Time", + "Haiti Standard Time", + "Hawaiian Standard Time", + "India Standard Time", + "Iran Standard Time", + "Israel Standard Time", + "Jordan Standard Time", + "Kaliningrad Standard Time", + "Korea Standard Time", + "Libya Standard Time", + "Line Islands Standard Time", + "Lord Howe Standard Time", + "Magadan Standard Time", + "Magallanes Standard Time", + "Marquesas Standard Time", + "Mauritius Standard Time", + "Middle East Standard Time", + "Montevideo Standard Time", + "Morocco Standard Time", + "Mountain Standard Time", + "Mountain Standard Time (Mexico)", + "Myanmar Standard Time", + "N. Central Asia Standard Time", + "Namibia Standard Time", + "Nepal Standard Time", + "New Zealand Standard Time", + "Newfoundland Standard Time", + "Norfolk Standard Time", + "North Asia East Standard Time", + "North Asia Standard Time", + "North Korea Standard Time", + "Omsk Standard Time", + "Pacific SA Standard Time", + "Pacific Standard Time", + "Pacific Standard Time (Mexico)", + "Pakistan Standard Time", + "Paraguay Standard Time", + "Romance Standard Time", + "Russia Time Zone 10", + "Russia Time Zone 11", + "Russia Time Zone 3", + "Russian Standard Time", + "SA Eastern Standard Time", + "SA Pacific Standard Time", + "SA Western Standard Time", + "Saint Pierre Standard Time", + "Sakhalin Standard Time", + "Samoa Standard Time", + "Sao Tome Standard Time", + "Saratov Standard Time", + "SE Asia Standard Time", + "Singapore Standard Time", + "South Africa Standard Time", + "Sri Lanka Standard Time", + "Sudan Standard Time", + "Syria Standard Time", + "Taipei Standard Time", + "Tasmania Standard Time", + "Tocantins Standard Time", + "Tokyo Standard Time", + "Tomsk Standard Time", + "Tonga Standard Time", + "Transbaikal Standard Time", + "Turkey Standard Time", + "Turks And Caicos Standard Time", + "Ulaanbaatar Standard Time", + "US Eastern Standard Time", + "US Mountain Standard Time", + "UTC", + "UTC-02", + "UTC-08", + "UTC-09", + "UTC-11", + "UTC+12", + "UTC+13", + "Venezuela Standard Time", + "Vladivostok Standard Time", + "W. Australia Standard Time", + "W. Central Africa Standard Time", + "W. Europe Standard Time", + "W. Mongolia Standard Time", + "West Asia Standard Time", + "West Bank Standard Time", + "West Pacific Standard Time", + "Yakutsk Standard Time" + ] }, - { - "name": "[parameters('publicIpAddressName')]", - "type": "Microsoft.Network/publicIpAddresses", - "apiVersion": "2020-04-01", - "location": "[parameters('location')]", - "properties": { - "publicIpAllocationMethod": "[parameters('publicIpAddressType')]" + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "Location of resources that the script is dependent on such as linked templates and DSC modules" }, - "sku": { - "name": "[parameters('publicIpAddressSku')]" - } - }, - { - "name": "[parameters('networkSecurityGroupName')]", - "type": "Microsoft.Network/networkSecurityGroups", - "apiVersion": "2020-04-01", - "location": "[parameters('location')]", - "properties": { - "securityRules": [ - { - "name": "default-allow-rdp", - "properties": { - "priority": 1000, - "protocol": "TCP", - "access": "Allow", - "direction": "Inbound", - "sourceAddressPrefix": "*", - "sourcePortRange": "*", - "destinationAddressPrefix": "*", - "destinationPortRange": "3389" - } - } - ] - } + "defaultValue": "https://raw.githubusercontent.com/Microsoft/WSLab/dev/Scenarios/Running%20WSLab%20in%20Azure" }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(parameters('virtualMachineName'),'/Microsoft.Powershell.DSC')]", - "apiVersion": "2019-07-01", - "location": "[resourceGroup().location]", - "tags": { - "displayName": "[concat(parameters('virtualMachineName'),'/Microsoft.Powershell.DSC')]" + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated." }, - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/',parameters('virtualMachineName'))]" - ], - "properties": { - "publisher": "Microsoft.Powershell", - "type": "DSC", - "typeHandlerVersion": "2.77", - "autoUpgradeMinorVersion": true, - "settings": { - "modulesUrl": "[concat(parameters('_artifactsLocation'),'/dsc/config.zip')]", - "sasToken": "[parameters('_artifactsLocationSasToken')]", - "configurationFunction": "config.ps1\\Config", - "properties": { - "nodeName": "[parameters('virtualMachineName')]" - } - }, - "protectedSettings": {} - } + "defaultValue": "" } - ], - "outputs": { - "adminUsername": { - "type": "string", - "value": "[parameters('adminUsername')]" - } - } -} \ No newline at end of file + }, + "variables": { + "vnetId": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "subnetRef": "[concat(variables('vnetId'), '/subnets/', parameters('subnetName'))]" + }, + "resources": [ + { + "name": "[parameters('virtualMachineName')]", + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2019-07-01", + "location": "[resourceGroup().location]", + "dependsOn": [ + "[concat('Microsoft.Network/networkInterfaces/', parameters('networkInterfaceName'))]" + ], + "properties": { + "osProfile": { + "computerName": "[parameters('virtualMachineName')]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]", + "windowsConfiguration": { + "provisionVmAgent": "true" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('virtualMachineSize')]" + }, + "storageProfile": { + "imageReference": { + "publisher": "MicrosoftWindowsServer", + "offer": "WindowsServer", + "sku": "2019-Datacenter", + "version": "latest" + }, + "osDisk": { + "createOption": "fromImage", + "managedDisk": { + "storageAccountType": "[parameters('managedDiskType')]" + } + }, + "dataDisks": [] + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaceName'))]" + } + ] + }, + "licenseType": "Windows_Server" + } + }, + { + "name": "[concat('shutdown-computevm-', parameters('virtualMachineName'))]", + "type": "Microsoft.DevTestLab/schedules", + "apiVersion": "2018-09-15", + "location": "[resourceGroup().location]", + "properties": { + "status": "[parameters('autoShutdownStatus')]", + "taskType": "ComputeVmShutdownTask", + "dailyRecurrence": { + "time": "[parameters('autoShutdownTime')]" + }, + "timeZoneId": "[parameters('autoShutdownTimeZone')]", + "targetResourceId": "[resourceId('Microsoft.Compute/virtualMachines', parameters('virtualMachineName'))]" + }, + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('virtualMachineName'))]" + ] + }, + { + "name": "[parameters('virtualNetworkName')]", + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "2020-04-01", + "location": "[resourceGroup().location]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('addressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[parameters('subnetName')]", + "properties": { + "addressPrefix": "[parameters('subnetPrefix')]" + } + } + ] + } + }, + { + "name": "[parameters('networkInterfaceName')]", + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-04-01", + "location": "[resourceGroup().location]", + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]", + "[concat('Microsoft.Network/publicIpAddresses/', parameters('publicIpAddressName'))]", + "[concat('Microsoft.Network/networkSecurityGroups/', parameters('networkSecurityGroupName'))]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "subnet": { + "id": "[variables('subnetRef')]" + }, + "privateIPAllocationMethod": "Dynamic", + "publicIpAddress": { + "id": "[resourceId('Microsoft.Network/publicIpAddresses', parameters('publicIpAddressName'))]" + } + } + } + ], + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroupName'))]" + } + } + }, + { + "name": "[parameters('publicIpAddressName')]", + "type": "Microsoft.Network/publicIpAddresses", + "apiVersion": "2020-04-01", + "location": "[resourceGroup().location]", + "properties": { + "publicIpAllocationMethod": "[parameters('publicIpAddressType')]" + }, + "sku": { + "name": "[parameters('publicIpAddressSku')]" + } + }, + { + "name": "[parameters('networkSecurityGroupName')]", + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "2020-04-01", + "location": "[resourceGroup().location]", + "properties": { + "securityRules": [ + { + "name": "default-allow-rdp", + "properties": { + "priority": 1000, + "protocol": "TCP", + "access": "Allow", + "direction": "Inbound", + "sourceAddressPrefix": "*", + "sourcePortRange": "*", + "destinationAddressPrefix": "*", + "destinationPortRange": "3389" + } + } + ] + } + }, + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(parameters('virtualMachineName'),'/Microsoft.Powershell.DSC')]", + "apiVersion": "2019-07-01", + "location": "[resourceGroup().location]", + "tags": { + "displayName": "[concat(parameters('virtualMachineName'),'/Microsoft.Powershell.DSC')]" + }, + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/',parameters('virtualMachineName'))]" + ], + "properties": { + "publisher": "Microsoft.Powershell", + "type": "DSC", + "typeHandlerVersion": "2.77", + "autoUpgradeMinorVersion": true, + "settings": { + "modulesUrl": "[concat(parameters('_artifactsLocation'),'/dsc/config.zip')]", + "sasToken": "[parameters('_artifactsLocationSasToken')]", + "configurationFunction": "config.ps1\\Config", + "properties": { + "nodeName": "[parameters('virtualMachineName')]" + } + }, + "protectedSettings": {} + } + } + ], + "outputs": { + "adminUsername": { + "type": "string", + "value": "[parameters('adminUsername')]" + } + } + } \ No newline at end of file diff --git a/Scenarios/Running WSLab in Azure/WSLab.parameters.json b/Scenarios/Running WSLab in Azure/WSLab.parameters.json index 78de2a14..0dcd2490 100644 --- a/Scenarios/Running WSLab in Azure/WSLab.parameters.json +++ b/Scenarios/Running WSLab in Azure/WSLab.parameters.json @@ -2,9 +2,6 @@ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", "contentVersion": "1.0.0.0", "parameters": { - "location": { - "value": "westeurope" - }, "virtualMachineName": { "value": "WSLab" }, @@ -61,9 +58,6 @@ }, "autoShutdownTimeZone": { "value": "UTC" - }, - "autoShutdownNotificationStatus": { - "value": "Disabled" } } } \ No newline at end of file diff --git a/Scenarios/Running WSLab in Azure/WSLabwin10.json b/Scenarios/Running WSLab in Azure/WSLabwin10.json index 4648a277..522b5330 100644 --- a/Scenarios/Running WSLab in Azure/WSLabwin10.json +++ b/Scenarios/Running WSLab in Azure/WSLabwin10.json @@ -2,38 +2,6 @@ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { - "location": { - "type": "string", - "defaultValue": "westeurope", - "allowedValues": [ - "australiaeast", - "australiasoutheast", - "brazilsouth", - "canadacentral", - "canadaeast", - "centralindia", - "centralus", - "eastasia", - "eastus", - "eastus2", - "japaneast", - "japanwest", - "koreacentral", - "koreasouth", - "northcentralus", - "northeurope", - "southcentralus", - "southeastasia", - "southindia", - "uksouth", - "ukwest", - "westcentralus", - "westeurope", - "westindia", - "westus", - "westus2" - ] - }, "virtualMachineName": { "type": "string", "defaultValue": "WSLabwin10" @@ -42,26 +10,41 @@ "type": "string", "defaultValue": "Standard_D16s_v3", "allowedValues": [ - "Standard_D2_v3", "Standard_D4_v3", "Standard_D8_v3", "Standard_D16_v3", "Standard_D32_v3", "Standard_D64_v3", - "Standard_D2s_v3", "Standard_D4s_v3", "Standard_D8s_v3", "Standard_D16s_v3", "Standard_D32s_v3", "Standard_D64s_v3", - "Standard_E2_v3", + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D64s_v4", + "Standard_D4d_v4", + "Standard_D8d_v4", + "Standard_D16d_v4", + "Standard_D32d_v4", + "Standard_D64d_v4", + "Standard_D4ds_v4", + "Standard_D8ds_v4", + "Standard_D16ds_v4", + "Standard_D32ds_v4", + "Standard_D64ds_v4", "Standard_E4_v3", "Standard_E8_v3", "Standard_E16_v3", "Standard_E32_v3", "Standard_E64_v3", - "Standard_E2s_v3", - "Standard_E4s_v3", "Standard_E8s_v3", "Standard_E16s_v3", "Standard_E32-8s_v3", @@ -69,9 +52,48 @@ "Standard_E32s_v3", "Standard_E64-16s_v3", "Standard_E64-32s_v3", - "Standard_E64s_v3" + "Standard_E64s_v3", + "Standard_E4_v4", + "Standard_E8_v4", + "Standard_E16_v4", + "Standard_E20_v4", + "Standard_E32_v4", + "Standard_E48_v4", + "Standard_E64_v4", + "Standard_E4s_v4", + "Standard_E8s_v4", + "Standard_E16s_v4", + "Standard_E20s_v4", + "Standard_E32s_v4", + "Standard_E48s_v4", + "Standard_E64s_v4", + "Standard_E4d_v4", + "Standard_E8d_v4", + "Standard_E16d_v4", + "Standard_E20d_v4", + "Standard_E32d_v4", + "Standard_E48d_v4", + "Standard_E64d_v4", + "Standard_E4ds_v4", + "Standard_E8ds_v4", + "Standard_E16ds_v4", + "Standard_E20ds_v4", + "Standard_E32ds_v4", + "Standard_E48ds_v4", + "Standard_E64ds_v4" ] }, + "managedDiskType": { + "type": "string", + "defaultValue": "StandardSSD_LRS", + "allowedValues": [ + "StandardSSD_LRS", + "Premium_LRS" + ], + "metadata": { + "description": "The Storage type of the VM OS disk. If your VM contains an 's' in the VM size, you can select Premium_LRS storage for increased performance." + } + }, "adminUsername": { "type": "string", "defaultValue": "LabAdmin" @@ -117,19 +139,156 @@ }, "autoShutdownStatus": { "type": "string", - "defaultValue": "Enabled" + "defaultValue": "Enabled", + "allowedValues": [ + "Enabled", + "Disabled" + ] }, - "autoShutdownTime": { + "autoShutdownTime": { "type": "string", - "defaultValue": "19:00" + "defaultValue": "22:00" }, "autoShutdownTimeZone": { "type": "string", - "defaultValue": "UTC" - }, - "autoShutdownNotificationStatus": { - "type": "string", - "defaultValue": "Disabled" + "defaultValue": "UTC", + "allowedValues": [ + "Afghanistan Standard Time", + "Alaskan Standard Time", + "Aleutian Standard Time", + "Altai Standard Time", + "Arab Standard Time", + "Arabian Standard Time", + "Arabic Standard Time", + "Argentina Standard Time", + "Astrakhan Standard Time", + "Atlantic Standard Time", + "AUS Central Standard Time", + "Aus Central W. Standard Time", + "AUS Eastern Standard Time", + "Azerbaijan Standard Time", + "Azores Standard Time", + "Bahia Standard Time", + "Bangladesh Standard Time", + "Belarus Standard Time", + "Bougainville Standard Time", + "Canada Central Standard Time", + "Cape Verde Standard Time", + "Caucasus Standard Time", + "Cen. Australia Standard Time", + "Central America Standard Time", + "Central Asia Standard Time", + "Central Brazilian Standard Time", + "Central Europe Standard Time", + "Central European Standard Time", + "Central Pacific Standard Time", + "Central Standard Time", + "Central Standard Time (Mexico)", + "Chatham Islands Standard Time", + "China Standard Time", + "Cuba Standard Time", + "Dateline Standard Time", + "E. Africa Standard Time", + "E. Australia Standard Time", + "E. Europe Standard Time", + "E. South America Standard Time", + "Easter Island Standard Time", + "Eastern Standard Time", + "Eastern Standard Time (Mexico)", + "Egypt Standard Time", + "Ekaterinburg Standard Time", + "Fiji Standard Time", + "FLE Standard Time", + "Georgian Standard Time", + "GMT Standard Time", + "Greenland Standard Time", + "Greenwich Standard Time", + "GTB Standard Time", + "Haiti Standard Time", + "Hawaiian Standard Time", + "India Standard Time", + "Iran Standard Time", + "Israel Standard Time", + "Jordan Standard Time", + "Kaliningrad Standard Time", + "Korea Standard Time", + "Libya Standard Time", + "Line Islands Standard Time", + "Lord Howe Standard Time", + "Magadan Standard Time", + "Magallanes Standard Time", + "Marquesas Standard Time", + "Mauritius Standard Time", + "Middle East Standard Time", + "Montevideo Standard Time", + "Morocco Standard Time", + "Mountain Standard Time", + "Mountain Standard Time (Mexico)", + "Myanmar Standard Time", + "N. Central Asia Standard Time", + "Namibia Standard Time", + "Nepal Standard Time", + "New Zealand Standard Time", + "Newfoundland Standard Time", + "Norfolk Standard Time", + "North Asia East Standard Time", + "North Asia Standard Time", + "North Korea Standard Time", + "Omsk Standard Time", + "Pacific SA Standard Time", + "Pacific Standard Time", + "Pacific Standard Time (Mexico)", + "Pakistan Standard Time", + "Paraguay Standard Time", + "Romance Standard Time", + "Russia Time Zone 10", + "Russia Time Zone 11", + "Russia Time Zone 3", + "Russian Standard Time", + "SA Eastern Standard Time", + "SA Pacific Standard Time", + "SA Western Standard Time", + "Saint Pierre Standard Time", + "Sakhalin Standard Time", + "Samoa Standard Time", + "Sao Tome Standard Time", + "Saratov Standard Time", + "SE Asia Standard Time", + "Singapore Standard Time", + "South Africa Standard Time", + "Sri Lanka Standard Time", + "Sudan Standard Time", + "Syria Standard Time", + "Taipei Standard Time", + "Tasmania Standard Time", + "Tocantins Standard Time", + "Tokyo Standard Time", + "Tomsk Standard Time", + "Tonga Standard Time", + "Transbaikal Standard Time", + "Turkey Standard Time", + "Turks And Caicos Standard Time", + "Ulaanbaatar Standard Time", + "US Eastern Standard Time", + "US Mountain Standard Time", + "UTC", + "UTC-02", + "UTC-08", + "UTC-09", + "UTC-11", + "UTC+12", + "UTC+13", + "Venezuela Standard Time", + "Vladivostok Standard Time", + "W. Australia Standard Time", + "W. Central Africa Standard Time", + "W. Europe Standard Time", + "W. Mongolia Standard Time", + "West Asia Standard Time", + "West Bank Standard Time", + "West Pacific Standard Time", + "Yakutsk Standard Time" + ] }, "_artifactsLocation": { "type": "string", @@ -147,6 +306,8 @@ } }, "variables": { + "randomGUID": "[substring(uniqueString(subscription().subscriptionId, resourceGroup().id, parameters('virtualMachineName')),0,6)]", + "dnsNameForPublicIP": "[toLower(concat(parameters('virtualMachineName'), variables('randomGUID')))]", "vnetId": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", "subnetRef": "[concat(variables('vnetId'), '/subnets/', parameters('subnetName'))]" }, @@ -155,7 +316,7 @@ "name": "[parameters('virtualMachineName')]", "type": "Microsoft.Compute/virtualMachines", "apiVersion": "2019-07-01", - "location": "[parameters('location')]", + "location": "[resourceGroup().location]", "dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', parameters('networkInterfaceName'))]" ], @@ -181,7 +342,7 @@ "osDisk": { "createOption": "fromImage", "managedDisk": { - "storageAccountType": "Premium_LRS" + "storageAccountType": "[parameters('managedDiskType')]" } }, "dataDisks": [] @@ -200,7 +361,7 @@ "name": "[concat('shutdown-computevm-', parameters('virtualMachineName'))]", "type": "Microsoft.DevTestLab/schedules", "apiVersion": "2018-09-15", - "location": "[parameters('location')]", + "location": "[resourceGroup().location]", "properties": { "status": "[parameters('autoShutdownStatus')]", "taskType": "ComputeVmShutdownTask", @@ -208,11 +369,7 @@ "time": "[parameters('autoShutdownTime')]" }, "timeZoneId": "[parameters('autoShutdownTimeZone')]", - "targetResourceId": "[resourceId('Microsoft.Compute/virtualMachines', parameters('virtualMachineName'))]", - "notificationSettings": { - "status": "[parameters('autoShutdownNotificationStatus')]", - "timeInMinutes": "30" - } + "targetResourceId": "[resourceId('Microsoft.Compute/virtualMachines', parameters('virtualMachineName'))]" }, "dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', parameters('virtualMachineName'))]" @@ -222,7 +379,7 @@ "name": "[parameters('virtualNetworkName')]", "type": "Microsoft.Network/virtualNetworks", "apiVersion": "2020-04-01", - "location": "[parameters('location')]", + "location": "[resourceGroup().location]", "properties": { "addressSpace": { "addressPrefixes": [ @@ -243,7 +400,7 @@ "name": "[parameters('networkInterfaceName')]", "type": "Microsoft.Network/networkInterfaces", "apiVersion": "2020-04-01", - "location": "[parameters('location')]", + "location": "[resourceGroup().location]", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]", "[concat('Microsoft.Network/publicIpAddresses/', parameters('publicIpAddressName'))]", @@ -273,7 +430,7 @@ "name": "[parameters('publicIpAddressName')]", "type": "Microsoft.Network/publicIpAddresses", "apiVersion": "2020-04-01", - "location": "[parameters('location')]", + "location": "[resourceGroup().location]", "properties": { "publicIpAllocationMethod": "[parameters('publicIpAddressType')]" }, @@ -285,7 +442,7 @@ "name": "[parameters('networkSecurityGroupName')]", "type": "Microsoft.Network/networkSecurityGroups", "apiVersion": "2020-04-01", - "location": "[parameters('location')]", + "location": "[resourceGroup().location]", "properties": { "securityRules": [ { diff --git a/Scenarios/Running WSLab in Azure/readme.md b/Scenarios/Running WSLab in Azure/readme.md index d7d62c2b..3b0eb977 100644 --- a/Scenarios/Running WSLab in Azure/readme.md +++ b/Scenarios/Running WSLab in Azure/readme.md @@ -76,12 +76,12 @@ mstsc /v:((Get-AzPublicIpAddress -ResourceGroupName WSLabRG).IpAddress) ## Windows Server 2019 [![](http://azuredeploy.net/deploybutton.png)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FMicrosoft%2FWSLab%2Fdev%2FScenarios%2FRunning%2520WSLab%2520in%2520Azure%2FWSLab.json) -[![](http://armviz.io/visualizebutton.png)](http://armviz.io/#/?load=https%3A%2F%2Fraw.githubusercontent.com/Microsoft/WSLab/dev/Scenarios/Running%20WSLab%20in%20Azure/WSLab.json) +[![](http://armviz.io/visualizebutton.png)](http://armviz.io/#/?load=https%3A%2F%2Fraw.githubusercontent.com/Microsoft/WSLab/master/Scenarios/Running%20WSLab%20in%20Azure/WSLab.json) ## Windows 10 20H1 [![](http://azuredeploy.net/deploybutton.png)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FMicrosoft%2FWSLab%2Fdev%2FScenarios%2FRunning%2520WSLab%2520in%2520Azure%2FWSLabwin10.json) -[![](http://armviz.io/visualizebutton.png)](http://armviz.io/#/?load=https%3A%2F%2Fraw.githubusercontent.com/Microsoft/WSLab/dev/Scenarios/Running%20WSLab%20in%20Azure/WSLabwin10.json) +[![](http://armviz.io/visualizebutton.png)](http://armviz.io/#/?load=https%3A%2F%2Fraw.githubusercontent.com/Microsoft/WSLab/master/Scenarios/Running%20WSLab%20in%20Azure/WSLabwin10.json) ![](/Scenarios/Running%20WSLab%20in%20Azure/Screenshots/CustomizedTemplate.png)