使用 Azure 门户将托管数据磁盘附加到 Windows VMAttach a managed data disk to a Windows VM by using the Azure portal

本文介绍如何使用 Azure 门户将新的托管数据磁盘附加到 Windows 虚拟机 (VM)。This article shows you how to attach a new managed data disk to a Windows virtual machine (VM) by using the Azure portal. VM 的大小决定了可以附加的数据磁盘数量。The size of the VM determines how many data disks you can attach. 有关详细信息,请参阅虚拟机的大小For more information, see Sizes for virtual machines.

添加数据磁盘Add a data disk

  1. 转到 Azure 门户以添加数据磁盘。Go to the Azure portal to add a data disk. 搜索并选择“虚拟机”。 Search for and select Virtual machines.
  2. 从列表中选择虚拟机。Select a virtual machine from the list.
  3. 在“虚拟机”页上选择“磁盘” 。On the Virtual machine page, select Disks.
  4. 在“磁盘”页上选择“添加数据磁盘” 。On the Disks page, select Add data disk.
  5. 在新磁盘的下拉列表中,选择“创建磁盘”。 In the drop-down for the new disk, select Create disk.
  6. 在“创建托管磁盘”页中,键入磁盘名称,并根据需要调整其他设置。 In the Create managed disk page, type in a name for the disk and adjust the other settings as necessary. 完成操作后,选择“创建” 。When you're done, select Create.
  7. 在“磁盘”页中,选择“保存”,以保存 VM 的新磁盘配置 。In the Disks page, select Save to save the new disk configuration for the VM.
  8. 在 Azure 创建磁盘并将磁盘附加到虚拟机之后,新磁盘将出现在“数据磁盘”下的虚拟机磁盘设置中。 After Azure creates the disk and attaches it to the virtual machine, the new disk is listed in the virtual machine's disk settings under Data disks.

初始化新的数据磁盘Initialize a new data disk

  1. 连接到 VM。Connect to the VM.
  2. 在正在运行的 VM 中选择 Windows“开始”菜单,然后在搜索框中输入 diskmgmt.mscSelect the Windows Start menu inside the running VM and enter diskmgmt.msc in the search box. 此时会打开“磁盘管理”控制台 。The Disk Management console opens.
  3. “磁盘管理”识别出新的未初始化磁盘,并显示“初始化磁盘”窗口 。Disk Management recognizes that you have a new, uninitialized disk and the Initialize Disk window appears.
  4. 请确保选择新磁盘,然后选择“确定”对其进行初始化 。Verify the new disk is selected and then select OK to initialize it.
  5. 新的磁盘显示为“未分配” 。The new disk appears as unallocated. 右键单击磁盘上任意位置,选择“新建简单卷”。 Right-click anywhere on the disk and select New simple volume. 此时会打开“新建简单卷向导”窗口 。The New Simple Volume Wizard window opens.
  6. 完成向导中的每一步,保留所有默认值,完成后,选择“完成” 。Proceed through the wizard, keeping all of the defaults, and when you're done select Finish.
  7. 关闭“磁盘管理” 。Close Disk Management.
  8. 此时出现一个弹出窗口,通知你需要先格式化新磁盘才能使用新磁盘。A pop-up window appears notifying you that you need to format the new disk before you can use it. 选择“格式化磁盘” 。Select Format disk.
  9. 在“格式化新磁盘”窗口中,检查设置,然后选择“启动” 。In the Format new disk window, check the settings, and then select Start.
  10. 此时出现一条警告,通知你格式化磁盘会擦除所有数据。A warning appears notifying you that formatting the disks erases all of the data. 选择“确定” 。Select OK.
  11. 完成格式化后,选择“确定” 。When the formatting is complete, select OK.

后续步骤Next steps