Last active
February 15, 2017 18:28
-
-
Save devigned/d00d963211d02ee3fdf5f7a44f004117 to your computer and use it in GitHub Desktop.
Create Ubuntu VM with Azure CLI
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
az login | |
az group create -n level0 -l westus | |
az vm create -g level0 -n level0vm --admin-username deploy --image ubuntults | |
# Sample output | |
# { | |
# "fqdns": "", | |
# "id": "/subscriptions/00000000-0000-0000-0000-0000000000/resourceGroups/level0/providers/Microsoft.Compute/virtualMachines/level0vm", | |
# "location": "westus", | |
# "macAddress": "00-0D-3A-34-D6-EC", | |
# "powerState": "VM running", | |
# "privateIpAddress": "10.0.0.4", | |
# "publicIpAddress": "13.64.246.35", | |
# "resourceGroup": "level0" | |
# } | |
# open http port | |
az vm open-port -g level0 -n level0vm --port 80 | |
# Let's see what resources were created within our resource group | |
az resource list -g level0 -otable | |
# Sample output | |
# Name ResourceGroup Location Type Status | |
# ----------------- --------------- ---------- --------------------------------------- -------- | |
# osdisk_SFKmWrPEL4 LEVEL0 westus Microsoft.Compute/disks | |
# level0vm level0 westus Microsoft.Compute/virtualMachines | |
# level0vmVMNic level0 westus Microsoft.Network/networkInterfaces | |
# level0vmNSG level0 westus Microsoft.Network/networkSecurityGroups | |
# level0vmPublicIP level0 westus Microsoft.Network/publicIPAddresses | |
# level0vmVNET level0 westus Microsoft.Network/virtualNetworks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment