Before you can create a virtual machine you need to create a 'disk' over the blob copy. This can be done using the Add-AzureDisk
Then you can create a Virtual Machine over an existing disk using New-AzureVMConfig
and New-AzureVM
, example of this has been published here -
$vmI1 = New-AzureVMConfig -Name $machineName -InstanceSize Small -AvailabilitySetName 'RDGW' -DiskName 'MY-OS-Disk-Name' |
Add-AzureDataDisk -Import 'My-Data-Disk-0' -LUN 0 |
Add-AzureDataDisk -Import 'My-Data-Disk-1' -LUN 1 |
Add-AzureEndpoint -Protocol tcp -LocalPort 443 -PublicPort 443 -Name 'HTTPs' |
Set-AzureSubnet $_subnetInternal, $_subnetDmz, $_subnetProtected
This creates the VM configuration which is then passed to New-AzureVM