您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

如何将 Azure 预留折扣应用于虚拟机How the Azure reservation discount is applied to virtual machines

购买 Azure 虚拟机预留实例后,预留折扣将自动应用于与预留的属性和数量匹配的虚拟机。After you buy an Azure Reserved Virtual Machine Instance, the reservation discount is automatically applied to virtual machines that match the attributes and quantity of the reservation. 预留涵盖虚拟机的计算成本。A reservation covers the compute costs of your virtual machines.

预留折扣适用于从 Azure 市场购买的基础 VM。A reservation discount applies to the base VMs that you purchase from the Azure Marketplace.

有关 SQL 数据库保留容量,请参阅了解 Azure 预留实例折扣For SQL Database reserved capacity, see Understand Azure Reserved Instances discount.

下表说明了购买虚拟机预留实例后的虚拟机成本。The following table illustrates the costs for your virtual machine after you purchase a Reserved VM Instance. 在任何情况下,均按标准费率收取存储和网络费用。In all cases, you're charged for storage and networking at the normal rates.

虚拟机类型Virtual Machine Type 通过虚拟机预留实例收费Charges with Reserved VM Instance
未安装其他软件的 Linux VMLinux VMs without additional software 预留涵盖 VM 基础结构成本。The reservation covers your VM infrastructure costs.
具有软件费用的 Linux VM(例如,Red Hat)Linux VMs with software charges (For example, Red Hat) 预留涵盖基础结构成本。The reservation covers the infrastructure costs. 将收取其他软件费用。You're charged for additional software.
未安装其他软件的 Windows VMWindows VMs without additional software 预留涵盖基础结构成本。The reservation covers the infrastructure costs. 将收取 Windows 软件费用。You're charged for Windows software.
安装了其他软件(例如,SQL server)的 Windows VMWindows VMs with additional software (For example, SQL server) 预留涵盖基础结构成本。The reservation covers the infrastructure costs. 将收取 Windows 软件和其他软件费用。You're charged for Windows software and for additional software.
具有 Azure 混合权益的 Windows VMWindows VMs with Azure Hybrid Benefit 预留涵盖基础结构成本。The reservation covers the infrastructure costs. Azure 混合权益涵盖 Windows 软件成本。The Windows software costs are covered by the Azure Hybrid Benefit. 其他任何软件都是单独收费的。Any additional software is charged separately.

如何应用预留折扣How reservation discount is applied

预留折扣为“使用或丢失” 。A reservation discount is "use-it-or-lose-it". 因此,如果你在任何小时内没有匹配资源,那么你将丢失该小时的预留数量。So, if you don't have matching resources for any hour, then you lose a reservation quantity for that hour. 不能结转未使用的预留小时数。You can't carry forward unused reserved hours.

关闭资源时,预留折扣将自动应用于指定范围内的另一个匹配资源。When you shut down a resource, the reservation discount automatically applies to another matching resource in the specified scope. 如果在指定的范围内找不到匹配的资源,则预留小时数将丢失 。If no matching resources are found in the specified scope, then the reserved hours are lost.

非 Windows VM 的预留折扣Reservation discount for non-Windows VMs

Azure 预留折扣按小时应用于正在运行的 VM 实例。The Azure reservation discount is applied to running VM instances on an hourly basis. 已购买的预订将与正在运行的 VM 所发送的使用情况信息进行匹配以应用预订折扣。The reservations that you have purchased are matched to the usage emitted by the running VMs to apply the reservation discount. 对于可能无法运行整个小时的 VM,将从其他未使用预订的 VM(包括同时运行的 VM)填充预订。For VMs that may not run the full hour, the reservation will be filled from other VMs not using a reservation, including concurrently running VMs. 在一个小时结束时,将锁定该小时内的 VM 预留应用程序。At the end of the hour, the reservation application for VMs in the hour is locked. 如果 VM 未运行一小时或该小时内同时运行的 VM 未填充该小时的预留,则该小时的预留未充分利用。In the event a VM does not run for an hour or concurrent VMs within the hour do not fill the hour of the reservation, the reservation is underutilized for that hour. 下图说明了如何将预订应用于应计费的 VM 使用量。The following graph illustrates the application of a reservation to billable VM usage. 该说明基于一次预订购买和两个匹配的 VM 实例。The illustration is based on one reservation purchase and two matching VM instances.

一个已应用预留和两个匹配的 VM 实例的屏幕截图

  1. 超出预留范围的任何使用量将按常规即用即付费率进行收费。Any usage that's above the reservation line gets charged at the regular pay-as-you-go rates. 对于预留范围内的任何使用量不收取任何费用,因为这些使用量已在购买预留时付费。You're not charge for any usage below the reservations line, since it has been already paid as part of reservation purchase.
  2. 在第 1 个小时内,实例 1 运行了 0.75 小时,实例 2 运行了 0.5 小时。In hour 1, instance 1 runs for 0.75 hours and instance 2 runs for 0.5 hours. 第 1 个小时的总体使用情况为 1.25 小时。Total usage for hour 1 is 1.25 hours. 将按即用即付费率收取剩余 0.25 小时的费用。You're charged the pay-as-you-go rates for the remaining 0.25 hours.
  3. 在第 2 个小时和第 3 个小时内,这两个实例都各运行了 1 小时。For hour 2 and hour 3, both instances ran for 1 hour each. 一个实例的费用由预订费用涵盖,按即用即付费率对另一个实例收费。One instance is covered by the reservation and the other is charged at pay-as-you-go rates.
  4. 在第 4 个小时内,实例 1 运行了 0.5 小时,实例 2 运行了 1 小时。For hour 4, instance 1 runs for 0.5 hours and instance 2 runs for 1 hour. 预订费用完全涵盖了实例 1 的费用,并涵盖了实例 2 的 0.5 小时费用。Instance 1 is fully covered by the reservation and 0.5 hours of instance 2 is covered. 将按即用即付费率收取剩余 0.5 小时的费用。You’re charged the pay-as-you-go rate for the remaining 0.5 hours.

