Reputation: 21
One of my Azure instance C drive is getting full, is there any way to extend Azure Instance C drive size without getting impacted.
OS: is Windows 2008 R2
Upvotes: 2
Views: 4688
Reputation: 1
$rgName = Read-host "Enter Resource GroupName"
$vmName = Read-host "Enter Machine Name"
Obtain a reference to your VM :
$vm = Get-AzureRmVM -ResourceGroupName $rgName -Name $vmName
Stop the VM before resizing the disk as follows:
Stop-AzureRmVM -ResourceGroupName $rgName -Name $vmName
Expand the Size for OS Disk to 1TB:
$vm.StorageProfile.OSDisk.DiskSizeGB = 1023
Update-AzureRmVM -ResourceGroupName $rgName -VM $vm
Start-AzureRmVM -ResourceGroupName $rgName -Name $vmName
Upvotes: 0
Reputation: 30903
There is no way to increase the size of an OS Disk as of today (2015-02-05). And the maximum allowed size for OS disk is 128GB. Take a deep read into the About Virtual Machine Disks in Azure.
You can resize Data Disks though. Although, the maximum size of a Data Disk is 1 TB and I don't see a reason to create smaller Data Disk. You are billed only for the actually occupied bytes anyway.
Having said that - you have to change the way you install and configure software on your Azure VM. There is no need to store any TEMP, LOG or IIS folders on the OS Disk. There also no absolute need to install applications on the OS Disk.
Upvotes: 2