1

In azure cloud when you start a windows image the running vm will have a temporary drive D: where the page file is set.

Is any way I can call the api (powershel, az cli etc.) and be able to specify which letter to assign to the temporary drive ? I want for example to have the disk C: as OS and disk Z: for the temporary drive.

thanks,

ps: i know how to change it after the vm is running as per https://docs.microsoft.com/en-us/azure/virtual-machines/windows/change-drive-letter

2 Answers 2

0

You could run a DSC script using the Azure VM extension to do the drive letter change at deployment/start time. An example of how to do this is here: https://github.com/perktime/MoveAzureTempDrive

0
0

There is no Azure API that will allow you to change this at deploy time. You will need to do it after deployment using tools like DSC, or Script. You can bake this into an ARM template so it happens right after your VM deploys using either the DSC or Custom Script extension.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .