[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 22440
  • Last Modified:

Unable to increase virtual disk - Provisioned Size greyed out.

I am attempting to increase the size of a thick virtual disk, however the Provisioned Size field in the Virtual Machine Properties screen is greyed out.  This is not the case with the other guests on the host.  I have one other guest with the same issue, and both of these have a disk file for Hard Disk1 in the format [STORENAME] SERVERNAME/SERVERNAME-000001.vmdk.  All other guests have disk files for Hard Disk1 in the format [STORENAME] SERVERNAME/SERVERNAME.vmdk.  I would prefer to increase the size without an outage.
0
bradpink
Asked:
bradpink
1 Solution
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
This is due to the fact that your Virtual Machine disk has a snapshot attached.

Remove/Delete the Snapshot, and if the DISK is SCSI, you should be able to increase the physical disk size.

and then  you will need to increase the OS partition.

How to Resize a Partition after Disk Expansion

To re-size a disk, select the Virtual Machine, Select Edit Settings, Highlight the Virtual Hard Disk, and select Edit
there is an option to increase size. This only changes the physical size of the virtual disk, it does not grow the partition on the disk. See below.


Before making any changes to the partition structure of the disk, ensure you have a full backup, not a snapshot.

1. Resize partition with Gparted Live CDROM

i. Download Gparted Live CDROM (http://gparted.sourceforge.net/livecd.php).

ii. Upload the cdrom iso to the vSphere ESX/ESXi datastore.

iii. Mount the cdrom or iso on the virtual machine.

iv. Shutdown and restart the virtual machine booting from the cdrom.


v. Select Resize partition.

Here is a Tutorial Walkthorugh of how to resize a partition with a GParted Live CDROM

http://gparted.sourceforge.net/larry/resize/resizing.htm

http://www.howtogeek.com/howto/windows-vista/using-gparted-to-resize-your-windows-vista-partition/


2. Using DISKPART.exe

(the system disk cannot be re-sized within the virtual machine, but other disks can be resized, eg. D: E: etc

i. Shutdown the virtual machine.
ii. Remove disks from virtual machine (but do not delete them).
iii. Add the disks to another virtual machine.
iv. Start up virtual machine.
v. Use Diskpart in the OS to extend disks.

see here for details on Diskpart usage

http://support.microsoft.com/kb/325590

3.Use VMware Converter Standalone to complete a V2V (virtual to virtual conversion).
there is an option to increase or decrease the size of target disks on the desintation at conversion.

Download VMware vCenter Converter here

http://downloads.vmware.com/d/info/datacenter_downloads/vmware_vcenter_converter_standalone/4_0

VMware vCenter Converter Standalone 4.x Documentation

http://www.vmware.com/support/pubs/converter_pubs.html

VMware vCenter Converter Standalone 4.3 User Guide

http://www.vmware.com/pdf/convsa_43_guide.pdf

For the conversion steps, read fellow Expert Bestway's article.

http://www.experts-exchange.com/Software/VMWare/A_3639-VMware-vConverter-P2V-for-Windows-Servers.html

Best Practice Video Guide here

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1004588

Also the VMware KB here

http://kb.vmware.com/kb/1004071
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
If the Virtual Server is 2008 or 2008 R2, you will be able to re-size the disk, and the partition inside.

By using disk management.

But I would recommend, making a FULL backup of the virtual machine, not a snapshot, before any disk or partition modification.

Select the Virtual Machine, Select Snapshot, Snapshot Manager, and Delete the Snapshot.
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
You may not have created the Snapshot, it could be left over by a third party backup program. Before you try to delete, make sure you have enough disk space, if the snapshot is large and has been running for a while, it could take many hours or days to merge the delta disk with the main virtual machine. Please be patient, and wait for this to complete, it is likely to sit at 95% for a long time, it has not crashed or hung. Just brave it out, and let it comlplete.

Many impatient VMware Admins - fiddle, and do not let the snapshot complete correctly, which ends up with a corrupted VM disk.

A snapshot is NOT a backup of a VM; that is a gross misconception.  

A snap shot is a way to preserve a point in time when the VM was running OK before making changes. A snapshot is NOT a way to get a static copy of a VM before making changes.  When you take a snapshot of a VM what happens is that a delta file gets created and the original VMDK file gets converted to a Read-Only file.  There is an active link between the original VMDK file and the new delta file.  Anything that gets written to the VM actually gets written to the delta file.   The correct way to use a snapshot is when you want to make some change to a VM like adding a new app or a patch; something that might damage the guest OS. After you apply the patch or make the change and it’s stable, you should really go into snapshot manager and delete the snapshot which will commit the changes to the original VM, delete the snap, and make the VMDK file RW. The official stance is that you really shouldn’t have more than one snap at a time and that you should not leave them out there for long periods of time. Adding more snaps and leaving them there a long time degrades the performance of the VM.  If the patch or whatever goes badly or for some reason you need to get back to the original unmodified VM, that’s possible as well.  

I highly recommend reading these 2 articles on VMware Virtual Machine Snapshots:

Understanding Snapshots - http://kb.vmware.com/kb/1015180
Snaphot Best Practices - http://kb.vmware.com/kb/1025279

Also check out the following Snapshot Articles by Eric Siebert

Pt.1- http://is.gd/Lajg4p
Pt.2- http://is.gd/NdKQWC
Pt.3- http://is.gd/tp2vEK
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
coolsport00Commented:
Since you have snapshots attached to this VM, what you need to do first is remove them. Rt-click on the VM -> Snapshot Manager -> then select to 'Delete All' snapshots. This will remove the snapshots you have, while committing the data in the snap(s) to the parent virtual disk. (i.e. no data loss) After your snapshot(s) are removed, there may or may not be downtime. IF you have a 2K8 VM, all you need to do is go into your VMs Edit Settings area then modify the disk size to the size you want (should now be enabled due to having no more snapshots). After you modify the virtual disk, go into Disk Mgmt, rt-click on the disk/volume, and choose Expand/Extend. If this is a W2K3/XP VM, there may be some downtime, albeit minimal. If this is a non-system volume you want to extend (on W2K3 or XP VM), you can change the disk size in the VM's Edit Settings, then use the diskpart tool within Windows to extend the partition in the OS (no downtime). If it is a sys volume that needs extended, you can use either GParted or Paragon, or other 3rd party tool. Or, you can use Converter Standalone (or Converter plug-in within vCenter if you have vCenter) to do a V2V, which will do several things for you - it will commit all your snapshots for you so no need to go into Snap Mgr, and during the Convert wizard, you can modify the VM virt disk size to the size you want. There is a bit of downtime as you need to power down the source VM and then power up the converted VM.

Another option for you, if this is a W2K3 or WinXP VM sys volume, which does have some (again, minimal) dowtime, is to detach the virtual disk sys volume from the orig VM, add the virt disk to another VM as a non-sys volume, then modify the disk size & use diskpart in the guest OS to extend the partition. Once complete, re-attach to the orig VM.

Regardless of the method you use, make sure to have a backup (well, if using Converter, not really needed...you have 2 copies of the VM...source and dest).

Regards,
~coolsport00
0
 
ajjmunozCommented:
If you don't feel like dealing with any of the above situations, you could migrate the VM to a different datastore and in the process be provided the option to change the disk type (obviously the above items would ungrey the setting if already a thin provisioned disk). The bad part is that it will require you to remove any type of snapshots before the migration will be able to take place. The good part is that it's a quick way to fix your problem.

Remember that this fixes the thick provisioning part of the VM but you will still need to resize the disk in the operating system. If it's server 2008, then you'll be able to do it while the OS is running and you are logged in. Same with Windows 7. If you have server 2003 or older (XP, 2000, etc..) then you'll have to use one of the "boot disk" solutions above.
0
 
prak_seafarerCommented:
1. If you want to increase the disk size, make sure you have sufficient space in the datastore.
2. You will have to shutdown the vm in order to make changes and have the increased disk size detected by the vm's OS.
3. after you have shutdown the vm edit the settings and increase the size.
4. for windows download dell extpart inside the vm and unzip it using winzip.
5. you can read the readme file in the extracted folder for instructions. you have to give the additional size which you have increased.

hope this resolves your issue.

-prakash
0
 
bradpinkAuthor Commented:
Resolved in the first sentence - "snapshot attached".  Used Dell's "extpart" partition resizer to do this on the fly.  It's tiny, takes seconds and is free!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now