Solved

Resize Virtual Disk

Posted on 2009-07-06
7
1,152 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
Comment Utility
Definitely, what is the OS of the VM?
0
 
LVL 9

Expert Comment

by:sda100
Comment Utility
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
Comment Utility
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
Comment Utility
Windows Server 2K3 and 2K8.
0
 
LVL 21

Expert Comment

by:za_mkh
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

VM backup deduplication is a method of reducing the amount of storage space needed to save VM backups. In most organizations, VMs contain many duplicate copies of data, such as VMs deployed from the same template, VMs with the same OS, or VMs that h…
Exchange server is not supported in any cloud-hosted platform (other than Azure with Azure Premium Storage).
Teach the user how to convert virtaul disk file formats and how to rename virtual machine files on datastores. Open vSphere Web Client: Review VM disk settings: Migrate VM to new datastore with a thick provisioned (lazy zeroed) disk format: Rename a…
Teach the user how to use create log bundles for vCenter Server or ESXi hosts Open vSphere Web Client: Generate vCenter Server and ESXi host log bundle:  Open vCenter Server Appliance Web Management interface and generate log bundle: Open vCenter Se…

744 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

8 Experts available now in Live!

Get 1:1 Help Now