0
votes

I am trying to create a custom virtual machine image using a fixed size VHD through the Azure CLI but it fails (several different error messages). Though the upload speed is also quite awful (around 6kbps up).

My question is this: Does Microsoft provide any alternative means to upload/create custom VM images?

2
The other option you have is to build one locally using Hyper-V: azure.microsoft.com/en-us/documentation/articles/… - Simon W
Thanks for the help! - user2078888

2 Answers

0
votes

One of the fastest ways to upload the VHD is the AzCopy. It provides some ways to improve the things, for example, by setting multiple threads (but there are some discussions about how to do that properly).

Another way i saw was to use something like Onedrive/Dropbox - users just put the data to the share, and it was synchronized to the VM. :)

0
votes


You can upload your .vhd files and or any other files depending on your blob storage accounts using the following tool: https://azure.microsoft.com/en-gb/features/storage-explorer/

The tool allows you to select a page blob upload which is required when you upload a .vhd, if you don't upload using this blob type you will not be able to convert your .vhd to an image in order to create a VM.
You can also upload and convert the .vhd image you are creating using powershell, i would suggest checking out the following links to ensure you are on the right tracks.

https://docs.microsoft.com/en-us/azure/virtual-machines/windows/prepare-for-upload-vhd-image
https://docs.microsoft.com/en-us/powershell/module/hyper-v/convert-vhd?view=win10-ps
https://docs.microsoft.com/en-us/azure/virtual-machines/windows/create-vm-specialized


Here is an example script you should maybe look at to get an understanding of how to upload and create a VM using powershell:

https://docs.microsoft.com/en-us/azure/virtual-machines/scripts/virtual-machines-windows-powershell-upload-generalized-script

Be sure to install the Azure VM agent on the server you create the custom "specialised" .vhd from as this will allow the use of the CLI from the Azure portal as well as other helpful tools.

Let me know if you have any issues after following this, i do have a few other tricks that helped me when creating custom images from uploaded .vhds

Thanks