要了解 Azure 预留应用情况并在计费使用情况报告中查看该信息,请参阅了解预留使用情况To understand and view the application of your Azure Reservations in billing usage reports, see Understand reservation usage.

Windows VM 的预留折扣Reservation discount for Windows VMs

正在运行 Windows VM 实例时,将应用预留以涵盖基础结构成本。When you're running Windows VM instances, the reservation is applied to cover the infrastructure costs. 对 Windows VM 的 VM 基础结构成本应用预订与对非 Windows VM 的 VM 基础结构成本应用预订相同。The application of the reservation to the VM infrastructure costs for Windows VMs is the same as for non-Windows VMs. 将按 vCPU 对 Windows 软件单独收费。You're charged separately for Windows software on a per vCPU basis. 请参阅 Windows 软件的预留成本See Windows software costs with Reservations. 可以利用 Windows Server 的 Azure 混合权益来涵盖 Windows 许可费用。You can cover your Windows licensing costs with Azure Hybrid Benefit for Windows Server.

折扣适用于不同大小Discount can apply to different sizes

在购买预留 VM 实例时,如果选择“优化对象:实例大小灵活性”,则折扣覆盖范围将取决于所选的 VM 大小 。When you buy a Reserved VM Instance, if you select Optimized for: instance size flexibility, the discount coverage depends on the VM size you select. 预订可以应用于同一大小系列组中的虚拟机 (VM) 大小。The reservation can apply to the virtual machines (VMs) sizes in the same size series group. 有关详细信息,请参阅预订 VM 实例的虚拟机大小灵活性For more information, see Virtual machine size flexibility with Reserved VM Instances.

折扣仅适用于匹配的 ServiceTypeDiscount applies to matching ServiceType only

预留折扣仅适用于 AdditionalInfo 中的 ServiceType 值与购买的预留匹配的 VM 使用情况。A reservation discount applies only to the VM usage where the ServiceType value in AdditionalInfo matches the reservation that's purchased. 应用预留折扣时会忽略 VM 使用的计量,仅评估 ServiceTypeReservation discount application ignores the meter used for VMs and only evaluates ServiceType. 了解你为其购买 VM 的服务类型。Know which service type that you purchased the VM for. 你可以将非高级存储 VM 预留交换为高级存储预留,或以相反的方式进行交换。You can exchange a non-premium storage VM reservation for a premium storage reservation, or in the opposite manner.

可获得 VM 保留折扣的服务Services that get VM reservation discounts

VM 预留可以应用于从多个服务发出的 VM 使用量 - 而不仅应用于 VM 部署。Your VM reservations can apply to VM usage emitted from multiple services - not just for your VM deployments. 可获得预留折扣的资源会根据实例大小灵活性设置而变化。Resources that get reservation discounts change depending on the instance size flexibility setting.

实例大小灵活性设置Instance size flexibility setting

实例大小灵活性设置确定哪些服务可获得预留实例折扣。The instance size flexibility setting determines which services get the reserved instance discounts.

无论该设置是打开还是关闭,预留折扣在 ConsumedServiceMicrosoft.Compute 时会自动应用到任何匹配的 VM 使用量。Whether the setting is on or off, reservation discounts automatically apply to any matching VM usage when the ConsumedService is Microsoft.Compute. 因此,请检查使用情况数据中的 ConsumedService 值。So, check your usage data for the ConsumedService value. 示例包括:Some examples include:

  • 虚拟机Virtual machines
  • 虚拟机规模集Virtual machine scale sets
  • 容器服务Container service
  • Azure Batch 部署(在用户订阅模式下)Azure Batch deployments (in user subscriptions mode)
  • Azure Kubernetes 服务 (AKS)Azure Kubernetes Service (AKS)
  • Service FabricService Fabric

打开此设置后,当 ConsumedService 为以下任一项时,预留折扣将自动应用于匹配的 VM 使用量:When the setting is on, reservation discounts automatically apply to matching VM usage when the ConsumedService is any of the following items:

  • Microsoft.ComputeMicrosoft.Compute
  • Microsoft.ClassicComputeMicrosoft.ClassicCompute
  • Microsoft.BatchMicrosoft.Batch
  • Microsoft.MachineLearningServicesMicrosoft.MachineLearningServices
  • Microsoft.KustoMicrosoft.Kusto

检查使用情况数据中的 ConsumedService 值,以确定该使用是否符合预留折扣的条件。Check the ConsumedService value in your usage data to determine if the usage is eligible for reservation discounts.

有关实例大小灵活性的详细信息,请参阅虚拟机预留实例的虚拟机大小灵活性For more information about instance size flexibility, see Virtual machine size flexibility with Reserved VM Instances.

需要帮助?Need help? 联系我们Contact us

如有任何疑问或需要帮助,请创建支持请求If you have questions or need help, create a support request.

后续步骤Next steps

若要了解有关 Azure 预订的详细信息,请参阅以下文章:To learn more about Azure Reservations, see the following articles: