Solved

Resize Virtual Disk

Posted on 2009-07-06
7
1,174 Views
Last Modified: 2012-05-07
Can I resize a VMware virtual disk?
0
Comment
Question by:yakselrud
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this article we will learn how to backup a VMware farm using Nakivo Backup & Replication. In this tutorial we will install the software on a Windows 2012 R2 Server.
Giving access to ESXi shell console is always an issue for IT departments to other Teams, or Projects. We need to find a way so that teams can use ESXTOP for their POCs, or tests without giving them the access to ESXi host shell console with a root …
Teach the user how to install log collectors and how to configure ESXi 5.5 for remote logging Open console session and mount vCenter Server installer: Install vSphere Core Dump Collector: Install vSphere Syslog Collector: Open vSphere Client: Config…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

752 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