Ű VHD VM ASM (manage.windowsazure.com) , ARM (portal.azure.com) ϴ.
ASM Azure Portal VHD Ͻð ϵ OS ũ(Market place My Disk ̰ ˴ϴ) VM ø ˴ϴ.
ARM Azure Powershell ž մϴ.
$rgname = "the resource group name of the new VM"
$loc = "the region of the resource group"
$vmsize = "<VM Size>
$vmname = "specify the name for the new VM"
$vm = New-AzureRmVMConfig -VMName $vmname -VMSize $vmsize;
$vNet = Get-AzureRmVirtualNetwork -ResourceGroupName $rgname
$pip = New-AzureRmPublicIpAddress -ResourceGroupName $rgname -Location $loc -Name specify a name for the public network -AllocationMethod Dynamic
$newNic = New-AzureRmNetworkInterface -ResourceGroupName $rgname -subnetid $vNet.Subnets[0].id -Name specify a name for the network interface -location $loc -PublicIpAddressId $pip.Id
$nic = Get-AzureRmNetworkInterface -Name "the name of the network interface" -ResourceGroupName $rgname
$nicId = $nic.Id
$vm = Add-AzureRmVMNetworkInterface -VM $vm -Id $nicId
$osDiskName = "specify a name for the new OS disk"
$osDiskVhdUri = "the path of the VHD file that you just copied before"
$vm = Set-AzureRmVMOSDisk -VM $vm -VhdUri $osDiskVhdUri -name $osDiskName -CreateOption attach -Windows
New-AzureRmVM -ResourceGroupName $rgname -Location $loc -VM $vm
Azcopy ø ˴ϴ.(http://aka.ms/downloadazcopy)
https://azure.microsoft.com/en-us/documentation/articles/storage-use-azcopy/
Ű VHD VM ASM (manage.windowsazure.com) , ARM (portal.azure.com) ϴ.
ASM Azure Portal VHD Ͻð ϵ OS ũ(Market place My Disk ̰ ˴ϴ) VM ø ˴ϴ.
ARM Azure Powershell ž մϴ.
$rgname = "the resource group name of the new VM"
$loc = "the region of the resource group"
$vmsize = "<VM Size>
$vmname = "specify the name for the new VM"
$vm = New-AzureRmVMConfig -VMName $vmname -VMSize $vmsize;
$vNet = Get-AzureRmVirtualNetwork -ResourceGroupName $rgname
$pip = New-AzureRmPublicIpAddress -ResourceGroupName $rgname -Location $loc -Name specify a name for the public network -AllocationMethod Dynamic
$newNic = New-AzureRmNetworkInterface -ResourceGroupName $rgname -subnetid $vNet.Subnets[0].id -Name specify a name for the network interface -location $loc -PublicIpAddressId $pip.Id
$nic = Get-AzureRmNetworkInterface -Name "the name of the network interface" -ResourceGroupName $rgname
$nicId = $nic.Id
$vm = Add-AzureRmVMNetworkInterface -VM $vm -Id $nicId
$osDiskName = "specify a name for the new OS disk"
$osDiskVhdUri = "the path of the VHD file that you just copied before"
$vm = Set-AzureRmVMOSDisk -VM $vm -VhdUri $osDiskVhdUri -name $osDiskName -CreateOption attach -Windows
New-AzureRmVM -ResourceGroupName $rgname -Location $loc -VM $vm
ٸ κ ̸ ߿ ø Ʒ Template ŵ ˴ϴ.
https://github.com/Azure/azure-quickstart-templates/tree/master/201-vm-specialized-vhd
Azure ѱ ɼ ϴ. Ȥ ?
ƽþ Azure Centos7.2 ġ µ.. VM ٿ ϳ?
ǻ DISK δ Ȯ ߽ϴ.
azcopyɾ ؾ Ұ?
azcopy ġ Ͻ ش command â
AzCopy /Source:<the VHD container path of the source storage account> /SourceKey:<The primary key of the storage account> /Dest:<the container path of the destination storage account> /Pattern:<the vhd file name> Ͻø ˴ϴ.
<the VHD container path of the source storage account> : ش VM Ӽ ȮϽ ֽϴ. "http://NAME.blob.core.windows.net/vhds/" Դϴ.
<The primary key of the storage account> : Storage account ȮϽ ֽϴ.
<the container path of the destination storage account> : ٿ PC ø ˴ϴ. "c:\vhd" ̷ ø ˴ϴ.
<the vhd file name> : vhd ̸ ø ˴ϴ.
azure ̽ŵ.
غڽϴ