Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Sunday, July 28, 2013 5:55 PM
I'd like to change the host cache setting from None to ReadOnly. I tried the powershell Set-AzureDataDisk but nothing happens. When I run the command I get no error and the c: prompt is returned. Any help much appreciated.
See below:
PS C:\> Select-AzureSubscription "MySubscripton" | Get-AzureVM "myapp1.cloudapp.net" -name "MyVM" | Set-AzureDataDisk -LUN 2 -HostCaching ReadOnly | Update-AzureVM
All replies (4)
Sunday, July 28, 2013 6:13 PM âś…Answered
Try using intermediate objects rather than piping so you can ensure that they're populated correctly after each command. I think Get-AzureVM requires the -Service parameter too: http://msdn.microsoft.com/en-us/library/windowsazure/jj152849.aspx.
Note that you can also change the cache setting using the management portal.
Sunday, July 28, 2013 10:20 PM
Try using intermediate objects rather than piping so you can ensure that they're populated correctly after each command. I think Get-AzureVM requires the -Service parameter too: http://msdn.microsoft.com/en-us/library/windowsazure/jj152849.aspx.
Note that you can also change the cache setting using the management portal.
Thanks Tabrez! After further reading I found I had to import my azure subscription and then select it. After that the command worked.
Just curious....where in the management portal can you change the cache setting? I looked everywhere for it with no luck.
Sunday, July 28, 2013 11:13 PM | 3 votes
Go to Virtual Machines, and then select the Disks tab. After you select a disk that's attached to a VM, you can select the Edit Cache option.
Sunday, July 28, 2013 11:21 PM
Got it! Wow, I looked under Virtual Machines 20 times and didn't notice that option. I kept drilling into the VM of interest looking for a disk option versus looking on the top page. Ugh! I guess the good news is I got to learn a little powershell. :) Thanks much!