将 Batch 池配置从云服务迁移到虚拟机Migrate Batch pool configuration from Cloud Services to Virtual Machines

可以使用 cloudServiceConfigurationvirtualMachineConfiguration 创建 Batch 池。Batch pools can be created using either cloudServiceConfiguration or virtualMachineConfiguration. “virtualMachineConfiguration”是建议的配置,因为它支持所有 Batch 功能。'virtualMachineConfiguration' is the recommended configuration as it supports all Batch capabilities. “cloudServiceConfiguration”池不能支持所有功能,也没有规划任何新功能。'cloudServiceConfiguration' pools do not support all features and no new features are planned.

如果你使用“cloudServiceConfiguration”池,则强烈建议你改用“virtualMachineConfiguration”池。If you use 'cloudServiceConfiguration' pools, it is highly recommended that you move to use 'virtualMachineConfiguration' pools. 这样,你将能够利用所有 Batch 功能,例如扩展的 VM 系列选择、Linux VM、容器Azure 资源管理器虚拟网络节点磁盘加密This will enable you to benefit from all Batch capabilities, such as an expanded selection of VM series, Linux VMs, containers, Azure Resource Manager virtual networks, and node disk encryption.

本文介绍了如何迁移到“virtualMachineConfiguration”。This article describes how to migrate to 'virtualMachineConfiguration'.

需要新池New pools are required

无法将现有活动池从“cloudServiceConfiguration”更新为“virtualMachineConfiguration”,必须创建新池。Existing active pools cannot be updated from 'cloudServiceConfiguration' to 'virtualMachineConfiguration', new pools must be created. 所有 Batch API、命令行工具、Azure 门户和 Batch Explorer UI 都支持使用“virtualMachineConfiguration”创建池。Creating pools using 'virtualMachineConfiguration' is supported by all Batch APIs, command-line tools, Azure portal, and the Batch Explorer UI.

.NETPython 教程提供了使用“virtualMachineConfiguration”创建池的示例。The .NET and Python tutorials provide examples of pool creation using 'virtualMachineConfiguration'.

池配置差异Pool configuration differences

更新池配置时,应考虑以下事项:The following should be considered when updating pool configuration:

  • “cloudServiceConfiguration”池节点始终为 Windows OS,“virtualMachineConfiguration”池可以是 Linux OS 或 Windows OS。'cloudServiceConfiguration' pool nodes are always Windows OS, 'virtualMachineConfiguration' pools can either be Linux or Windows OS.

  • 与“cloudServiceConfiguration”池相比,“virtualMachineConfiguration”池具有更丰富的一组功能,例如容器支持、数据磁盘和磁盘加密。Compared to 'cloudServiceConfiguration' pools, 'virtualMachineConfiguration' pools have a richer set of capabilities, such as container support, data disks, and disk encryption.

  • “virtualMachineConfiguration”池节点利用托管 OS 磁盘。'virtualMachineConfiguration' pool nodes utilize managed OS disks. 用于每个节点的托管磁盘类型取决于为该池选择的 VM 大小。The managed disk type that is used for each node depends on the VM size chosen for the pool. 如果为池指定了一个“s”VM 大小(例如“Standard_D2s_v3”),则会使用高级 SSD。If a 's' VM size is specified for the pool, for example 'Standard_D2s_v3', then a premium SSD is used. 如果指定了一个“非 s”VM 大小(例如“Standard_D2_v3”),则会使用标准 HDD。If a 'non-s' VM size is specified, for example 'Standard_D2_v3', then a standard HDD is used.

    重要

    与虚拟机和虚拟机规模集一样,用于每个节点的 OS 托管磁盘都会产生成本,这增加了 VM 的成本。As with Virtual Machines and Virtual Machine Scale Sets, the OS managed disk used for each node incurs a cost, which is additional to the cost of the VMs. “cloudServiceConfiguration”节点没有 OS 磁盘成本,因为 OS 磁盘是在节点本地的 SSD 上创建的。There is no OS disk cost for 'cloudServiceConfiguration' nodes as the OS disk is created on the nodes local SSD.

  • 池和节点的启动和删除时间在“cloudServiceConfiguration”池和“cloudServiceConfiguration”池之间可能略有不同。Pool and node startup and delete times may differ slightly between 'cloudServiceConfiguration' pools and 'virtualMachineConfiguration' pools.

后续步骤Next steps