- IaaS (infrastructure As A Service)
- Why do you need Azure VMs
- All underlying infrastructure is managed by MS
- VMs managed by you
- Creating Azure VM
- Azure Management Portal
- Azure Portal
- Windows PowerShell
- Cross-Platform CLI
- Visual Studio
- Construct of a VM
- Cloud Service (Domain name)- Container for a VM(s)
Note: Domain
name here refers to Cloud Service and not the AD
- Storage- where the OS/Data VHD of the VM is stored
- Image-The OS/Underlying image of the VM
- Networking
- OS Related configuration
- VM Storage
- Storage Account
- Storage Endpoints
- Storage Containers
- Storage URL -Media Locations
- Some facts about Azure Storage
- Windows - OS Disk - C: - Max Size is 1 TB-Dynamic disk
- Linux - OS Disk /dev/sda1 -Partition of root directory
- Data Disk each max upto 1 TB
- All VMs have physical temporary disk i.e D Drive
- Disk IOPS - Max 500 IOPS. To increase the IOPS consider stripping the disk of using storage spaces
- By default, Azure VM gets created with a default storage account. In this configuration, each machine gets created in an individual storage account. In this it created the random storage account. However in production we have to create storage account with the designated process
- Concept-Physical Temporary disk
- Login to one of the Azure VM
- Each Azure VM will have a D:\ Drive i.e. Temporary storage
- Inside the D Drive there will be a text file
- This is a free drive and a physical disk on the server
- This should be used only for temp storage
- As soon as the VM restarts the data will gets deleted
- THIS IS NOT A DATA DRIVE
- Azure VM Tier and Sizes
- Basic Tier
- Standard Tier
- Difference in the Tier
- Load Balancing is available in standard
- HA is available in Standard
- Auto Scale is there in standard
Note: This tier information is shown/available when we try to create
the VM from the portal
- OS Sizes
- These are the pre-built sizes for the VM
- These are available in form of SKU series. For example A, D, G, F, H, N, L
- Useful Powershell Commandlet
- Get-AzureRoleSize
- (Get-AzureRoleSize).InstanceSize. Note: Basic Tier sizes will show with Basic Prefix.
- Get-AzureRoleSize -InstanceSize ExtraSmall
- Visit following link for more detailed information on Azure VM and Cloud service sizes https://docs.microsoft.com/en-us/azure/cloud-services/cloud-services-sizes-specs
- Azure VM Images
- There are following 2 type of images
- Azure Provided
- Custom Images
- Trial Subscription doesn’t shows Images for Client OS. However MSDN subscription does
- In Azure, for custom image you cant clone the image. You have to capture the image to create a custom image
- Get-AzureVMImage shows the complete list of images
- These are not just OS Images. Azure provides images for example SQL, Sharepoint, Visual studio, Firewall etc.
- Get-AzureVMImage | Select Imagefamily -unique
- Concept of Version Released Date.
- Azure VM Advanced features
- Load balanced sets
- Availability Sets
- Scalability. Note: Azure Takes approx. about an hour for Scale In and Scale Out.
- Following 2 PowerShell commands can be used for connecting/ Saving RDP on the Azure VM
- Get-azureremotedesktopfile -servicename <CS name> -name <VM name> -launch
- Get-azureremotedesktopfile -servicename <CS name> -name <VM name> -localpath "c:\temp"
- Following steps on how to access Azure VM using PowerShell Endpoint
- Launch Chrome
- Go to the Azure portal
- Copy the Respective machine's DNS Name
- Put the DNS name in Chrome with : <Port Number>
- Download/copy the certificate locally on the machine
- Right Click on Certificate and Click on install on the local machine
- Put this certificate in Trusted Root Certificate
- Run following command
- Enter-PSSession -ComputerName "VM Name" -port <Port Number> -Credential <UserName> -UseSSL
- This will prompt for Password
- Type in the password.
- Ways to create VM
- Quick Create
- Create VM from Gallery (Gives more control)
- Azure VHD Storage
- Attach a data disk to an existing VM
- Create a new VM from an existing OS Disk
- Certain facts about VM
- Every Azure VM is associated with a Cloud Service
- Every Azure VM is associated with respective Storage Account
- Go under Storage Account > Click Containers Tab > Click VHD folder
- There will be 2 files one if the .VHD and .status file
- .VHD is the actual Virtual Machine.
- If we create another VM in the same Storage Account then respective .VHD and .status file will be shown under the same VHD folder
- By default RDP and PowerShell endpoints get created during VM creation
- VM Agent also gets deployed while creating the Virtual Machines. VM Agent is responsible for managing the extensions which got installed on the Virtual Machine(s)
- From the VM > Configure tab we can change the VM size
- By default: VM just have OS disk and a temporary disk.
- Can we change disk label for D Drive i.e. a temporary Drive? Answer is Yes
Azure VM Data Disks
- There are 2 type of VHDs in Azure
- Disks- OS and Data Disks. Both OS and Data disks can be upto 1 TB
- Images - A disk from which many VMs can be provisioned
- VHDs can be uploaded from On-Prem to Azure. Both OS and Data VHDs can be uploaded
- Important Points-Azure VM Data disks
- Max size for OS and Data VHDs - 1 TB
- VHDX are not supported
- Only support fixed size disk (Dynamic gets converted to fixed during upload, but during the download)
- VM Size determines the MAX number of data disk that can be attached
- Demo
- Create/Attach new data disk from Management Portal and Powershell
- Associate Newly created Data disk to a VM
- Create a local Data VHD
- Upload a Data VHD from On-Prem to Azure
- Register/Associate/Create uploaded VHD as an Azure Disk
- Attached Azure Disk with VM from Management Portal and PowerShell
- When we go under Virtual Machine properties > Disk tab. Disk Name is not necessarily to be same as the corresponding VHD file name in Storage account. Get-AzureDisk Commandlet can be used to see the disk Name and its respective association with the VM
No comments:
Post a Comment