Como criar uma máquina virtual no Azure?

Criação rápida

Criação da galeria

Linha de comando

C:\Program Files\ConEmu>azure vm image list  
info: Executing command vm image list
+ Fetching VM images
data: Name Category OS
data: ------------------------------------------------------------------------------------------------------------------ -------- -------
data: 03f55de797f546a1b29d1b8d66be687a__Visual-Studio-2013-Premium-12.0.21005.1-Update1-AzureSDK-2.2 MSDN Windows
data: 03f55de797f546a1b29d1b8d66be687a__Visual-Studio-2013-Professional-12.0.21005.1-Update1-AzureSDK-2.2 MSDN Windows
data: 03f55de797f546a1b29d1b8d66be687a__Visual-Studio-2013-Ultimate-12.0.21005.1-Update1-AzureSDK-2.2 MSDN Windows
data: 0b11de9248dd4d87b18621318e037d37__RightImage-CentOS-6.2-x64-v5.8.8.1 Public Linux
data: 0b11de9248dd4d87b18621318e037d37__RightImage-Ubuntu-12.04-x64-v5.8.8.8 Public Linux
data: 0c0083a6d9a24f2d91800e52cad83950__JDK-1.7.0_51-0114-Win Public Windows
data: 0c0083a6d9a24f2d91800e52cad83950__Oracle-Database-11.2.0.4.0-EE-0114-Win Public Windows
data: 0c0083a6d9a24f2d91800e52cad83950__Oracle-Database-11.2.0.4.0-EE-WebLogic-10.3.6-EE-JDK-1.7.0_51-0114-Win Public Windows
data: 0c0083a6d9a24f2d91800e52cad83950__WebLogic-12.1.2.0-EE-JDK-1.7.0_51-0114-Win Public Windows
data: 2cdc6229df6344129ee553dd3499f0d3__BizTalk-Server-2013-Enterprise Public Windows
data: 3a50f22b388a4ff7ab41029918570fa6__Windows-Server-2012-Essentials-20131018-enus Public Windows
data: 5112500ae3b842c8b9c604889f8753c3__OpenLogic-CentOS-65-20140121 Public Linux
data: a699494373c04fc0bc8f2bb1389d6106__Win2K8R2SP1-Datacenter-201401.01-en.us-127GB.vhd Public Windows
data: a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-Datacenter-201401.01-en.us-127GB.vhd Public Windows
data: a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201401.01-en.us-127GB.vhd Public Windows
data: b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-12_04_2-LTS-amd64-server-20121218-en-us-30GB Public Linux
data: c290a6b031d841e09f2da759bbabe71f__Oracle-Database-121010.v1-EE-Lnx Public Linux
data: c290a6b031d841e09f2da759bbabe71f__Oracle-Linux-6 Public Linux
data: c290a6b031d841e09f2da759bbabe71f__WebLogic-Server-12c.v1-Lnx Public Linux
data: c6e0f177abd8496e934234bd27f46c5d__SharePoint-2013-Trial-1-7-2014 Public Windows
data: fb83b3509582419d99629ce476bcb5c8__Microsoft-SQL-Server-2012SP1-Web-CY13SU04-SQL11-SP1-CU3-11.0.3350.0 Public Windows
data: fb83b3509582419d99629ce476bcb5c8__SQL-Server-2012SP1-CU5-11.0.3373.0-Web-ENU-Win2K8R2-CY13SU12 Public Windows
data: fb83b3509582419d99629ce476bcb5c8__SQL-Server-2014CTP2-CU1-12.0.1736.0-Evaluation-ENU-WS2012R2-CY13SU12 Public Windows
C:\Program Files\ConEmu>azure vm create --help  
help: Create a VM
help:
help: Usage: vm create [options] <dns-name> <image> <user-name> [password]
help:
help: Options:
help: -h, --help output usage information
help: -v, --verbose use verbose output
help: --json use json output
help: -o, --community the <image> is a community image
help: -c, --connect connect to existing VMs
help: -l, --location <name> the location
help: -a, --affinity-group <name> the affinity group
help: -u, --blob-url <url> the blob url for OS disk
help: -z, --vm-size <size> the virtual machine size [small]
help: extrasmall, small, medium, large, extralarge, a5, a6, a7
help: -n, --vm-name <name> the virtual machine name
help: -e, --ssh [port] the ssh port to enable [22]
help: -t, --ssh-cert <pem-file|fingerprint> the SSH certificate
help: -P, --no-ssh-password indicates that the password should be removed when using --ssh-cert
help: -r, --rdp [port] indicates that RDP should be enabled [3389]
help: -w, --virtual-network-name <name> the virtual network name
help: -b, --subnet-names <list> the comma-delimited subnet names
help: -A, --availability-set <name> the name of availability set to create or use
help: -s, --subscription <id> the subscription id
help: -d, --custom-data <custom-data-file> CustomData file
C:\Program Files\ConEmu>azure vm create minha-vm3 a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201401.01-en.us-127GB.vhd usuario Senha@123 --location "East US" --vm-size "small"  
info: Executing command vm create
+ Looking up image a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201401.01-en.us-127GB.vhd
+ Looking up cloud service
+ Creating cloud service
+ Retrieving storage accounts
+ Creating VM
info: vm create command OK
C:\Program Files\ConEmu>azure vm show minha-vm3  
info: Executing command vm show
+ Getting virtual machines
data: DNSName "minha-vm3.cloudapp.net"
data: Location "East US"
data: VMName "minha-vm3"
data: IPAddress "10.175.224.87"
data: InstanceStatus "Provisioning"
data: InstanceSize "Small"
data: InstanceStateDetails "Windows is preparing your computer for first use..."
data: OSVersion ""
data: Image "a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201401.01-en.us-127GB.vhd"
data: OSDisk HostCaching "ReadWrite"
data: OSDisk DiskName "minha-vm3-minha-vm3-0-201402210036520907"
data: OSDisk MediaLink "http://coingambler.blob.core.windows.net/vhd-store/minha-vm3-28181a0b73dae647.vhd"
data: OSDisk SourceImageName "a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201401.01-en.us-127GB.vhd"
data: OSDisk OS "Windows"
data: DataDisks ""
info: vm show command OK
C:\Program Files\ConEmu>azure vm endpoint create minha-vm3 80 80 -n "HTTP"  
info: Executing command vm endpoint create
+ Getting virtual machines
+ Reading network configuration
+ Updating network configuration
info: vm endpoint create command OK

--

--

Luís Rudge é pai e desenvolvedor há anos. Trabalha na Round Pegs Inc & seu projeto pessoal http://www.uniclearning.com.br/ — hospedado inteiramente no Azure

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store