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

用 Azure 保留 VM 实例 (RI) 为虚拟机预付Prepay for Virtual Machines with Azure Reserved VM Instances (RI)

通过 Azure 虚拟机 (VM) 预留实例预付虚拟机并节省资金。Prepay for virtual machines and save money with Azure Reserved Virtual Machine (VM) Instances. 有关详细信息,请参阅 Azure 虚拟机预留实例产品/服务For more information, see Azure Reserved VM Instances offering.

可在 Azure 门户中购买虚拟机预留实例。You can buy a Reserved VM Instance in the Azure portal. 若要购买实例:To buy an instance:

  • 你必须是至少一个企业订阅的所有者角色, 或者是使用即用即付费率的订阅。You must be in an Owner role for at least one Enterprise subscription or a subscription with a pay-as-you-go rate.
  • 对于企业订阅,必须在 EA 门户中启用“添加预留实例” 。For Enterprise subscriptions, Add Reserved Instances must be enabled in the EA portal. 或者,如果禁用了该设置,则必须是订阅的 EA 管理员。Or, if that setting is disabled, you must be an EA Admin on the subscription.
  • 对于云解决方案提供商 (CSP) 计划,只有管理员代理或销售代理才能购买预留。For the Cloud Solution Provider (CSP) program, only the admin agents or sales agents can buy reservations.

预订折扣将自动应用于正在运行的与预订范围和属性匹配的虚拟机数量。The reservation discount is applied automatically to the number of running virtual machines that match the reservation scope and attributes. 可以通过 Azure 门户、PowerShell、CLI 或 API 更新预留的范围。You can update the scope of the reservation through Azure portal, PowerShell, CLI, or through the API.

在购买前确定正确的 VM 大小Determine the right VM size before you buy

在购买预订之前, 应确定所需的 VM 大小。Before you buy a reservation, you should determine the size of the VM that you need. 以下部分将帮助你确定正确的 VM 大小。The following sections will help you determine the right VM size.

使用预订建议Use reservation recommendations

你可以使用预订建议来帮助确定你应购买的预订。You can use reservation recommendations to help determine the reservations you should purchase.

获取 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

当设置为 on 时, 预订折扣将自动应用于匹配的 VM 使用情况 (当ConsumedService为以下任意项时):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.

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

分析使用情况信息Analyze your usage information

分析你的使用情况信息, 以帮助确定你应购买哪些预订。Analyze your usage information to help determine which reservations you should purchase.

使用情况数据在使用文件和 Api 中可用。Usage data is available in the usage file and APIs. 将它们一起用于确定要购买的预订。Use them together to determine which reservation to purchase. 检查每日具有高使用率的 VM 实例, 以确定要购买的预订数量。Check for VM instances that have high usage on daily basis to determine the quantity of reservations to purchase.

避免使用Meter情况数据Product中的子类别和字段。Avoid the Meter subcategory and Product fields in usage data. 它们不区分使用高级存储的 VM 大小。They don't distinguish between VM sizes that use premium storage. 如果你使用这些字段来确定用于预订购买的 VM 大小, 则可能购买的大小不正确。If you use these fields to determine the VM size for reservation purchase, you may buy the wrong size. 然后, 你将不会获得预期的预订折扣。Then you won't get the reservation discount you expect. 请参阅使用情况文件AdditionalInfo或使用情况 API 中的字段, 以确定正确的 VM 大小。Instead, refer to the AdditionalInfo field in your usage file or usage API to determine the correct VM size.

购买限制注意事项Purchase restriction considerations

