VMware - Increase boot disk size

Hi all,

I know this question has been asked many times before but i have a specific question around the use of GPart with server 2008.

I have a number of VMware guest servers (2003 and 2008) that i need to increase the C:
b
I have a esxi 3.5 test server that im going to test the process on a 2008 machine. Ive already come up against a problem. WIth the settings of the VM it has been allocated 20gb the maximum size has been set to 45gb when i boot to the gpart application there is no allocated disk available to increase the size of the disk. Im not entirely sure how i create more disk space to allow me to use gpart to increase the disk???

DO i have to increase the vmdk file? if so how do i do this?
MJB2011Asked:
Who is Participating?
 
Andrew Hancock (VMware vExpert / EE MVE^2)Connect With a Mentor VMware and Virtualization ConsultantCommented:
If you have any snapshots present, resize of disk is not supported. So you must remove any snapshots.

Always remember you've got to functions to complete to perform a resize

1. Increase the virtual disk size, using VI Client.
2. Increase the partition size in the OS.

VMware Converter can do this in one operation, and also you have a rollback plan, if things go wrong.

otherwise options are:-

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
 
coolsport00Commented:
With 2K8, you don't need to use GParted. What you do is rt-click the VM -> Edit Settings, then click on Hard Disk and increase the size to what you want. Then, log into Windows, open Disk Mgmt, rt-click on the volume you increased, then select Expand/Extend.
0
 
coolsport00Commented:
If you do wanna use GParted (not sure why since in Win7/W2K8 increasing the partition is now native to the OS), you would follow the same procedure I outlined above -> rt-click the VM -> Edit Settings, then click on Hard Disk and increase the size to what you want; then boot into the GParted ISO, then slide the partition size all the way to the right for the full partition size you allocated the disk to.

~coolsport00
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Yes, you need to increase the VMDK size.

The easiest method, without messing with Gpart of increasing the size of the VMDK is to use VMware Converter Standalone, to create a V2V.

Download VMware vCenter Converter 4.3 here
http://downloads.vmware.com/d/info/datacenter_downloads/vmware_vcenter_converter_standalone/4_0

Download VMware vCenter Converter 5.0 here
http://downloads.vmware.com/d/info/infrastructure_operations_management/vmware_vcenter_converter_standalone/5_0
0
 
MJB2011Author Commented:
Hi,

I have increased the disk size on the VM but it has only increased the "maximum size" (45GB). The "Disk size" is still showing as (20Gb). However when i go into DIsk manager in windows there is no option to increase the disk (i didnt think this was possible anyway because its the master boot disk?)).
0
 
coolsport00Commented:
Is this 2K8 or 2K3? If 2K8, rt-click the disk and select Expand/Extend. If 2K3, you have to use GParted and follow procedure I outlined above
0
 
MJB2011Author Commented:
Its 2008 as per my previous post - the extend option is not available when right clicking on the disk.
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
When you look in Disk Management, can you see any unallocated disk space, or just a C: drive which is 20GB?
0
 
MJB2011Author Commented:
Just 20 GB
0
 
coolsport00Commented:
Are you rt-clicking on the Disk part on the left side, or the partition area on the right? See pic in this URL:
http://www.networknet.nl/apps/wp/archives/475
0
 
coolsport00Commented:
Does this virtual disk in the VM's setting show the disk at 45GB or 20GB?
0
 
MJB2011Author Commented:
It seems that i havent managed to increase the VMDK size by editing the settings.
0
 
coolsport00Commented:
Ok...well yes...you need to change that first. Then click 'OK' out of the Settings. Then you should be able to Extend the Disk in Disk Mgmt.
0
 
MJB2011Author Commented:
DIsk size 20gb. Max size 45GB
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
I think I would use VMware Converter, to create a new VM, based on a conversion, and in the process, select a new disk size of 45GB, the disk size and partition modifications will be completed in once process.
0
 
coolsport00Commented:
Change the virtual disk size to 45 (manually) in VMs Edit Settings area, then click 'OK' to close the Settings window. Go into the 2K8 OS in Disk Mgmt, rt-click on the Disk and select 'Extend'......assuming you see the unallocated space there on the right.
0
 
MJB2011Author Commented:
OK Hanccocka.

Coolsprt00: i have done this but my ckanges to the disk are not being registered. If i increase to 35 and select OK the task is registered as a success but then when i go back in its still reads 20GB?
0
 
coolsport00Commented:
Hmm...wierd. Should be there. Not sure why it's not. I assume you have enough space on the datastore the virtual disk is on to increase it like you want?
0
 
MJB2011Author Commented:
Yes i have.
0
 
coolsport00Commented:
Wierd behavior for sure. You can test GParted, use Converter like @hanccocka suggests, or you can do another way:
-Power down VM
-Detach the sys volume virt disk (remove from VM, do NOT select remove and delete)
-Attach this virt disk to another VM
-Go into Edit the Settings of this 2nd VM and increase the size of the virt disk you just attached to it
-Use diskpart in cmd prompt to resize the partition in the OS (or try Disk Mgmt if 2K8)
-If it works, remove the virt disk from this 2nd VM (again, just select remove from VM, do NOT select remove and delete)
-Reattach this virt disk to orig VM and power the VM on.
-Should now be at size you want
Before using procedure above, make a b/u; obviously if you do a V2V, you don't need a b/u because you have the source VM already. After the Conversion, you just power down the source VM and power on the newly created one.
0
 
coolsport00Commented:
Also...something I forgot to ask...do you have snapshots? If so, that may be the reason why you are not able to do the Extend. If you do, try removing them, then do the disk increase. Or...again...you can just use Converter. Converter automatically consolidates snaps a VM has during the conversion.
0
 
MJB2011Author Commented:
Had to add and remove snap for it to work for some reason. But that worked fine with 2008.

As for my 2003 servers. Are we saying that VtoV is going to be the safest option?
0
 
coolsport00Connect With a Mentor Commented:
I think most would suggest a V2V for disk resizing, but other alternatives are available (using GParted, detaching virt disk & adding to another to do the resize then reattaching to orig VM). It's quicker to use a method other than V2V, but yes, I would agree that V2V is the safest. It does a few things as already mentioned -> it will consolidate snaps for you (so, no worries or extra step there), no b/u is needed because you have 2 VMs after the Conversion is complete (source and new destination VM), and you can modify not only disk size (tho that's been our focus here), but other options that you may wanna change (RAM, CPU, etc.). When modifying disk size using GParted, I've been mostly successful, but there was an instance with 1 VM where the virt disk got corrupted and I couldn't power it on after the virt disk modification. So, for 2K3 (or XP...any Win OS pre-Win7/W2K8), you can either V2V, detach virt disk, or use GParted for the sys volume partition. If it's a non-sys volume, it's as simple as increasing the disk size in the VM Settings, then using diskpart in the Win OS to increase the partition.

Regards,
~coolsport00
0
 
MJB2011Author Commented:
1 more question.

If i was to use the Clone before using the GParted tool, Would the clone be a acceptable method of backing up incase anything goes wrong?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.