VM Resources
Virtual machines falls into Infrastructure as Service model and are a popular hosting solution. The client has full control over the operating system. A single virtual machine can only run one operating system. Azure offers options to manage and configure a large scale of identical virtual machines at the same time (scale set options) and to optimize the used of resources via load balancers. Azure can also give a protection against network and systems failures and can keep your resources available even during update process (availability sets).
Also, Azure allows you to deploy a virtual machine that has a virtual Desktop experience. This might be useful to deploy Azure Virtual Desktop for users that do not have any experience with command line interface or simply to use web applications with an integrated UI.
Azure CLI
Creation of a vm
The command below aim to create a virtual machine.
Azure extension
az vm extension
is to automate the process of updating configurations or adding extensions to an existing VM.
The command below aim to install nginx on an azure virtual machine. We specify a file URI which point to a script to install nginx. Then, we tell Azure to execute the script using --protected-settings
option.
List VM IP address
This command gives information about all our VM IP address.
It is possible to be more specific by adding the --query
parameter and to stock the output of a command into a variable. In the command below we ask specifically for the public IP address of the my-vm
VM.
Network Security Groups commands
List Network Security Groups
The command below will list the name properties of all Network Security group associated with the specified resource-group
List rules associated with a Network Security Group
To list the rules associated to a specific NSG. The --query
parameter allow us to be more specific and to query uniquely for the Priority, Port and Access. The --output
option allows to display the output in a table format.
Create a NSG Rule
The command below aim to create a rule for the NSG my-vmNSG
that will allow inbound connection on port 80 (HTTP).
Last updated