保留的 VM 实例适用于大多数 VM 大小, 但有一些例外情况。Reserved VM Instances are available for most VM sizes with some exceptions. 预订折扣不适用于以下 Vm:Reservation discounts don't apply for the following VMs:

  • VM 系列-A 系列、Av2 系列或 G 系列。VM series - A-series, Av2-series, or G-series.

  • 预览中的 vm -处于预览阶段的任何 vm 系列或大小。VMs in preview - Any VM-series or size that is in preview.

  • 预订不适用于德国或中国地区的购买。Clouds - Reservations aren't available for purchase in Germany or China regions.

  • 配额不足-作用于单个订阅的保留必须在新 RI 的订阅中具有 vCPU 配额。Insufficient quota - A reservation that is scoped to a single subscription must have vCPU quota available in the subscription for the new RI. 例如,如果目标订阅的配额限制为 10 个 vCPU(适用于 D 系列),则不能为 11 个 Standard_D1 实例购买预留。For example, if the target subscription has a quota limit of 10 vCPUs for D-Series, then you can't buy a reservation for 11 Standard_D1 instances. 虚拟机预留实例的配额检查包括已在订阅中部署的 VM。The quota check for reservations includes the VMs already deployed in the subscription. 例如,如果该订阅的配额为针对 D 系列购买 10 个 vCPU,并且已部署两个 Standard_D1 实例,则可在该订阅中为 10 个 Standard_D1 实例购买预留。For example, if the subscription has a quota of 10 vCPUs for D-Series and has two standard_D1 instances deployed, then you can buy a reservation for 10 standard_D1 instances in this subscription. 你可以创建报价增加请求以解决此问题。You can create quote increase request to resolve this issue.

  • 容量限制-在极少数情况下, Azure 会限制购买 VM 大小子集的新保留, 因为区域中的容量不足。Capacity restrictions - In rare circumstances, Azure limits the purchase of new reservations for subset of VM sizes, because of low capacity in a region.

购买虚拟机预留实例Buy a Reserved VM Instance

  1. 登录到 Azure 门户Sign in to the Azure portal.
  2. 选择“所有服务” > “预订” 。Select All services > Reservations.
  3. 选择 "添加" 购买新的预订, 然后单击 "虚拟机"。Select Add to purchase a new reservation and then click Virtual machine.
  4. 输入必填字段。Enter required fields. 与所选属性匹配的正在运行的 VM 实例有资格获得预订折扣。Running VM instances that match the attributes you select qualify to get the reservation discount. 实际获得折扣的 VM 实例数取决于所选范围和数量。The actual number of your VM instances that get the discount depend on the scope and quantity selected.
字段Field 描述Description
订阅Subscription 用于支付预订费用的订阅。The subscription used to pay for the reservation. 将向订阅的付款方式收取预订的预付费用。The payment method on the subscription is charged the upfront costs for the reservation. 订阅类型必须为企业协议(套餐编号:BC-OP-NT-AZR-Ms-azr-0017p 或 BC-OP-NT-AZR-Ms-azr-0148p) 或使用即用即付费率的单个订阅 (产品编号:MS-AZR-0003P 或 MS-AZR-0023P)。The subscription type must be an enterprise agreement (offer numbers: MS-AZR-0017P or MS-AZR-0148P) or an individual subscription with pay-as-you-go rates (offer numbers: MS-AZR-0003P or MS-AZR-0023P). 对于企业订阅,从注册的货币承诺余额中扣除费用或作为超额收取费用。For an enterprise subscription, the charges are deducted from the enrollment's monetary commitment balance or charged as overage. 对于使用即用即付费率的订阅, 将对订阅上的信用卡或发票付款方式收取费用。For a subscription with pay-as-you-go rates, the charges are billed to the credit card or invoice payment method on the subscription.
范围Scope 预订的范围可以包含一个订阅或多个订阅(共享范围)。The reservation’s scope can cover one subscription or multiple subscriptions (shared scope). 如果选择:If you select:
  • 单个资源组范围-仅将预订折扣应用于所选资源组中的匹配资源。Single resource group scope — Applies the reservation discount to the matching resources in the selected resource group only.
  • 单个订阅范围-将预订折扣应用于所选订阅中的匹配资源。Single subscription scope — Applies the reservation discount to the matching resources in the selected subscription.
  • 共享作用域-将预订折扣应用于计费上下文中符合条件的订阅中的匹配资源。Shared scope — Applies the reservation discount to matching resources in eligible subscriptions that are in the billing context. 对于企业协议客户, 计费上下文是注册。For Enterprise Agreement customers, the billing context is the enrollment. 对于使用即用即付费率的各个订阅, 计费范围是由帐户管理员创建的所有符合条件的订阅。For individual subscriptions with pay-as-you-go rates, the billing scope is all eligible subscriptions created by the account administrator.
