

New-AzureVMConfig -Name $vmname -InstanceSize $size -ImageName $imgname |Īdd-AzureProvisioningConfig -Windows -AdminUsername $user -Password $pwd | In PowerShell you need to execute the following statements: $imgname = 'a699494373c04fc0bc8f2bb1389d6106_' We will start with the latest Windows Server 2012 R2 image.

We can either start from one of the standard Windows images in the Gallery or use a VHD we have created before. Create VMįirst, we need to create the virtual machine in Windows Azure. You could also use the Windows Azure Portal and configure the VM within a RDP session. You can download the cmdlets for Windows Azure here. In order to automate the procedure of setting up a virtual machine with a persistent D: drive we are going to use PowerShell.

So if you want to use D: as a persistent data disk, read on…

because you changed the VM size in the portal). Data on this scratch disk is volatile in a sense that it will get lost whenever your VM will be relocated to another physical host (e.g. It’s rather disk space provided by the specific Hyper-V host of your VM. Additionally, each VM gets a scratch disk labeled as D: which is NOT persisted in blob storage. Or your corporate policy mandates installing applications on D.īy default, Windows VMs in Windows Azure host their operating system on drive C: as a persistent data disk located in blob storage. For example, you might want to migrate an existing Windows application to the cloud without change and this app is relying on data being stored on the D: drive. Quite often people want to use the D: drive in a Windows Azure VM for their apps or data.
