Skip to content

Commit 4d951a7

Browse files
authored
Merge pull request #52375 from MicrosoftDocs/UPDATE-add-and-size-disks-in-azure-virtual-machines
UPDATE: add-and-size-disks-in-azure-virtual-machines module
2 parents f843e6d + 7077053 commit 4d951a7

10 files changed

Lines changed: 548 additions & 540 deletions

learn-pr/azure/add-and-size-disks-in-azure-virtual-machines/3-exercise-add-data-disks-to-azure-virtual-machines.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ metadata:
99
ms.author: rogarana
1010
ms.topic: unit
1111
ms.custom: devx-track-azurecli, linux-related-content
12-
interactive: bash
13-
azureSandbox: true
12+
#interactive: bash
13+
#azureSandbox: true
1414
durationInMinutes: 10
1515
content: |
1616
[!include[](includes/3-exercise-add-data-disks-to-azure-virtual-machines.md)]

learn-pr/azure/add-and-size-disks-in-azure-virtual-machines/6-exercise-resize-disks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ metadata:
1010
ms.topic: unit
1111
ms.custom:
1212
- devx-track-azurecli
13-
interactive: bash
14-
azureSandbox: true
13+
#interactive: bash
14+
#azureSandbox: true
1515
durationInMinutes: 7
1616
content: |
1717
[!include[](includes/6-exercise-resize-disks.md)]
Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
1-
You're the system architect for a law firm. The firm asks you to migrate critical systems to Azure. Operations include the database of case histories, currently hosted by an on-premises SQL server and accessed from a desktop application. The SQL server also runs some custom in-house services to perform database maintenance. You decide that a solution based on Azure virtual machines (VMs) allows you to host your SQL server and continue using your custom services. You want to create an Azure virtual hard disk based on the contents of your existing on-premises server to ease migration.
2-
3-
In this module, you learn how to architect the optimal disk configuration for the VMs you create in Azure.
4-
5-
## Learning objectives
6-
7-
In this module, you'll:
8-
9-
- Create a virtual machine (VM).
10-
- Configure and attach virtual hard drives (VHDs) to an existing VM.
11-
- Determine whether you need premium disks.
12-
- Resize disks for a VM.
13-
14-
## Prerequisites
15-
16-
None
1+
You're the system architect for a law firm. The firm asks you to migrate critical systems to Azure. Operations include the database of case histories, currently hosted by an on-premises SQL server and accessed from a desktop application. The SQL server also runs some custom in-house services to perform database maintenance. You decide that a solution based on Azure virtual machines (VMs) allows you to host your SQL server and continue using your custom services. You want to create an Azure virtual hard disk based on the contents of your existing on-premises server to ease migration.
2+
3+
In this module, you learn how to architect the optimal disk configuration for the VMs you create in Azure.
4+
5+
## Learning objectives
6+
7+
In this module, you'll:
8+
9+
- Create a virtual machine (VM).
10+
- Configure and attach virtual hard drives (VHDs) to an existing VM.
11+
- Determine whether you need premium disks.
12+
- Resize disks for a VM.
Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,35 @@
1-
Just like any other computer, virtual machines in Azure use disks as storage for operating systems, applications, and data. These disks are called *managed disks*.
2-
3-
Suppose you create a virtual machine (VM) in Azure that hosts the database of case histories on which your law firm relies. A well-designed disk configuration is fundamental to good performance and resilience for SQL Server.
4-
5-
In this unit, you learn how to choose the right configuration values for your disks and how to attach those disks to a VM.
6-
7-
## How VMs use disks
8-
9-
There are three main disk roles in Azure: the data disk, the OS disk, and the temporary disk. These roles map to disks that are attached to your virtual machine.
10-
11-
- **OS Disk**: Every VM includes one disk that stores the operating system. This drive is registered as a SATA drive and labeled as the C: drive in Windows or mounted at "/" in Unix-like operating systems. This disk has a maximum capacity of 4,095 GiB; however, many operating systems are partitioned with [master boot record (MBR)](https://wikipedia.org/wiki/Master_boot_record) by default. MBR limits the usable size to 2 TiB. If you need more than 2 TiB, create and attach data disks and use them for data storage. If you need to store data on the OS disk and require the extra space, [convert it to GUID Partition Table](/windows-server/storage/disk-management/change-an-mbr-disk-into-a-gpt-disk) (GPT). To learn about the differences between MBR and GPT on Windows deployments, see [Windows and GPT FAQ](/windows-hardware/manufacture/desktop/windows-and-gpt-faq).
12-
- **Data storage**: A data disk is a managed disk attached to a virtual machine to store application data, or other data you need to persist across reboots. Some VM images include data disks by default. You can also add more data disks up to the maximum number specified by the VM's size. Each data disk is registered as a SCSI drive and has a max capacity of 32,767 GiB. You can choose drive letters or mount points for your data drives.
13-
- **Temporary storage**: Most VMs contain a temporary disk, which isn't a managed disk. The temporary disk provides short-term storage for applications and processes, and is intended to only store data such as page files, swap files, or SQL Server tempdb. Data on this drive can be lost during a maintenance event or redeployment. The drive is labeled as D: on a Windows VM by default. Don't use this drive to store important data that you don't want to lose.
14-
15-
## Attach data disks to VMs
16-
17-
You can add data disks to a virtual machine at any time by attaching them to the VM. Attaching a disk associates the disk with the VM.
18-
19-
A disk can't be deleted while attached to a VM. You must detach the disk from the VM before deleting it.
20-
21-
### Attach an existing data disk to an Azure VM
22-
23-
You might already have a VHD that stores the data you want to use in your Azure VM. In our law firm scenario, for example, perhaps you already converted your physical disks to VHDs locally. In this case, you can upload your VHD directly to a managed disk. Generally, you should upload a disk by using the PowerShell `Add-AzVhd` cmdlet. This cmdlet is optimized for transferring VHD files, and can complete the upload faster than other methods. The transfer is completed by using multiple threads for best performance. Once the VHD is uploaded, attach it to an existing VM as a data disk. This approach is an excellent way to deploy data of all types to Azure VMs. The data is automatically present in the VM, and there's no need to partition or format the new disk.
24-
25-
### Attach a new data disk to an Azure VM
26-
27-
You can use the Azure portal to add a new, empty data disk to a VM.
28-
29-
This process creates a **.vhd** file as a page blob in the storage account that you specify, and attaches that .vhd file as a data disk to the VM.
30-
31-
Before you can use the new VHD to store data, you have to initialize, partition, and format the new disk. We'll practice these steps in the next exercise.
32-
33-
In physical on-premises servers, you store data on physical hard disks. You store data in an Azure virtual machine (VM) on virtual hard disks (VHDs). These VHDs are stored as page blobs in Azure storage accounts. For example, when you migrate your law firm's database of case histories to Azure, you must create VHDs where the database files can be saved.
1+
Just like any other computer, virtual machines in Azure use disks as storage for operating systems, applications, and data. These disks are called *managed disks*.
2+
3+
Suppose you create a virtual machine (VM) in Azure that hosts the database of case histories on which your law firm relies. A well-designed disk configuration is fundamental to good performance and resilience for SQL Server.
4+
5+
In this unit, you learn how to choose the right configuration values for your disks and how to attach those disks to a VM.
6+
7+
## How VMs use disks
8+
9+
There are three main disk roles in Azure: the data disk, the OS disk, and the temporary disk. These roles map to disks that are attached to your virtual machine.
10+
11+
- **OS Disk**: Every VM includes one disk that stores the operating system. This drive is registered as a SATA drive and labeled as the C: drive in Windows or mounted at "/" in Unix-like operating systems. This disk has a maximum capacity of 4,095 GiB; however, many operating systems are partitioned with [master boot record (MBR)](https://wikipedia.org/wiki/Master_boot_record) by default. MBR limits the usable size to 2 TiB. If you need more than 2 TiB, create and attach data disks and use them for data storage. If you need to store data on the OS disk and require the extra space, [convert it to GUID Partition Table](/windows-server/storage/disk-management/change-an-mbr-disk-into-a-gpt-disk) (GPT). To learn about the differences between MBR and GPT on Windows deployments, see [Windows and GPT FAQ](/windows-hardware/manufacture/desktop/windows-and-gpt-faq).
12+
- **Data disk**: A data disk is a managed disk attached to a virtual machine to store application data, or other data you need to persist across reboots. Some VM images include data disks by default. You can also add more data disks up to the maximum number specified by the VM's size. Each data disk is registered as a SCSI drive and has a max capacity of 32,767 GiB. You can choose drive letters or mount points for your data disks.
13+
14+
- **Temporary disk**: Most VMs contain a temporary disk, which isn't a managed disk. The temporary disk provides short-term storage for applications and processes, and is intended to only store data such as page files, swap files, or SQL Server tempdb. Data on this disk can be lost during a maintenance event or redeployment. The drive is labeled as D: on a Windows VM by default. Don't use this disk to store important data that you don't want to lose.
15+
16+
17+
## Attach data disks to VMs
18+
19+
You can add data disks to a virtual machine at any time by attaching them to the VM. Attaching a disk associates the disk with the VM.
20+
21+
A disk can't be deleted while attached to a VM. You must detach the disk from the VM before deleting it.
22+
23+
### Attach an existing data disk to an Azure VM
24+
25+
You might already have a VHD that stores the data you want to use in your Azure VM. In our law firm scenario, for example, perhaps you already converted your physical disks to VHDs locally. In this case, you can upload your VHD directly to a managed disk. Generally, you should upload a disk by using the PowerShell `Add-AzVhd` cmdlet. This cmdlet is optimized for transferring VHD files, and can complete the upload faster than other methods. The transfer is completed by using multiple threads for best performance. Once the VHD is uploaded, attach it to an existing VM as a data disk. This approach is an excellent way to deploy data of all types to Azure VMs. The data is automatically present in the VM, and there's no need to partition or format the new disk.
26+
27+
### Attach a new data disk to an Azure VM
28+
29+
You can use the Azure portal to add a new, empty data disk to a VM.
30+
31+
This process creates a **.vhd** file as a page blob in the storage account that you specify, and attaches that .vhd file as a data disk to the VM.
32+
33+
Before you can use the new VHD to store data, you have to initialize, partition, and format the new disk. We'll practice these steps in the next exercise.
34+
35+
In physical on-premises servers, you store data on physical hard disks. You store data in an Azure virtual machine (VM) on virtual hard disks (VHDs). These VHDs are stored as page blobs in Azure storage accounts. For example, when you migrate your law firm's database of case histories to Azure, you must create VHDs where the database files can be saved.

0 commit comments

Comments
 (0)