- 다운로드하여 설치하기
https://docs.microsoft.com/ko-kr/cli/azure/install-azure-cli-windows?tabs=azure-cli - Azure Login
az login - 사용할 수 있는 구독 정보 보기
az account list -o table
az account list -o yaml - 기본 구독 설정하기 (##옵션)
az account set –subscription ‘my-subscription-name’ - 이용 가능한 Region 확인하기
az account list-locations -o table - 새롭게 Resource Group 생성하기
az group list -o table
az group create –location eastus –name testRG - VNet 생성하기
az network vnet list -o table
az network vnet create -n testVNet -g testRG - 사용가능한 VM 종류 확인하기
az vm image list -o table
az vm image list –offer CentOS –all -o table
az vm image list –offer Ubuntu –all -o table
az vm image list –offer Win2022Datacenter –all -o table - 사용가능한 VM size 확인하기
az vm list-sizes -l eastus -o table - Linux VM 생성하기
az vm list -o table
az vm create -g testRG -n myubuntu –image UbuntuLTS -l eastus –vnet-name testVNet –admin-username adminuser –admin-password P@ssw0rd1234 –size Standard_DS2_v2 –no-wait - 현재 실행중인 VM size 확인하기
az vm show -g testRG -n myubuntu -o yaml
az vm show -g testRG -n myubuntu –query hardwareProfile.vmSize
az vm create -g testRG -n mycentos –image CentOS -l eastus –vnet-name testVNet –admin-username adminuser –admin-password P@ssw0rd1234 –size Standard_DS2_v2 –no-wait
az vm create -g testRG -n mycentos2 –image CentOS -l eastus –generate-ssh-keys
- 실행중인 VM의 Public IP 확인하기
az vm list-ip-addresses -g testRG -n myubuntu -o table - VM에 접속하기
ssh adminuser@20.127.7.236 - VM 멈추고 시작하기
az vm list -o table
az vm show -n myubuntu -g testRG -d
az vm stop -g testRG -n myubuntu
az vm start -g testRG -n myubuntu
- Resource Group 삭제하기
az group delete -n testRG –no-wait