Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3339
  • Last Modified:

URGENT!! VMware shrink disk - space requirements

I plead ignorance up front on this.

I've got a virtual disk of 120Gb - single file, resizable, only 60GB inside the disk are used.  I'm low on disk space on the HOST drive.

I'd like to shrink the vdisk down to 70gb or 80gb.  From the reading on the shrink, it looks like I need free disk space on the host equal to that of the vdisk.  Well...I've got a 120gb vdisk and 200mb free on the host drive.

What can I do to free up the 60GB of unused space in that vdisk?
0
snowdog_2112
Asked:
snowdog_2112
  • 4
  • 3
  • 3
3 Solutions
 
bevhostCommented:
Backup the vm
Delete the vm
Re-Import the vm using converter.
You may want to create a new small vm to test the procedure out on before deleting your main vm
0
 
snowdog_2112Author Commented:
So then is it true that the shrink requires free disk space equal to the vdisk?
0
 
bevhostCommented:
I'm not sure about that, I don't thiink so.  However,
You didn't even say what flavour of VMware you have.  Is it  ESX?
Sounds like you pre-allocated the space for the disk.
Pre-Allocated disk space cannot be shrunk.
But when you (re)import a machine you can resize a disk.

Shrinking is more about reclaiming the space used by deleted files
in a Virtual Disk in a non-pre-allocated disk.
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
bevhostCommented:
Just tried this on a VMWARE Server machine.
It does require extra disk space to complete the operation.
0
 
sda100Commented:
I think it only requires as much free disk space on the host equal to that of the size of one of the vdisk files, so if you have selected to split the disk into 2 GB files, then tat's all the free space you'll need.

To free up some disk space on the host very quickly, remove any unwanted snapshots from the VMs, do a "disk cleanup" operation on the host, and remove any "restore points" on the host too.

Although slow, you might want to map a network drive with plenty of space, down the VM, copy it to the network drive and shrink it from there.  Instead of srinking it you can also convert the VM to a different (and/or smaller) disk type, using "vmware-vdiskmanager".  There's some info on it's use, here:
http://pubs.vmware.com/server1/vm/wwhelp/wwhimpl/common/html/wwhelp.htm?context=vm&file=disks_server.7.33.html

Steve
0
 
snowdog_2112Author Commented:
VMware server 1.5 build 80187.

I created the disk to expand as needed, knowing that the source drive size would push the available disk space on the VM host.  (Another mystery is why it allocated 120GB during the conversion when there was no more than 70GB on the disk).

The drives were not split in 2GB chunks - is the 2GB chunk method preferred?  I have 1 file that is 120GB.

Hmmm...I could do another P-to-V conversion, or V-to-V in this case, and reallocate the drive.  Before I do, though, what is the "best practice" on vdisks? I have some SAS RAID 1 drives on the host, if that impacts the recommended configuration.
0
 
sda100Commented:
Hi snowdog,

My recommendations:

Creating a disk to expand as needed is best restricted to test machines, or in situations where you want a small disk, but can't predict the growth in guest OS files.  If you've got 60GB of native guest files, then I assume you're running this as a production system.  If so, then I recommend you use a pre-allocated (pre-sized) disk, for better performance.

As for splitting the disk into 2GB chunks.  Personally, I *always* do this - as it allows for easier manipulation of the VM if necessary (like now).  Have you ever tried copying a 120GB file anywhere!?

Steve :)
0
 
snowdog_2112Author Commented:
It's a production/test server in that it is my own internal server.  (the cobbler and his shoes, ya know!)

My concern was having a bunch of 2GB files to manage if I needed to move them.  I realize that moving the data is not trivial with 60GB of data, but I understand that it's going to take an HD of some sort.  I wouldn't want to burn a basketfull of DVD's or sneaker-net a 2GB thumbdrive back and forth just to move the data in any event.

Is a second V-to-V conversion an option for me (understanding that I'll still need 70+GB for the conversion)?

Thanks for the input!!
0
 
snowdog_2112Author Commented:
Thanks guys!
0
 
sda100Commented:
Thanks for the grading.

I've never done a V-to-V conversion, but I don't think you need to do it.  vmware-vdiskmanager (see post above) will convert the disk to a specified type.  This can be split/single, and growable or physical - it's up to you.

Steve :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 4
  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now