Solved

Resize Virtual Disk

Posted on 2009-07-06
7
1,169 Views
Last Modified: 2012-05-07
Can I resize a VMware virtual disk?
0
Comment
Question by:yakselrud
7 Comments
 
LVL 2

Expert Comment

by:maredzki
ID: 24790086
Definitely, what is the OS of the VM?
0
 
LVL 9

Expert Comment

by:sda100
ID: 24790141
Assuming you're using Vmware Workstation/Server, the proper way is to use the command-line program "vmware-vdiskmanager".

Shutdown your VM, open a command window and change directory to your VMware installation folder until you see a program called "vmware-vdiskmanager".

A sample command would be:

vmware-vdiskmanager.exe" -r "<source>" -t 1 -s 36Gb "<destination>"

However, that only increases the size of the disk.  To increase the size of the actual partition you have to do that from the guest operating system itself.

Here's the official VMware instructions:

http://pubs.vmware.com/server1/vm/wwhelp/wwhimpl/common/html/wwhelp.htm?context=vm&file=disks_server.7.33.html

Good luck!
Steve :)
0
 
LVL 19

Expert Comment

by:vmwarun - Arun
ID: 24790526
Another alternative would be to use VMware vConverter to resize the VMDK file of the VM.
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 1

Author Comment

by:yakselrud
ID: 24790658
Windows Server 2K3 and 2K8.
0
 
LVL 21

Expert Comment

by:za_mkh
ID: 24792115
With Windows 2003, if it is your system drive, you will need to normally shutdown the VM so that the disk can be expanded.
With Windows 2008, you can expand your system drive while the OS is running.
So for your windows 2003 box, if you want to grow the disk (from inside the VM) without restarting it .. I recommend this Dell Tool. Since Mike has written about it only last week ... (I feel better about myself - cause I knew about this tool for a few months already - I should start writing a blog!)
http://www.rtfm-ed.co.uk/?p=1310
 
 
0
 
LVL 24

Expert Comment

by:ryder0707
ID: 24795690
Yup you can resize disk in ESX
To be exact you can grow a virtual harddisk after it has been created but you cant shrink it
Lastly apply the method mentioned by za_mkh to expand it in Windows
See this for details http://vsphere-land.com/tips-tricks/re-sizing-virtual-disks
Good luck!
0
 
LVL 2

Accepted Solution

by:
cougar694u earned 500 total points
ID: 24797088
I use vmkfstools to extend vmdk's.

Make sure the VM is off, su - to root, run vmkfstools -X #G <path to vmdk> to extend the vmdk to ## size in GB.

Then, I typically boot from a server 2k8 iso into a command prompt and run diskpart to extend the volume.

output from vmdk:

OPTIONS FOR FILE SYSTEMS:

vmkfstools -C --createfs vmfs3
               -b --blocksize #[mMkK]
               -S --setfsname fsName
           -Z --extendfs extension-partition
   deviceName

           -P --queryfs -h --humanreadable
           -T --tovmfs3
               -x --upgradetype [zeroedthick|eagerzeroedthick|thin]
           -u --upgradefinish
   vmfsPath

OPTIONS FOR VIRTUAL DISKS:

vmkfstools -c --createvirtualdisk #[gGmMkK]
               -d --diskformat [zeroedthick|
                                eagerzeroedthick|
                                thick|
                                thin]
               -a --adapterType [buslogic|lsilogic]
           -w --writezeros
           -j --inflatedisk
           -U --deletevirtualdisk
           -E --renamevirtualdisk srcDisk
           -i --clonevirtualdisk srcDisk
               -d --diskformat [rdm:<device>|rdmp:<device>|
                                raw:<device>|thin|2gbsparse|
                                monoflat|monosparse]
           -X --extendvirtualdisk #[gGmMkK]
           -M --migratevirtualdisk
           -r --createrdm /vmfs/devices/disks/...
           -q --queryrdm
           -z --createrdmpassthru /vmfs/devices/disks/...
           -v --verbose #
           -g --geometry
           -J --miscop [setuuid | getuuid]
   vmfsPath
0

Featured Post

Don't miss ATEN at NAB Show April 24-27!

Visit ATEN at NAB Show to learn how our "Seamlessly Entertaining" solutions deliver fast, precise video streaming without delays for the broadcasting and media environment. ATEN will showcase its 16x16 Modular Matrix Switch (VM1600) and KVM Over IP Solution (KE6900 series).

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If we need to check who deleted a Virtual Machine from our vCenter. Looking this task in logs can be painful and spend lot of time, so the best way to check this is in the vCenter DB. Just connect to vCenter DB(default DB should be VCDB and using…
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
Teach the user how to install ESXi 5.5 and configure the management network System Requirements: ESXi Installation:  Management Network Configuration: Management Network Testing:
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question