Implement IaaS solutions, provision vms Flashcards
How to create VM in Portal?
Search for “Virtual Machines” in global search. Click Add in Top Menu
What is meant by Image Size
Select a VM size to support the workload that you want to run. The size that you choose then determines factors such as processing power, memory, and storage capacity. Azure offers a wide variety of sizes to support many types of uses. Azure charges an hourly price based on the VM’s size and operating system.
How are VMs charged
Amount is based on Size, Charged Hourly
What is Azure Spot Instance
Using Spot VMs allows you to take advantage of our unused capacity at a significant cost savings. At any point in time when Azure needs the capacity back, the Azure infrastructure will evict Spot VMs. Therefore, Spot VMs are great for workloads that can handle interruptions like batch processing jobs, dev/test environments, large compute workloads, and more.
What are Inbound port rules
These configuration allows access to VM from public internet.
Security recommendation for VM inbound ports?
Deny all and change source port for required ports, e. g. switch 22 for ssh to something else.
What is Azure Hybrid Benefit
With Azure Hybrid Benefit its possible to save money on new Windows VMs when using existing licenses, up to 49%
What is Port 3389 usually used for
RDP
What is usually the RDP port when unchanged
3389
How to connect to VM via RDP
Via RDP, its possible to download a RDP Client configuration with “Connect” button in Portal. Then use localhost\ and to login
Powershell to Create VM?
New-AzVm `
- ResourceGroupName "myResourceGroup" ` - Name "myVM" ` - Location "East US" ` - VirtualNetworkName "myVnet" ` - SubnetName "mySubnet" ` - SecurityGroupName "myNetworkSecurityGroup" ` - PublicIpAddressName "myPublicIpAddress" ` - OpenPorts 80,3389
How to Create a ResourceGroup with Powershell
New-AzResourceGroup -Name something -Location EastUS
Get public Ip from VM
Get-AzPublicIpAddress -ResourceGroupName “myResourceGroup” | Select “IpAddress”
How to launch the Cloud Shell
Top right corner of portal
Common steps required to conect to a new vm
Create a new Rg if not present, create a new vm and assign it to the desired rg, open the rdp port, get the public ip addres and connect with rdp client
What are marketplace images
Marketplace contains images that can be used to create new vms
How does every powershell command start to interact with vm images
Get-AzVM (ImagePublisher, ImageOffer, ImageSku)
-AzVm
can be Get or New
What parameter can be used to perform a VM creation as Background Task
Add -AsJob to create command
How to retrieve information from a powershell command that is running in background
Get-Job
How to List VM sizes that are available options in one Location via Powershell
Get-AzVmSize -Location “EastUS”. All isted can be used in that region option during create.
How to get VM Size from existing VM/resource
Get-AzVmSize -ResourceGroupName “Rg” -Name “Vm”
So again unique identifier required the command
General Concept of Updating a VM via Powershell?
Store vm object into variable using Get-AzVM, then change its propierties using the variable. When done, use Update-AzVM
Is it possible to Update a VM via Powershell while it is running?
Yes, its possible (E.g. Size is possible). But still silent reboot is done. When a size Option is not availble in the cluster, a relocation will happen. For some changes it is required to stop the vm (Stop-AzVM), do the update (Update-AzVM) and when done, start it again (Start-AzVM)
What are the VM power states
Starting, Running, Stopping, Stopped, Deallocating, Deallocated (Removed from Hypervisor, not charged) AND “-“ for unknown
Ways to administer resources/VMs
Resource Manager, PowerShell, Azure CLI, Azure REST API, Azure Client SDK, Azure VM Extensions
, Azure Automation Services
What are resource manager templates
JSON Files that define the resources for a VM. CLI, PS, and Rest API can be used to automate processing
What is Azure Client SDK
Azure SDK to integrate azure administration in various programming languages. For example c# nuget packagel Also for Java and other
Suppose you want to run a network appliance on a virtual machine. Which workload option should you choose?
- General purpose
- Compute optimized
- Memory optimized
- Storage optimized
Compute optimized virtual machines are designed to have a high CPU-to-memory ratio. Suitable for medium traffic web servers, network appliances, batch processes, and application servers.
True or false: Resource Manager templates are JSON files?
True
True or false: for security reasons, you must use an image from the official Azure Marketplace when creating a new virtual machine.
False, Azure lets you configure your virtual machines to meet your needs. This includes support for using your own VM images.
What is the effect of the default network security settings for a new virtual machine?
- Neither outbound nor inbound requests are allowed.
- Outbound request are allowed. Inbound traffic is only allowed from within the virtual network.
- There are no restrictions: all outbound and inbound requests are allowed.
Outbound requests are considered low risk, so they are allowed by default. Inbound traffic from within the virtual network is allowed. By placing a VM in a virtual network, the VM owner is implicitly opting-in to communication among the resources in the virtual network.
Suppose you have several Linux virtual machines hosted in Azure. You will administer these VMs remotely over SSH from three dedicated machines in your corporate headquarters. Which of the following authentication methods would typically be considered best-practice for this situation?
- Username and password
- Private key
- Private key with passphrase
Private key with passphrase
When creating a Windows virtual machine in Azure, which port would you open using the INBOUND PORT RULES in order to allow remote-desktop access?
HTTPS
SSH (22)
RDP (3389)
RDP (3389)
Suppose you have an application running on a Windows virtual machine in Azure. What is the best-practice guidance on where the app should store data files?
The OS disk (C:)
The Temporary disk (D:)
An attached data disk
An attached data disk, Dedicated data disks are generally considered the best place to store application data files. They can be larger than OS disks and you can optimize them for the cost and performance characteristics appropriate for your data.
What is the final rule that is applied in every Network Security Group?
Allow All
Deny All
You configure the final rule to your needs
Deny All
Accelerated networking benefits
With accelerated networking, network traffic arrives at the virtual machine’s network interface (NIC), and is then forwarded to the VM.
Lower Latency / Higher packets per second (pps)
Reduced jitter
Decreased CPU utilization