< Back
Add-AzureVhd
Post
NAME Add-AzureVhd
SYNOPSIS
Uploads a VHD file from an on-premise machine to a blob in a cloud storage account in Azure.
SYNTAX
Add-AzureVhd [-Destination] <Uri> [-LocalFilePath] <FileInfo> [[-NumberOfUploaderThreads] <Int32>] [[-BaseImageUriToPatch] <Uri>] [[-OverWrite]]
[-Profile <AzureSMProfile>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [<CommonParameters>]
DESCRIPTION
The Add-AzureVhd cmdlet uploads on premise Virtual hard disk (VHD) images to a blob storage account as fixed .vhd images. It has parameters to configure
the upload process such as specifying the number of uploader threads that will be used or overwriting a blob which already exists in the specified
destination URI. For on premise VHD images, patching scenario is also supported so that diff disk images can be uploaded without having to upload the
already uploaded base images. Shared Access Signature (SAS) URI is also supported.
PARAMETERS
-Destination <Uri>
Specifies a URI to a blob in Microsoft Azure Blob Storage. SAS in URI input is supported. However, in patching scenarios the destination cannot be a
SAS URI.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-LocalFilePath <FileInfo>
Species the file path of the local .vhd file.
Required? true
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-NumberOfUploaderThreads <Int32>
Specifies the number of threads to use for upload.
Required? false
Position? 3
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-BaseImageUriToPatch <Uri>
Specifies an URI to a base image blob in Azure Blob Storage. SAS in URI input is supported as well.
Required? false
Position? 4
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-OverWrite [<SwitchParameter>]
Specifies that this cmdlet deletes the existing blob in the specified destination URI if it exists.
Required? false
Position? 5
Default value False
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Profile <AzureSMProfile>
Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-InformationAction <ActionPreference>
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-InformationVariable <String>
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
-------------------------- Example 1: Add a VHD file --------------------------
PS C:\\>Add-AzureVhd -Destination "http://contosoaccount.blob.core.windows ... eimage.vhd" -LocalFilePath "C:\\vhd\\Win7Image.vhd"
This command adds a .vhd file to a storage account.
-------------------------- Example 2: Add a VHD file and overwrite the destination --------------------------
PS C:\\>Add-AzureVhd -Destination "http://contosoaccount.blob.core.windows ... eimage.vhd" -LocalFilePath "C:\\vhd\\Win7Image.vhd"
-Overwrite
This command adds a .vhd file to a storage account.
-------------------------- Example 3: Add a VHD file and specify the number of threads --------------------------
PS C:\\>Add-AzureVhd -Destination "http://contosoaccount.blob.core.windows ... eimage.vhd" -LocalFilePath "C:\\vhd\\Win7Image.vhd"
-NumberOfThreads 32
This command adds a .vhd file to a storage account and specifies the number of threads to use to upload the file.
-------------------------- Example 4: Add a VHD file and specify the SAS URI --------------------------
PS C:\\>Add-AzureVhd -Destination "http://contosoaccount.blob.core.windows ... 3-01-09T23
%3A10%3A49Z&sr=b&sp=w&sig=13T9Ow%2FRJAMmhfO%2FaP3HhKKJ6AY093SmveOSIV4%2FR7w%3D" -LocalFilePath "C:\\vhd\\win7baseimage.vhd"
This command adds a .vhd file to a storage account and specifies the SAS URI.
RELATED LINKS
Save-AzureVhd
SYNOPSIS
Uploads a VHD file from an on-premise machine to a blob in a cloud storage account in Azure.
SYNTAX
Add-AzureVhd [-Destination] <Uri> [-LocalFilePath] <FileInfo> [[-NumberOfUploaderThreads] <Int32>] [[-BaseImageUriToPatch] <Uri>] [[-OverWrite]]
[-Profile <AzureSMProfile>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [<CommonParameters>]
DESCRIPTION
The Add-AzureVhd cmdlet uploads on premise Virtual hard disk (VHD) images to a blob storage account as fixed .vhd images. It has parameters to configure
the upload process such as specifying the number of uploader threads that will be used or overwriting a blob which already exists in the specified
destination URI. For on premise VHD images, patching scenario is also supported so that diff disk images can be uploaded without having to upload the
already uploaded base images. Shared Access Signature (SAS) URI is also supported.
PARAMETERS
-Destination <Uri>
Specifies a URI to a blob in Microsoft Azure Blob Storage. SAS in URI input is supported. However, in patching scenarios the destination cannot be a
SAS URI.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-LocalFilePath <FileInfo>
Species the file path of the local .vhd file.
Required? true
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-NumberOfUploaderThreads <Int32>
Specifies the number of threads to use for upload.
Required? false
Position? 3
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-BaseImageUriToPatch <Uri>
Specifies an URI to a base image blob in Azure Blob Storage. SAS in URI input is supported as well.
Required? false
Position? 4
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-OverWrite [<SwitchParameter>]
Specifies that this cmdlet deletes the existing blob in the specified destination URI if it exists.
Required? false
Position? 5
Default value False
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Profile <AzureSMProfile>
Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-InformationAction <ActionPreference>
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-InformationVariable <String>
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
-------------------------- Example 1: Add a VHD file --------------------------
PS C:\\>Add-AzureVhd -Destination "http://contosoaccount.blob.core.windows ... eimage.vhd" -LocalFilePath "C:\\vhd\\Win7Image.vhd"
This command adds a .vhd file to a storage account.
-------------------------- Example 2: Add a VHD file and overwrite the destination --------------------------
PS C:\\>Add-AzureVhd -Destination "http://contosoaccount.blob.core.windows ... eimage.vhd" -LocalFilePath "C:\\vhd\\Win7Image.vhd"
-Overwrite
This command adds a .vhd file to a storage account.
-------------------------- Example 3: Add a VHD file and specify the number of threads --------------------------
PS C:\\>Add-AzureVhd -Destination "http://contosoaccount.blob.core.windows ... eimage.vhd" -LocalFilePath "C:\\vhd\\Win7Image.vhd"
-NumberOfThreads 32
This command adds a .vhd file to a storage account and specifies the number of threads to use to upload the file.
-------------------------- Example 4: Add a VHD file and specify the SAS URI --------------------------
PS C:\\>Add-AzureVhd -Destination "http://contosoaccount.blob.core.windows ... 3-01-09T23
%3A10%3A49Z&sr=b&sp=w&sig=13T9Ow%2FRJAMmhfO%2FaP3HhKKJ6AY093SmveOSIV4%2FR7w%3D" -LocalFilePath "C:\\vhd\\win7baseimage.vhd"
This command adds a .vhd file to a storage account and specifies the SAS URI.
RELATED LINKS
Save-AzureVhd