Bring your own VHD to Azure (uploading and Downloading VMs to Azure)

Want to move workloads into Azure?

Microsoft Azure has a few options, one of the easiest ways is with Microsoft Azure PowerShell.

$source = “D:\VirtualMachines\MyVm\**OS-DISK**.vhd”
$destination = “https://**mystoragepath**.blob.core.windows.net/vhd/**OS-DISK**.vhd”
 
Add-AzureVhd -LocalFilePath $source -Destination $destination -NumberOfUploaderThreads 5

Once the VHD file has been uploaded, it must be registered as either a OS disk or an additional disk. Use the “-OS” switch to specify whether it is a Linux or Windows OS.

Add-AzureDisk -DiskName ‘**OS-DISK**’ -MediaLocation $destination -Label ‘**OS-DISK**’ -OS Windows *** or Linux

Create a new Cloud/VM and attach the new **OS-DISK**
New-AzureVMConfig -DiskName ‘**OS-DISK**’ -Name ‘**OS-DISK**’ -InstanceSize **small** | Add-AzureDataDisk -Import -DiskName ‘**OS-DISK**’ -LUN 0 | New-AzureVM -ServiceName ‘*CLOUDNAME*’ -Location ‘**West US**’

To download the VHD from Azure the following can be used:

$source = “https://**mystoragepath**.blob.core.windows.net/vhd/**OS-DISK**.vhd”
$destination = “D:\VirtualMachines\MyVm\**OS-DISK**.vhd”

Save-AzureVhd -Source $source -LocalFilePath $destination -NumberOfThreads 5

For Physical or VMWare machines, the Microsoft Virtual Machine Converter 3.0 tool can be used.

http://www.microsoft.com/en-us/download/details.aspx?id=42497

Want to streamline the process ever more for Physical, Hyper-V or VMWare??? Take a look at Azure Site Recovery.

http://azure.microsoft.com/en-us/services/site-recovery/

 

 

Leave a Reply