无本地临时磁盘的 Azure VM 规格Azure VM sizes with no local temporary disk

本文提供有关没有本地临时磁盘(即无本地临时磁盘)的 Azure VM 大小的常见问题解答 (FAQ)。This article provides answers to frequently asked questions (FAQ) about Azure VM sizes that do not have a local temporary disk (i.e. no local temp disk). 有关这些 VM 规格的详细信息,请参阅 Dv4 和 Dsv4 系列规范(常规用途工作负载)Ev4 和 Esv4 系列规范(内存优化工作负载)For more information on these VM sizes, see Specifications for Dv4 and Dsv4-series (General Purpose Workloads) or Specifications for Ev4 and Esv4-series (Memory Optimized Workloads).

无本地临时磁盘是什么意思?What does no local temp disk mean?

通常,我们的 VM 规格(例如 Standard_D2s_v3、Standard_E48_v3)包含一个小型本地磁盘(例如 D:驱动器)。Traditionally, we have had VM sizes (e.g. Standard_D2s_v3, Standard_E48_v3) that include a small local disk (i.e. a D: Drive). 现在,使用这些新的 VM 规格,该小型本地磁盘将不再存在;但你仍然可以附加标准 HDD、高级 SSD 或超级 SSD。Now with these new VM sizes, that small local disk no longer exists; however, you can still attach Standard HDD, Premium SSD or Ultra SSD.

如果仍需本地临时磁盘,该怎么办?What if I still want a local temp disk?

如果工作负载需要本地临时磁盘,我们也提供了新的 Ddv4 和 Ddsv4Edv4 和 Edsv4 VM 规格。If your workload requires a local temporary disk, we also have new Ddv4 and Ddsv4 or Edv4 and Edsv4 VM sizes available. 与以前的 v3 规格相比,这些规格提供大 50% 的临时磁盘。These sizes offer 50% larger temporary disk compared with the previous v3 sizes.

备注

本地临时磁盘不是持久性的;若要确保数据是持久性数据,请使用标准 HDD、高级 SSD 或超级 SSD 选项。Local temporary disk is not persistent; to ensure your data is persistent, please use Standard HDD, Premium SSD or Ultra SSD options.

这些新的 VM 规格与我使用的常规用途 Dv3/Dsv3 或内存优化 Ev3/Esv3 VM 规格之间有何区别?What are the differences between these new VM sizes and the General Purpose Dv3/Dsv3 or the Memory Optimized Ev3/Esv3 VM sizes that I am used to?

具有本地临时磁盘的 v3 VM 系列v3 VM families with local temp disk 具有本地临时磁盘的新型 v4 系列New v4 families with local temp disk 无本地临时磁盘的新型 v4 系列New v4 families with no local temp disk
Dv3Dv3 Ddv4Ddv4 Dv4Dv4
Dsv3Dsv3 Ddsv4Ddsv4 Dsv4Dsv4
Ev3Ev3 Edv4Edv4 Ev4Ev4
Esv3Esv3 Edsv4Edsv4 Esv4Esv4

是否可将具有本地临时磁盘的 VM 规格调整为无本地临时磁盘的 VM 规格?Can I resize a VM size that has a local temp disk to a VM size with no local temp disk?

否。No. 只允许下方的组合调整规格:The only combinations allowed for resizing are:

  1. VM(具有本地临时磁盘)-> VM(具有本地临时磁盘);以及VM (with local temp disk) -> VM (with local temp disk); and
  2. VM(无本地临时磁盘)-> VM(无本地临时磁盘)。VM (with no local temp disk) -> VM (with no local temp disk).

如果你想知道解决方法,请查看下一个问题。If interested in a work around, please see next question.

备注

如果映像依赖于资源磁盘,或者本地临时磁盘上存在页面文件或交换文件,则无磁盘映像将不起作用,而需改用“具有磁盘”替代项。If an image depends on the resource disk, or a pagefile or swapfile exists on the local temp disk, the diskless images will not work—instead, use the 'with disk' alternative.

如何从具有本地临时磁盘的 VM 规格迁移到无本地临时磁盘的 VM 规格?How do I migrate from a VM size with local temp disk to a VM size with no local temp disk?

可按以下步骤迁移:You can migrate by following these steps:

  1. 以本地管理员身份连接到具有本地临时磁盘(例如 D: 驱动器)的虚拟机。Connect to your Virtual Machine that has a local temporary disk (for example, a D: Drive) as a local admin.

  2. 按照使用 D: 驱动器作为 Windows VM 上的数据驱动器的“将 pagefile.sys 临时移到 C 驱动器”部分中所述的指导原则,将本地临时磁盘(D: 驱动器)中的页面文件移到 C: 驱动器。Follow the guidelines on the "Temporarily move pagefile.sys to C drive" section of Use the D: drive as a data drive on a Windows VM to move the page file from the local temporary disk (D: drive) to the C: drive.

    备注

    按照“使用 D: 驱动器作为 Windows VM 上的数据驱动器”的“将 pagefile.sys 临时移到 C 驱动器”部分中所述的指导原则,将本地临时磁盘(D: 驱动器)中的页面文件移到 C: 驱动器。Follow the guidelines on the "Temporarily move pagefile.sys to C drive" section of Use the D: drive as a data drive on a Windows VM to move page file from the local temporary disk (D: drive) to C: drive. 不严格按照所述步骤操作可能导致出现错误消息 -“无法调整 VM 大小,因为不允许将资源磁盘 VM 规格更改为非资源磁盘 VM 规格,反之亦然。”Deviation from the steps outlined will lead to the error message - "Unable to resize the VM since changing from resource disk to non-resource disk VM size and vice-versa is not allowed.

  3. 按照使用门户或 Azure CLI 创建快照中所述的步骤创建 VM 的快照。Take a snapshot of the VM by following the steps outlined in Create a snapshot using the portal or Azure CLI.

  4. 按照使用 CLI 从快照创建虚拟机中所述的步骤,使用快照创建新的无磁盘 VM(例如 Dv4、Dsv4、Ev4、Esv4 系列)。Use snapshot to create a new diskless VM (such as, Dv4, Dsv4, Ev4, Esv4 series) by following the steps outlined in Create a virtual machine from a snapshot with CLI.

这些 VM 规格是否支持 Linux 和 Windows 操作系统 (OS)?Do these VM sizes support both Linux and Windows Operating Systems (OS)?

是的。Yes.

这是否会中断自定义脚本、自定义映像或在本地临时磁盘上具有暂存文件或页面文件的 OS 映像?Will this break my custom scripts, custom images or OS images that have scratch files or page files on a local temp disk?

如果自定义 OS 映像指向本地临时磁盘,则该映像可能无法通过此无磁盘规格正常工作。If the custom OS image points to the local temp disk, the image might not work correctly with this diskless size.

有问题或反馈?Have questions or feedback?

填写反馈窗体Fill out the feedback form.

后续步骤Next steps

本文档详细介绍了与没有本地临时磁盘的 Azure VM 相关的最常见问题。In this document, you learned more about the most frequent questions related to Azure VMs with no local temp disk. 有关这些 VM 规格的详细信息,请参阅以下文章:For more information about these VM sizes, see the following articles: