池创建事件Pool create event

池创建后,会发出此事件。This event is emitted once a pool has been created. 日志内容会公开有关池的常规信息。The content of the log will expose general information about the pool. 请注意,如果池的目标大小大于 0 个计算节点,则池调整大小启动事件会在此事件之后立即发生。Note that if the target size of the pool is greater than 0 compute nodes, a pool resize start event will follow immediately after this event.

以下示例显示了使用 CloudServiceConfiguration 属性所创建池的池创建事件的正文。The following example shows the body of a pool create event for a pool created using the CloudServiceConfiguration property.

{
    "id": "myPool1",
    "displayName": "Production Pool",
    "vmSize": "Standard_F1s",
    "imageType": "VirtualMachineConfiguration",
    "cloudServiceConfiguration": {
        "osFamily": "3",
        "targetOsVersion": "*"
    },
    "networkConfiguration": {
        "subnetId": " "
    },
    "virtualMachineConfiguration": {
          "imageReference": {
            "publisher": " ",
            "offer": " ",
            "sku": " ",
            "version": " "
          },
          "nodeAgentId": " "
        },
    "resizeTimeout": "300000",
    "targetDedicatedNodes": 2,
    "targetLowPriorityNodes": 2,
    "maxTasksPerNode": 1,
    "vmFillType": "Spread",
    "enableAutoScale": false,
    "enableInterNodeCommunication": false,
    "isAutoPool": false
}
元素Element 类型Type 注释Notes
id StringString 池的 ID。The ID of the pool.
displayName StringString 池的显示名称。The display name of the pool.
vmSize StringString 池中虚拟机的大小。The size of the virtual machines in the pool. 池中所有虚拟机的大小相同。All virtual machines in a pool are the same size.

有关云服务池(使用 cloudServiceConfiguration 创建的池)的虚拟机可用大小的信息,请参阅云服务的大小For information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services. 批处理支持除 ExtraSmall 以外的所有云服务 VM 大小。Batch supports all Cloud Services VM sizes except ExtraSmall.

有关使用虚拟机市场中映像的池(使用 virtualMachineConfiguration 创建的池)的可用 VM 大小的信息,请参阅虚拟机的大小 (Linux) 或虚拟机的大小 (Windows)。For information about available VM sizes for pools using images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) or Sizes for Virtual Machines (Windows). Batch 支持除 STANDARD_A0 和高级存储大小(STANDARD_GSSTANDARD_DSSTANDARD_DSV2 系列)以外所有的 Azure VM 大小。Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series).
imageType StringString 映像的部署方法。The deployment method for the image. 支持的值为 virtualMachineConfigurationcloudServiceConfigurationSupported values are virtualMachineConfiguration or cloudServiceConfiguration
cloudServiceConfiguration 复杂类型Complex Type 池的云服务配置。The cloud service configuration for the pool.
virtualMachineConfiguration 复杂类型Complex Type 池的虚拟机配置。The virtual machine configuration for the pool.
networkConfiguration 复杂类型Complex Type 池的网络配置。The network configuration for the pool.
resizeTimeout 时间Time 为针对池的上一次调整大小操作指定的将计算节点分配到池的超时。The timeout for allocation of compute nodes to the pool specified for the last resize operation on the pool. (创建池时的初始大小计为一次调整大小。)(The initial sizing when the pool is created counts as a resize.)
targetDedicatedNodes Int32Int32 池请求的专用计算节点数。The number of dedicated compute nodes that are requested for the pool.
targetLowPriorityNodes Int32Int32 池请求的低优先级计算节点数。The number of low-priority compute nodes that are requested for the pool.
enableAutoScale BoolBool 指定池大小是否随时间自动调整。Specifies whether the pool size automatically adjusts over time.
enableInterNodeCommunication BoolBool 指定是否针对节点间的直接通信设置池。Specifies whether the pool is set up for direct communication between nodes.
isAutoPool BoolBool 指定是否已通过作业的 AutoPool 机制创建池。Specifies whether the pool was created via a job's AutoPool mechanism.
maxTasksPerNode Int32Int32 可在池中单个计算节点上并发运行的任务的最大数目。The maximum number of tasks that can run concurrently on a single compute node in the pool.
vmFillType StringString 定义批处理服务如何在池中不同的计算节点之间分配任务。Defines how the Batch service distributes tasks between compute nodes in the pool. 有效值为 Spread 或 Pack。Valid values are Spread or Pack.

cloudServiceConfigurationcloudServiceConfiguration

元素名称Element name 类型Type 注释Notes
osFamily StringString 要安装在池中虚拟机上的 Azure 来宾 OS 系列。The Azure Guest OS family to be installed on the virtual machines in the pool.

可能的值包括:Possible values are:

2 - OS 系列 2,等效于 Windows Server 2008 R2 SP1。2 OS Family 2, equivalent to Windows Server 2008 R2 SP1.

3 - OS 系列 3,等效于 Windows Server 2012。3 OS Family 3, equivalent to Windows Server 2012.

4 - OS 系列 4,等效于 Windows Server 2012 R2。4 OS Family 4, equivalent to Windows Server 2012 R2.

有关详细信息,请参阅 Azure 来宾 OS 版本For more information, see Azure Guest OS Releases.
targetOSVersion StringString 要安装在池中虚拟机上的 Azure 来宾 OS 版本。The Azure Guest OS version to be installed on the virtual machines in the pool.

默认值为 * ,用于指定特定系列的最新操作系统版本。The default value is * which specifies the latest operating system version for the specified family.

有关其他允许的值的信息,请参阅 Azure 来宾 OS 版本For other permitted values, see Azure Guest OS Releases.

virtualMachineConfigurationvirtualMachineConfiguration

元素名称Element name 类型Type 注释Notes
imageReference 复杂类型Complex Type 指定关于要使用的平台或市场映像的信息。Specifies information about the platform or Marketplace image to use.
nodeAgentId StringString 在计算节点上预配的批处理节点代理的 SKU。The SKU of the Batch node agent provisioned on the compute node.
windowsConfiguration 复杂类型Complex Type 指定虚拟机上的 Windows 操作系统设置。Specifies Windows operating system settings on the virtual machine. 如果 imageReference 引用 Linux OS 映像,则不能指定此属性。This property must not be specified if the imageReference is referencing a Linux OS image.

imageReferenceimageReference

元素名称Element name 类型Type 注释Notes
publisher StringString 映像的发布者。The publisher of the image.
offer StringString 映像的产品/服务。The offer of the image.
sku StringString 映像的 SKU。The SKU of the image.
version StringString 映像的版本。The version of the image.

windowsConfigurationwindowsConfiguration

元素名称Element name 类型Type 注释Notes
enableAutomaticUpdates 布尔Boolean 指示是否对虚拟机启用自动更新。Indicates whether the virtual machine is enabled for automatic updates. 如果未指定此属性,则默认值为 true。If this property is not specified, the default value is true.

networkConfigurationnetworkConfiguration

元素名称Element name 类型Type 注释Notes
subnetId StringString 指定创建池计算节点的子网的资源标识符。Specifies the resource identifier of the subnet in which the pool's compute nodes are created.