web页面先创建:
虚拟云服务(ServiceName): zampdmp-ds
虚拟网络(VnetName): az-dmpnetwork
新建DS13,附件800G磁盘powershell命令如下:
New-AzureStorageAccount -StorageAccountName "zampdmpds" -Location "China East" -Type "Premium_LRS"
set-AzureSubscription -SubscriptionId 6fd78691-51f4-4087-a821-f80c0e4867d8 -CurrentStorageAccountName zampdmpds
$VMImage = get-AzureVMImage -ImageName f1179221e23b4dbb89e39d70e5bc9e72__OpenLogic-CentOS-67-20160415
New-AzureVMConfig -Name ZAMPDMP-20 -InstanceSize Standard_DS14 -ImageName $VMImage.ImageName | Add-AzureProvisioningConfig -Linux -LinuxUser azureuser -Password "AdaG(sVa4A3" | Set-AzureSubNet Subnet-1 | new-azurevm -ServiceName zampdmp-ds -VnetName az-dmpnetwork -Location "China East"
get-azurevm -Name ZAMPDMP-20 -ServiceName zampdmp-ds | Add-AzureDataDisk -CreateNew -DiskSizeInGB 800 -DiskLabel VerticaSSD01 -lun 0 -HostCaching None | Update-AzureVM
注意:创建的ssd硬盘使用lun 0,从0开始,逐步递增。
获取虚拟机模板文件命令:
Get-AzureVMImage
Centos6.7 的模板ID: f1179221e23b4dbb89e39d70e5bc9e72__OpenLogic-CentOS-67-20160415
删除一个空磁盘,可以先附件到一个虚拟机上,然后删除整个虚拟机连带该磁盘,最后通过下面命令删除存储空间
Remove-AzureStorageAccount -StorageAccountName "dmpssdstorage"