Chapter 5. Virtual Machine Storage

Storage Management

Microsoft Azure virtual machines are based on some of the same virtualization technologies in Windows Server Hyper-V. From a storage perspective, this means that the underlying disks and images are based on Microsoft Virtual Hard Disk (VHD) format. As you have seen in Chapter 3, virtual machine disks are stored in Microsoft Azure Storage, which itself is a highly scalable, durable, and available service. In this chapter we will dig deeper into how you can use PowerShell to manage these disks and configure storage for your virtual machines.

Uploading and Downloading VHDs

To start with, let’s explore how to upload and download VHD files with Microsoft Azure storage. As you have already seen, it is possible to create VHD files in the cloud without the need to create them locally and upload them. However, I feel that starting at this point makes some of the concepts later in the chapter easier to explain.

The Microsoft Azure PowerShell cmdlets provide two cmdlets for uploading and downloading VHD files to a storage account: Add-AzureVHD and Save-AzureVHD. Let’s explore each of these cmdlets using a simple walk-through.

Uploading a VHD

Using the Microsoft Azure PowerShell cmdlets over most generic storage tools has its advantages. In addition to easy scriptability, the cmdlets do not treat the VHD files as plain old blobs of data. Instead, the cmdlets have knowledge of the native VHD file format. This means that the cmdlets can optimize ...

Get Automating Microsoft Azure Infrastructure Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.