直接上步骤:
1,首先下载一个microsoft azure powershell.
2,打开这个microsoft azure powershell.
键入:Get-AzurePublishSettingsFile
会自动弹出一个窗口让你下载一个文件,下载下来并复制文件完整路径。
随后键入,导入文件:
Import-AzurePublishSettingsFile "文件完整路径"
键入:New-AzureStorageAccount -StorageAccountName "存储名称" -Location "China East" -Type "Premium_LRS
并配置成默认存储账户,键入:
Set-AzureSubscription -CurrentStorageAccountName "shadowtest" -Subscriptionid 406fdb2e-815e-4bed-a2fa-9a5c1b46608d(你自己的subID)
4,键入:
$serviceName = "自定义"
$location = "China East"
$vmSize ="Standard_DS3" (这里以DS3系列为例)
$adminUser = "testuser"
$adminPassword = "1q2w3e4r!"
$vmName ="自定义1"
New-AzureService -ServiceName "自定义" -Location $location
$OSImage = Get-AzureVMImage –ImageName "f1179221e23b4dbb89e39d70e5bc9e72__OpenLogic-CentOS-65-20150325"
$vm = New-AzureVMConfig -Name $vmName –InstanceSize $vmSize -ImageName $OSImage.ImageName
Add-AzureProvisioningConfig -Linux –LinuxUser $adminUser -Password $adminPassword –VM $vm
New-AzureVM -ServiceName $serviceName -VM $vm
就完成啦~需要挂磁盘的话就回到portal上去挂,直接就是SSD的啦。