Solved

Resize Virtual Disk

Posted on 2009-07-06
7
1,165 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
Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to move multiple VMs in VSCA 6.0 4 67
Unified EndPoint Management 1 50
vCenter Server Health Check Alarm 3 47
Vmware Changed Block Tracking 4 51
In this article, I will show you HOW TO: Suppress Configuration Issues and Warnings Alert displayed in Summary status for ESXi 6.5 after enabling SSH or ESXi Shell.
In this article, I will show you HOW TO: Create your first Windows Virtual Machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, the Windows OS we will install is Windows Server 2016.
Teach the user how to configure vSphere clusters to support the VMware FT feature Open vSphere Web Client: Verify vSphere HA is enabled: Verify netowrking for vMotion and FT Logging is in place or create it: Turn On FT for a virtual machine: Verify …
Teach the user how to join ESXi hosts to Active Directory domains Open vSphere Client: Join ESXi host to AD domain: Verify ESXi computer account in AD: Configure permissions for domain user in ESXi: Test domain user login to ESXi host:

839 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