Difference between revisions of "Az vm create"
Jump to navigation
Jump to search
Line 11: | Line 11: | ||
``` | ``` | ||
az network nic create --resource-group $RG--name $NIC --vnet-name $VNET--subnet $SUBNET | az network nic create --resource-group $RG--name $NIC --vnet-name $VNET--subnet $SUBNET | ||
− | az vm create --resource-group $RG --name $VM --size Standard_D4s_v5 --image Ubuntu2204 --nics $NIC --ssh-key-values @~/.ssh/myid.pub | + | az vm create --resource-group $RG --name $VM --size Standard_D4s_v5 --image Ubuntu2204 --nics $NIC --admin-username myuser --ssh-key-values @~/.ssh/myid.pub |
``` | ``` |
Latest revision as of 04:45, 22 May 2024
az cli create vm
set -a RG=foo VM=foo NIC=$VM-nic1 VNET=foo SUBNET=foo
az network nic create --resource-group $RG--name $NIC --vnet-name $VNET--subnet $SUBNET az vm create --resource-group $RG --name $VM --size Standard_D4s_v5 --image Ubuntu2204 --nics $NIC --admin-username myuser --ssh-key-values @~/.ssh/myid.pub