Azure PowerShell Quick Start Guide
eBook - ePub

Azure PowerShell Quick Start Guide

Deploy and manage Azure virtual machines with ease

Thomas Mitchell

Share book
  1. 118 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Azure PowerShell Quick Start Guide

Deploy and manage Azure virtual machines with ease

Thomas Mitchell

Book details
Book preview
Table of contents
Citations

About This Book

Leverage PowerShell to perform many day-to-day tasks in Microsoft Azure

Key Features

  • Deploy and manage Azure virtual machines with PowerShell commands.
  • Get to grips with core concept of Azure PowerShell such as working with images and disks, custom script extension, high availability and more.
  • Leverage hands-on projects to successfully apply what you learned through the course of this book.

Book Description

As an IT professional, it is important to keep up with cloud technologies and learn to manage those technologies. PowerShell is a critical tool that must be learned in order to effectively and more easily manage many Azure resources. This book is designed to teach you to leverage PowerShell to enable you to perform many day-to-day tasks in Microsoft Azure.

Taking you through the basic tasks of installing Azure PowerShell and connecting to Azure, you will learn to properly connect to an Azure tenant with PowerShell. Next, you will dive into tasks such as deploying virtual machines with PowerShell, resizing them, and managing their power states with PowerShell.

Then, you will learn how to complete more complex Azure tasks with PowerShell, such as deploying virtual machines from custom images, creating images from existing virtual machines, and creating and managing of data disks. Later, you will learn how to snapshot virtual machines, how to encrypt virtual machines, and how to leverage load balancers to ensure high availability with PowerShell.

By the end of this book, you will have developed dozens of PowerShell skills that are invaluable in the deployment and management of Azure virtual machines.

What you will learn

  • Manage virtual machines with PowerShell
  • Resize a virtual machine with PowerShell
  • Create OS disk snapshots via PowerShell
  • Deploy new virtual machines from snapshots via PowerShell
  • Provision and attach data disks to a virtual machine via PowerShell
  • Load balance virtual machines with PowerShell
  • Manage virtual machines with custom script extensions

Who this book is for

This book is intended for IT professionals who are responsible for managing Azure virtual machines. No prior PowerShell or Azure experience is needed.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Azure PowerShell Quick Start Guide an online PDF/ePUB?
Yes, you can access Azure PowerShell Quick Start Guide by Thomas Mitchell in PDF and/or ePUB format, as well as other popular books in Computer Science & Cloud Computing. We have over one million books available in our catalogue for you to explore.

Information

Year
2018
ISBN
9781789619485
Edition
1

Working with Disks

Welcome to Working with Disks! In the course of your day-to-day operations, you'll often find that you need to perform tasks such as snapshotting or encryption. In this chapter, we will cover the following topics:
  • Azure data disks
  • Snapshotting an Azure virtual machine
  • Creating
  • VMs from Snapshots
  • Encrypting virtual machine disks
This chapter also includes hands-on exercises that allow you to practice your skills with data disks, snapshots, and encryption.
When all is said and done, you'll know how to create and attach data disks, snapshot them, encrypt them, and even deploy new VMs from them.

Using Azure data disks

Azure virtual machines use disks to store the operating systems, applications, and data. Choosing an appropriate disk size and configuration is crucial when creating a virtual machine. You want to make sure that you size and configure your disks to match whatever workload the server will be handling. The following exercises cover deploying virtual machine data disks and managing them.
The next few exercises will teach you about:
  • The difference between OS disks and temporary disks
  • What Data Disks are
  • The difference between standard disks and premium disks
  • Disk performance
  • How to create data disks
  • How to attach a data disk to a virtual machine
  • How to prepare a data disk for use
When you finish these exercises, you will have a solid understanding of the different types of Azure disks, how to create them via PowerShell, and how to manage them via PowerShell.

Default Azure disks

When an Azure virtual machine is created, two disks are automatically attached to the virtual machine. They include the operating system disk and a temporary disk.

Operating system disk

Operating system disks, which host the virtual machine's OS, can be up to 4 terabytes. The OS disk is assigned a drive letter of C: by default, and its disk-caching configuration is optimized for OS performance. It is not recommended to use the OS disk to host data or applications. Instead, for applications and data, use a data disk, which is detailed later in this article.

Temporary disk

Temporary disks use a solid-state drive that is located on the same Azure host as the virtual machine. This temporary storage is typically used to save the system paging file, but can be used to store other data that you can afford to lose. There is no extra storage associated with this temporary storage.
Temporary disks are high performance, and can be used for operations such as temporary data processing. However, if the virtual machine is moved to a new host, then the data stored on the temporary disk will be removed. The size of a temporary disk is generally determined by the virtual machine size, and they are typically assigned a drive letter of D: by default.

Temporary disk sizes

The sizes of temporary disks, as of the time of writing, are summarized here:
  • General purpose:
    • A, B, and D Series VM
    • 1,600 MB
  • Compute-optimized:
    • F Series VM
    • 576 MB
  • Memory-optimized:
    • D, E, G, and M Series VM
    • 6,144 MB
  • Storage-optimized:
    • L Series VM
    • 5,630 MB
  • GPU:
    • N Series VM
    • 1,440 MB
  • High-performance:
    • A and H Series VM
    • 2,000 MB

Azure data disks

Data disks are recommended when durable and responsive data storage is required. Each data disk has a maximum size of 4 TB. However, multiple data disks can be attached to a virtual machine. When installing applications and storing data, data disks should be used.
The size of the virtual machine determines how many data disks can be attached to it. The number of virtual CPUs is typically what drives this.

Maximum data disks per VM

Although the absolute maximum number of data disks that can be attached to a virtual machine is 64, the type and size of a virtual machine dictates the maximum number of data disks that can be attached, as summarized here:
  • General-purpose:
    • A, B, and D series VM
    • 2-64 data disks
  • Compute-optimized:
    • F series VM
    • 4-64 data disks
  • Memory-optimized:
    • D, E, G, and M Series VM
    • 4-64 data disks
  • Storage-optimized:
    • L series VM
    • 16-64 data disks
  • GPU:
    • N series VM
    • 12-64 data disks
  • High-performance:
    • A and H series VM
    • 32-64 data disks

VM disk types

Azure provides two types of disk; these include standard disks and premium disks. Standard disks are typically lower-performance and are used for general-purpose storage. Premium disks are higher-performance, and are used when higher IO is required.

Standard disk

Standard storage is backed by magnetic HDD technology and delivers cost-effective storage while still providing decent performance. Standard disks are ideal for cost-effective development environments.

Premium disk

Premium disks are backed by solid-state (SSD) technology. Low-latency disks, such as SSD, offer high-performance storage. Premium disks are a good choice for production-virtual machines and VMs that require high IO. Premium storage supports DS series, DSv2 series, GS series, and FS series virtual machines, and comes in five types: P10, P20, P30, P40, and P50.

Premium disk performance

The size of the disk determines the disk type. When you provision a premium disk, the size is rounded up to ...

Table of contents