ArmComputeModelFactory.VirtualMachineStorageProfile Method

Definition

public static Azure.ResourceManager.Compute.Models.VirtualMachineStorageProfile VirtualMachineStorageProfile(Azure.ResourceManager.Compute.Models.ImageReference imageReference = default, Azure.ResourceManager.Compute.Models.VirtualMachineOSDisk osDisk = default, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Compute.Models.VirtualMachineDataDisk> dataDisks = default, Azure.ResourceManager.Compute.Models.DiskControllerType? diskControllerType = default, bool? alignRegionalDisksToVmZone = default);
static member VirtualMachineStorageProfile : Azure.ResourceManager.Compute.Models.ImageReference * Azure.ResourceManager.Compute.Models.VirtualMachineOSDisk * seq<Azure.ResourceManager.Compute.Models.VirtualMachineDataDisk> * Nullable<Azure.ResourceManager.Compute.Models.DiskControllerType> * Nullable<bool> -> Azure.ResourceManager.Compute.Models.VirtualMachineStorageProfile
Public Shared Function VirtualMachineStorageProfile (Optional imageReference As ImageReference = Nothing, Optional osDisk As VirtualMachineOSDisk = Nothing, Optional dataDisks As IEnumerable(Of VirtualMachineDataDisk) = Nothing, Optional diskControllerType As Nullable(Of DiskControllerType) = Nothing, Optional alignRegionalDisksToVmZone As Nullable(Of Boolean) = Nothing) As VirtualMachineStorageProfile

Parameters

imageReference
ImageReference

Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations.

osDisk
VirtualMachineOSDisk

Specifies information about the operating system disk used by the virtual machine. For more information about disks, see About disks and VHDs for Azure virtual machines.

dataDisks
IEnumerable<VirtualMachineDataDisk>

Specifies the parameters that are used to add a data disk to a virtual machine. For more information about disks, see About disks and VHDs for Azure virtual machines.

diskControllerType
Nullable<DiskControllerType>

Specifies the disk controller type configured for the VM. Note: This property will be set to the default disk controller type if not specified provided virtual machine is being created with 'hyperVGeneration' set to V2 based on the capabilities of the operating system disk and VM size from the the specified minimum api version. You need to deallocate the VM before updating its disk controller type unless you are updating the VM size in the VM configuration which implicitly deallocates and reallocates the VM. Minimum api-version: 2022-08-01.

alignRegionalDisksToVmZone
Nullable<Boolean>

Specifies whether the regional disks should be aligned/moved to the VM zone. This is applicable only for VMs with placement property set. Please note that this change is irreversible. Minimum api-version: 2024-11-01.

Returns

A new VirtualMachineStorageProfile instance for mocking.

Applies to