Virtual machine components Flashcards

1
Q

What are the VM components?

A

deployed in a resource group
VM size
Network
Images- used to deploy
storage - virtual disk

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to create a VM?

A

Azure portal- can be used to create VMs
In code -Azure CLI, Azure Powershell, Azure ARM templates

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Creating an Azure portal(elements)

A

Instance details - name, region
availability options - availability sets and availability zones
VM image- i.e. windows server image
size-
administrator account - username and password or SSH public key for Linux
Inbound port rules- public IP address- permit network access in the VM. open RDP to allow RDP access

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Creating VM using code(reasons)

A

adds consistency to your deployment and VM creation
any production sys should be created using automation
construct similar down levels such as tests

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

creating VM using code

A

create resource group
create VM
ensure remote access port is open depend on remote access method
retrieve public ip address to access VM remotely

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Creating a VM with Azure CLI

A

Create a resource group =>
az group create \
–name “psdemo-rg” \
–location “centralus”
Create VM =>
az vm create \
–resource-group “psdemo-rg” \
–name “psdemo-win-cli” \
–image “win2019datacenter” \
–admin-username “demoadmin” \
–admin-password “password123$%^&*”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

enabling remote access with Azure CLI

A

az vm open-port \
–resource-group “psdemo-rg” \
–name “psdemo-win-cli” \
–port “3389”

For linux the port will be 22

Retrieve public ip address
az vm list-ip-addresses \
–resource-group “psdemo-rg” \
–name “psdemo-linux-cli”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Creating a VM with Azure PowerShell

A

create ps creadential to store username and password
$username = ‘demoadmin’
$password=’ConvertTo-SecureString ‘password123$%^&*’ -AsPlainText -Force
$WindowsCred = New-Object System.Management.Automation.PSCredential ($username, $password)

Create VM
New-AzVM `
-ResourceGroupName ‘rehema’ `
-Name ‘psdemo-win-az’ `
-Image ‘Win2019Datacenter’ `
-Credential $WindowsCred `
-OpenPorts 3389

Get public IP address
Get-AzPublicIpAddress `
-ResourceGroupName ‘rehema’ `
-Name ‘psdemo-win-az’ | Select-Object IpAddress

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

ARM Templates

A

JSON file that defines your resources
building block for deployment automation
templates are submitted to ARM for provisioning
export an ARM template in Azure portal or write your own
deploy from the quickstart template library

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Deploying ARM Templates

A

Azure portal
Azure CLI
Powershell(AZ Module)
REST API
Azure cloud shell

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

ARM Template format

A

{
“$schema”: location of the json schema file,
“$contentVersion”:””,
“$apiprofile”
“$parameters”
“$variables”
“$functions”
“$resources”
“$outputs”:{}
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly