Uploading a VHD File to Azure (KBA1440)
KBA
KBA#1440Applicable Delphix Versions
- Click here to view the versions of the Delphix engine to which this article applies
-
Major Release All Sub Releases 6.0 6.0.0.0, 6.0.1.0, 6.0.1.1, 6.0.2.0, 6.0.2.1, 6.0.3.0, 6.0.3.1, 6.0.4.0, 6.0.4.1, 6.0.4.2, 6.0.5.0, 6.0.6.0, 6.0.6.1, 6.0.7.0, 6.0.8.0, 6.0.8.1, 6.0.9.0, 6.0.10.0, 6.0.10.1, 6.0.11.0, 6.0.12.0, 6.0.12.1, 6.0.13.0 5.3 5.3.0.0, 5.3.0.1, 5.3.0.2, 5.3.0.3, 5.3.1.0, 5.3.1.1, 5.3.1.2, 5.3.2.0, 5.3.3.0, 5.3.3.1, 5.3.4.0, 5.3.5.0 5.3.6.0, 5.3.7.0, 5.3.7.1, 5.3.8.0, 5.3.8.1, 5.3.9.0 5.2 5.2.2.0, 5.2.2.1, 5.2.3.0, 5.2.4.0, 5.2.5.0, 5.2.5.1, 5.2.6.0, 5.2.6.1 5.1 5.1.8.0, 5.1.8.1, 5.1.9.0
Procedure
In order to upload a virtual hard disk (VHD) file to Azure, you will need a Storage Account and a Container within it to hold the file, stored as a Page Blob. The uncompressed VHD file should be accessible on your local system. For a Delphix engine, this file can be 127GB or more in size and can therefore take a considerable amount of time.
Uploading the VHD file
- Select the Storage Account in the Azure Resource Manager portal
- Navigate to the Containers section
- Select a Blob Container
- Click Upload and choose the local VHD file
Uploading the VHD file (Faster Method)
Microsoft have created a command-line utility to reduce the time taken to upload VHD files to Azure, downloadable from https://github.com/Microsoft/azure-vhd-utils. Rather than uploading the full 127GB file, it only uploads the allocated segments of the file which for a Delphix engine is significantly less and may be as little as 5GB.
In order to use it, you will need to install a runtime for Google's 'go' language. This is available via https://golang.org/doc/install.
Once 'go' is installed, use it to download and install the Microsoft VHD utility, as below. On macOS systems, an installation of Xcode may also be required from the App Store.
$ go get github.com/Microsoft/azure-vhd-utils
The following details will need to be substituted into the command line for the upload. These details are all available from the Azure portal.
- Storage account name
- Storage account access key
- Blob Container name
Assuming that 'go' was installed into your user's home directory, the following command can then be used to upload the VHD file to the Azure storage account. Substitute in the path to the local VHD file including the filename, the storage account name, the storage account's access key, the Blob container name to hold the file and the name that you would like the file to appear with in the storage account. Where parameters contain special characters, they should be surrounded by single quotes, as in the example.
$ ~/go/bin/azure-vhd-utils --verbose upload --localvhdpath 'local_path_to_VHD_file' \
--stgaccountname 'storage_account_name' --stgaccountkey 'storage_account_access_key' --containername 'container_name' \
--blobname 'chosen_name_for_uploaded_file'
With the file uploaded to the Azure storage account, an 'Image' will need to be created in Azure before virtual machines can be provisioned from the VHD file.
Creating an Image
- Go to Images in the Azure Portal.
- Click Create to create a new image.
- Provide a name and select the resource group to hold the image.
- Select the region to be used when creating a VM from the image.
- For the Delphix Engine, choose an OS type of Linux.
- Select VM generation Gen 1.
- Select the uploaded VHD file as the Storage Blob.
- Select an account type of Premium SSD.
- Read/Write caching can be used for the OS disk, although a caching policy of None for the data disks is recommended.
- Data disks can be added at a later stage, during VM deployment.
- Click Create.
Selecting the newly created image will then show the Deploy VM option to deploy a new virtual machine based on the VHD file.
Related Articles
The following articles may provide more information or related information to this article: