简体   繁体   中英

Azure VM: OS disk size

After creating a Windows Server Virtual Machine in Azure I noticed that the OS disk (C: drive) is only 30GB in size.

My impression was that all new VMs have 127GB OS disk size. ( Expand the OS drive of a Windows VM in Azure )

Could someone clarify please?

Edit

Also, I was creating a VM using my MSDN subscription - could that be the cause of this?

Edit 2

I managed to increase the OS drive size by running the following (as described in linked article above). Then I had to resize the disk inside the OS.

Login-AzureRmAccount
Select-AzureRmSubscription -SubscriptionName 'my-subscription-name'
$rgName = 'my-resource-group-name'
$vmName = 'my-vm-name'
$vm = Get-AzureRmVM -ResourceGroupName $rgName -Name $vmName
Stop-AzureRmVM -ResourceGroupName $rgName -Name $vmName
# Set the size to whatever is needed.
$vm.StorageProfile.OSDisk.DiskSizeGB = 1023
Update-AzureRmVM -ResourceGroupName $rgName -VM $vm
Start-AzureRmVM -ResourceGroupName $rgName -Name $vmName

You are correct, saw that yesterday. A way to circumvent this for the moment: I am using ARM to create the VMs, and now you can specify the disk size (to 60GB or 200GB, whatever you want), but the actual C partition is only 30GB. You need to go to Computer Management and expand the size of the C partition to occupy the entire disk. Also, if using ARM for provisioning, you could use the previous SKU version of the Windows 2012 R2 / Windows 2016 OS image. Hope that helps anyone!

The disk size has been changed from 127GB to 30GB by Microsoft yesterday. But that size is way too small. Once you install some applications your disk is full. It has to do with the way managed disks are invoiced. Allocated space instead of used space.

Solution:

  1. shutdown VM
  2. change size of OS disk
  3. start VM
  4. extend volume in disk management

Microsoft did the change without informing their clients, changing documentation,... waiting for news from the account manager but that is the info I got from technical contact.

默认情况下,会为临时文件创建一个临时 vhd,因此我们需要添加一个磁盘来存储 os...默认的第二个磁盘是自动为 Os 添加的(例如在 A1 basic 中,临时磁盘为 40 Gb,并且第二个磁盘是 127 Gb)需要计算这个额外的第二个磁盘以进行价格估算(默认情况下它应该在计算器中) Frederic。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM