VMware vSphere

 View Only
  • 1.  Change Hard Drive size while on?

    Posted Jul 07, 2010 11:54 PM

    Hi

    I was wondering if you could increase the size of a VM's hard drive while the VM is still powered on?

    Its not greyed out so im assuming you can?

    If so is there any draw backs, I would normally power off the VM then change it.

    Thanks

    Mike



  • 2.  RE: Change Hard Drive size while on?
    Best Answer

    Posted Jul 08, 2010 12:05 AM

    defrogger,

    Yes you can, no power off or reboot required. There are no drawbacks, but there are a couple of caveats. First, it must be Windows 2000 SP4 (you may need the DiskPart.exe from here) or newer and second, it cannot be the OS boot drive.

    For example, if it's your drive D:\, then you can use the vClient to edit the Hard Disk 2 virtual disk with the new size. Login to Windows and open a cmd prompt.

    C:\Windows\System32> diskpart

    DISKPART> list volume

    DISKPART> select volume X ( X is number of the volume with the new capacity )

    DISKPART> extend

    DISKPART> exit

    Check Disk Management to verify the new capacity.

    This KB article has a step-by-step video:

    KB1007266

    Jonathan

    Please award points if this is helpful.



  • 3.  RE: Change Hard Drive size while on?

    Posted Jul 08, 2010 12:39 AM

    If it IS the boot drive, then you can still resize it, you'll just need to go through a different process. Probably the easiest is to resize the vdisk, then attach it to another VM (running the same OS) and apply the diskpart commands to make the formatted partition fill the drive. IF the VM is Server 2008 or Windows 7, then you don't even need to do that. Just reboot and have the partition fill the rest of the drive. If I recall correctly, you can do that from the Storage Manager/Disk Managment console (within the VM)... This is new to Windows 7 and Server 2008...

    Network Administrator

    VMware VCP4

    Consider awarding points for "helpful" and/or "correct" answers.



  • 4.  RE: Change Hard Drive size while on?

    Posted Jul 08, 2010 12:42 AM

    Good point golddiggie,

    I didn't mention the Boot OS option because the question was "Change Hard Drive size while on".

    Do you have a link with the changed behavior for resizing volumes in Windows 7/ 2008? That would be pretty handy.

    Thanks,

    Jonathan



  • 5.  RE: Change Hard Drive size while on?

    Posted Jul 08, 2010 04:24 AM

    Windows 2008 can now be done on the fly without a reboot.

    http://www.petri.co.il/expanding-boot-volumes-for-server-2008-vm.htm






    If you found this or any other post helpful please consider the use of the Helpful/Correct buttons to award points



  • 6.  RE: Change Hard Drive size while on?

    Posted Jul 08, 2010 07:42 AM

    >If it IS the boot drive, then you can still resize it, you'll just need to go through a different process.

    Dell ExtPart can extend boot partition online.


    ---

    MCSA, MCTS Hyper-V, VCP 3/4, VMware vExpert

    http://blog.vadmin.ru



  • 7.  RE: Change Hard Drive size while on?

    Posted Jul 10, 2010 03:03 PM

    Thanks for the Replies everyone, definitly helpful

    Mike



  • 8.  RE: Change Hard Drive size while on?

    Posted Jul 10, 2010 04:06 PM

    Here's a couple of blog posts that show how to do it using both Dell's ExtPart utility as well as the native functionality in Windows 2008.

    Windows 2008:

    http://blogs.kraftkennedy.com/index.php/2009/09/14/expand-windows-2008-boot-volumes-with-no-downtime/

    Dell ExtPart:

    http://blogs.kraftkennedy.com/index.php/2009/06/30/expand-virtual-machine-boot-volumes-with-no-downtime/