区域Region 预订涵盖的 Azure 区域。The Azure region that’s covered by the reservation.
VM 大小VM Size VM 实例的大小。The size of the VM instances.
优化对象Optimize for 默认情况下选择了 VM 实例大小灵活性。VM instance size flexibility is selected by default. 单击 "高级设置" 以更改实例大小的灵活性值, 以将预订折扣应用于同一VM 大小组中的其他 vm。Click Advanced settings to change the instance size flexibility value to apply the reservation discount to other VMs in the same VM size group. 容量优先级可以对部署优先使用数据中心容量。Capacity priority prioritizes data center capacity for your deployments. 它可让你在需要时启动 VM 实例, 从而提供更多的信心。It offers additional confidence in your ability to launch the VM instances when you need them. 仅当预留范围为单个订阅时,容量优先级才可用。Capacity priority is only available when the reservation scope is single subscription.
术语Term 一年或三年。One year or three years.
数量Quantity 预订中购买的实例数。The number of instances being purchased within the reservation. 数量是可以获得计费折扣的正在运行的 VM 实例数。The quantity is the number of running VM instances that can get the billing discount. 例如, 如果你在美国东部运行10个 Standard_D2 Vm, 则会将数量指定为 10, 以最大程度地提高所有正在运行的 Vm 的权益。For example, if you are running 10 Standard_D2 VMs in the East US, then you would specify quantity as 10 to maximize the benefit for all running VMs.

在购买后更改保留Change a reservation after purchase

可以在购买后对保留项进行以下类型的更改:You can make the following types of changes to a reservation after purchase:

  • 更新保留范围Update reservation scope
  • 实例大小灵活性 (如果适用)Instance size flexibility (if applicable)
  • 所有权Ownership

还可以将保留拆分为较小的区块, 并合并已拆分的保留项。You can also split a reservation into smaller chunks and merge already split reservations. 任何更改都不会导致新的商业交易, 也不会更改预订的结束日期。None of the changes cause a new commercial transaction or change the end date of the reservation.

在购买后, 不能进行以下类型的更改:You can't make the following types of changes after purchase, directly:

  • 现有预订的区域An existing reservation’s region
  • SKUSKU
  • 数量Quantity
  • DurationDuration

不过, 如果想要进行更改, 则可以交换预订。However, you can exchange a reservation if you want to make changes.

取消和更换Cancellations and exchanges

如果需要取消预留,可能会产生 12% 的提前终止费。If you need to cancel your reservation, there may be a 12% early termination fee. 退款根据购买价格和当前预留价格中的最低者计算。Refunds are based on the lowest price of either your purchase price or the current price of the reservation. 退款限制为每年 50,000 美元。Refunds are limited to $50,000 per year. 收到的退款为按比例计算出的余额减去 12% 的提前终止费。The refund you receive is the remaining pro-rated balance minus the 12% early termination fee. 若要请求取消,请在 Azure 门户中访问该预留,并选择“退款” 创建支持请求。To request a cancellation, go to the reservation in the Azure portal and select Refund to create a support request.

如果需要将保留 VM 实例保留更改为其他区域、VM 大小组或术语, 则可以进行交换。If you need to change your Reserved VM Instances reservation to another region, VM size group, or term, you can exchange it. Exchange 必须为等于或大于值的另一个预留。The exchange must be for another reservation that's of equal or greater value. 新订购项目的期限开始日期不是从交换的订购项目延续。The term start date for the new reservation doesn't carry over from the exchanged reservation. 当你创建新的预订时, 从一年或三年开始。The one or three year term starts from when you create the new reservation. 若要请求交换,请在 Azure 门户中访问该预留,并选择“交换” 创建支持请求。To request an exchange, go to the reservation in the Azure portal, and select Exchange to create a support request.

有关如何交换或退款预订的详细信息, 请参阅保留交换和退款For more information about how to exchange or refund reservations, see Reservation exchanges and refunds.

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

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

后续步骤Next steps