vmware vmdk to azure
- Category: 電腦相關
- Last Updated: Tuesday, 20 December 2016 23:29
- Published: Tuesday, 15 November 2016 17:32
- Written by sam
When you done with your vm, and upload to azure
Here is
Download tools from Microsoft
Open "Powershell" with administrator authorization and import
Import-Module "C:\Program Files\Microsoft Virtual Machine Converter\MvmcCmdlet.psd1"
Converto vhd (replace column to fit you setting)
PS C:\Windows\system32> ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath "d:\vm-elk\elk.vmdk" -DestinationLiteralPath "D:\" -VhdType DynamicHardDisk -VhdFormat Vhd
Azure login
PS C:\Windows\system32> add-azureaccount
Id Type Subscriptions Tenants
-- ---- ------------- -------
This email address is being protected from spambots. You need JavaScript enabled to view it. User 092d4vf2-0252-4a1b-9bc2-32jdg08d7fsb7 {cd7f6287-476e-1327-a4eb-096c10d36cc6}
MD5
PS C:\Windows\system32> Add-AzureVhd -Destination https://123.blob.core.windows.net/vhds/acc.vhd -LocalFilePat
h d:\elk.vhd
MD5 hash is being calculated for the file D:\elk.vhd
MD5 hash calculation is completed.
Elapsed time for the operation: 00:00:45
Creating new page blob of size 10717418752...
Slow upload
Uploading
0.6% complete; Remaining Time: 21:39:52; Throughput: 0.4Mbps
[ ]
剩餘時間: 21:39:52。
Register VHD is an OS DISK
PS C:\Windows\system32> Add-AzureDisk -diskname 'ACC' -medialocation https://123.blob.core.windows.net/vhds/ABC.vhd -label 'AAAAA' -os Linux
AffinityGroup :
AttachedTo :
IsCorrupted : False
Label : AAAAA
Location : East Asia
DiskSizeInGB : 10
MediaLink : https://123.blob.core.windows.net/vhds/ABC.vhd
DiskName : ABC
SourceImageName :
OS : Linux
IOType : Standard
OperationDescription : Add-AzureDisk
OperationId : 82037140-fbf1-3319-bafe-f3dfb6c8f59d
OperationStatus : Succeeded
Done