Set-AzureVMImageDataDiskConfig
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Set-AzureVMImageDataDiskConfig
Allows you to update the Data Disk properties on the VM Image
Syntax
Parameter Set: Default
Set-AzureVMImageDataDiskConfig [-DiskConfig] <VirtualMachineImageDiskConfigSet> [-DataDiskName] <String> [-Lun] <Int32> [-HostCaching] <String> [ <CommonParameters>]
Parameters
-DataDiskName<String>
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-DiskConfig<VirtualMachineImageDiskConfigSet>
The disk config object that encapsulates the OS Disk and Data Disk objects.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue, ByPropertyName) |
Accept Wildcard Characters? |
false |
-HostCaching<String>
Aliases |
none |
Required? |
true |
Position? |
4 |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Lun<Int32>
Aliases |
none |
Required? |
true |
Position? |
3 |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
<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;