Share via


ComputeBatchModelFactory.VirtualMachineConfiguration Method

Definition

The configuration for Compute Nodes in a Pool based on the Azure Virtual Machines infrastructure.

public static Azure.Compute.Batch.VirtualMachineConfiguration VirtualMachineConfiguration(Azure.Compute.Batch.BatchVmImageReference imageReference = default, string nodeAgentSkuId = default, Azure.Compute.Batch.WindowsConfiguration windowsConfiguration = default, System.Collections.Generic.IEnumerable<Azure.Compute.Batch.DataDisk> dataDisks = default, string licenseType = default, Azure.Compute.Batch.BatchContainerConfiguration containerConfiguration = default, Azure.Compute.Batch.DiskEncryptionConfiguration diskEncryptionConfiguration = default, Azure.Compute.Batch.BatchNodePlacementConfiguration nodePlacementConfiguration = default, System.Collections.Generic.IEnumerable<Azure.Compute.Batch.VMExtension> extensions = default, Azure.Compute.Batch.BatchOsDisk osDisk = default, Azure.Compute.Batch.SecurityProfile securityProfile = default, Azure.Compute.Batch.ServiceArtifactReference serviceArtifactReference = default);
static member VirtualMachineConfiguration : Azure.Compute.Batch.BatchVmImageReference * string * Azure.Compute.Batch.WindowsConfiguration * seq<Azure.Compute.Batch.DataDisk> * string * Azure.Compute.Batch.BatchContainerConfiguration * Azure.Compute.Batch.DiskEncryptionConfiguration * Azure.Compute.Batch.BatchNodePlacementConfiguration * seq<Azure.Compute.Batch.VMExtension> * Azure.Compute.Batch.BatchOsDisk * Azure.Compute.Batch.SecurityProfile * Azure.Compute.Batch.ServiceArtifactReference -> Azure.Compute.Batch.VirtualMachineConfiguration
Public Shared Function VirtualMachineConfiguration (Optional imageReference As BatchVmImageReference = Nothing, Optional nodeAgentSkuId As String = Nothing, Optional windowsConfiguration As WindowsConfiguration = Nothing, Optional dataDisks As IEnumerable(Of DataDisk) = Nothing, Optional licenseType As String = Nothing, Optional containerConfiguration As BatchContainerConfiguration = Nothing, Optional diskEncryptionConfiguration As DiskEncryptionConfiguration = Nothing, Optional nodePlacementConfiguration As BatchNodePlacementConfiguration = Nothing, Optional extensions As IEnumerable(Of VMExtension) = Nothing, Optional osDisk As BatchOsDisk = Nothing, Optional securityProfile As SecurityProfile = Nothing, Optional serviceArtifactReference As ServiceArtifactReference = Nothing) As VirtualMachineConfiguration

Parameters

imageReference
BatchVmImageReference

A reference to the Azure Virtual Machines Marketplace Image or the custom Virtual Machine Image to use.

nodeAgentSkuId
String

The SKU of the Batch Compute Node agent to be provisioned on Compute Nodes in the Pool. The Batch Compute Node agent is a program that runs on each Compute Node in the Pool, and provides the command-and-control interface between the Compute Node and the Batch service. There are different implementations of the Compute Node agent, known as SKUs, for different operating systems. You must specify a Compute Node agent SKU which matches the selected Image reference. To get the list of supported Compute Node agent SKUs along with their list of verified Image references, see the 'List supported Compute Node agent SKUs' operation.

windowsConfiguration
WindowsConfiguration

Windows operating system settings on the virtual machine. This property must not be specified if the imageReference property specifies a Linux OS Image.

dataDisks
IEnumerable<DataDisk>

The configuration for data disks attached to the Compute Nodes in the Pool. This property must be specified if the Compute Nodes in the Pool need to have empty data disks attached to them. This cannot be updated. Each Compute Node gets its own disk (the disk is not a file share). Existing disks cannot be attached, each attached disk is empty. When the Compute Node is removed from the Pool, the disk and all data associated with it is also deleted. The disk is not formatted after being attached, it must be formatted before use - for more information see https://learn.microsoft.com/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux and https://learn.microsoft.com/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine.

licenseType
String

This only applies to Images that contain the Windows operating system, and should only be used when you hold valid on-premises licenses for the Compute Nodes which will be deployed. If omitted, no on-premises licensing discount is applied. Values are: Windows_Server - The on-premises license is for Windows Server. Windows_Client - The on-premises license is for Windows Client.

containerConfiguration
BatchContainerConfiguration

The container configuration for the Pool. If specified, setup is performed on each Compute Node in the Pool to allow Tasks to run in containers. All regular Tasks and Job manager Tasks run on this Pool must specify the containerSettings property, and all other Tasks may specify it.

diskEncryptionConfiguration
DiskEncryptionConfiguration

The disk encryption configuration for the pool. If specified, encryption is performed on each node in the pool during node provisioning.

nodePlacementConfiguration
BatchNodePlacementConfiguration

The node placement configuration for the pool. This configuration will specify rules on how nodes in the pool will be physically allocated.

extensions
IEnumerable<VMExtension>

The virtual machine extension for the pool. If specified, the extensions mentioned in this configuration will be installed on each node.

osDisk
BatchOsDisk

Settings for the operating system disk of the Virtual Machine.

securityProfile
SecurityProfile

Specifies the security profile settings for the virtual machine or virtual machine scale set.

serviceArtifactReference
ServiceArtifactReference

Specifies the service artifact reference id used to set same image version for all virtual machines in the scale set when using 'latest' image version. The service artifact reference id in the form of /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}.

Returns

A new VirtualMachineConfiguration instance for mocking.

Applies to