Solved

Resize Virtual Disk

Posted on 2009-07-06
7
1,157 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
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 
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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

It Is not possible to enable LLDP in vSwitch(at least is not supported by VMware), so in this article we will enable this, and also go trough how to enabled CDP and how to get this information in vSwitches and also in vDS.
Veeam Backup & Replication has added a new integration – Veeam Backup for Microsoft Office 365.  In this blog, we will discuss how you can benefit from Office 365 email backup with the Veeam’s new product and try to shed some light on the needs and …
Teach the user how to edit .vmx files to add advanced configuration options Open vSphere Web Client: Edit Settings for a VM: Choose VM Options -> Advanced: Add Configuration Parameters:
Teach the user how to configure vSphere Replication and how to protect and recover VMs Open vSphere Web Client: Verify vsphere Replication is enabled: Enable vSphere Replication for a virtual machine: Verify replicated VM is created: Recover replica…

932 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now