Azure Quickstart-malene er for øyeblikket tilgjengelige på engelsk
Create a VM in a new or existing vnet from a generalized VHD
This template creates a VM from a generalized VHD and let you connect it to a new or existing VNET that can reside in another Resource Group than the virtual machine
Denne Azure Resource Manager (ARM)-malen ble opprettet av et medlem av fellesskapet og ikke av Microsoft. Hver ARM-mal er lisensiert til deg i henhold til en lisensavtale med eieren, ikke med Microsoft. Microsoft er ikke ansvarlig for ARM-maler som leveres og lisensieres av medlemmer og siler dem ikke ut med tanke på sikkerhet, kompatibilitet eller ytelse. Fellesskapets ARM-maler støttes ikke av noe Microsoft-støtteprogram eller -tjeneste, og er gjort tilgjengelig SOM DE ER, uten noen form for garanti.
Parametere
Parameternavn | Beskrivelse |
---|---|
vmName | Name of the VM |
osType | Type of OS on the existing vhd |
osDiskVhdUri | Uri of the existing VHD in ARM standard or premium storage |
vmSize | Size of the VM |
vNetNewOrExisting | Specify whether to create a new or existing virtual network for the VM. |
virtualNetworkName | Name of the existing VNET |
virtualNetworkResourceGroup | Name of the existing VNET resource group |
subnetName | Name of the subnet in the virtual network you want to use |
dnsNameForPublicIP | Unique DNS Name for the Public IP used to access the Virtual Machine. |
location | Location for all resources. |
adminUsername | User name for the Virtual Machine. |
authenticationType | Type of authentication to use on the Virtual Machine. |
adminPasswordOrKey | Password or ssh key for the Virtual Machine. |
Bruke malen
PowerShell
New-AzResourceGroup -Name <resource-group-name> -Location <resource-group-location> #use this command when you need to create a new resource group for your deploymentInstallere og konfigurere Azure PowerShell
New-AzResourceGroupDeployment -ResourceGroupName <resource-group-name> -TemplateUri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.compute/vm-generalized-vhd-new-or-existing-vnet/azuredeploy.json
Kommandolinje
az group create --name <resource-group-name> --location <resource-group-location> #use this command when you need to create a new resource group for your deploymentInstaller og konfigurer Azures kommandolinjegrensesnitt for alle plattformer
az group deployment create --resource-group <my-resource-group> --template-uri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.compute/vm-generalized-vhd-new-or-existing-vnet/azuredeploy.json