Compartilhar via


New-AzureVMImageDiskConfigSet

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

New-AzureVMImageDiskConfigSet

This cmdlet returns a new object for disk configuration set, which would be passed to the image update cmdlet. It encapsulates the OSDiskConfig and the DataDiskConfig object. Use the Set-AzureVMImageOSDiskConfig and Set-AzureVMImageDataDiskConfig cmdlets to set the OS Disk and Data Disk properties for the VM Image.

Syntax

New-AzureVMImageDiskConfigSet [ <CommonParameters>]

Detailed Description

This cmdlet returns a new object for disk configuration set, which would be passed to the image update cmdlet. It encapsulates the OSDiskConfig and the DataDiskConfig object. Use the Set-AzureVMImageOSDiskConfig and Set-AzureVMImageDataDiskConfig cmdlets to set the OS Disk and Data Disk properties for the VM Image.

Parameters

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see  about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.WindowsAzure.Commands.ServiceManagement.Model.VirtualMachineImageDiskConfigSet

Examples

-------------------------- EXAMPLE 1 --------------------------

Description

-----------

C:\PS>$s = New-AzureDiskConfigSet
# returns DiskConfigSet object;

$s = Set-AzureOSDiskConfig -DiskConfig $s -HostCaching ReadWrite
# returns DiskConfigSet object;

$s = Set-AzureDataDiskConfig -DiskConfig $s -Name 'test' -HostCaching 'ReadWrite' -LUN 0
# returns DiskConfigSet object

# Final step - Update the VM Image

Update-AzureVMImage -ImageName testvmimage2 -Label test1 -Description test1 -DiskConfigSet $s;

# OR

$s | Update-AzureVMImage -ImageName testvmimage2 -Label test1 -Description test1;