How to grow virtual disks in ESX 3.5.0 with VMs that have multiple snapshots?

Posted on 2009-04-06
Medium Priority
Last Modified: 2012-05-09

I have a number of VMs running under ESX 3.5.0 that have multiple snapshots each, and their virtual disks are constantly running out of space.

Is there any way to expand the virtual disks even though I have multiple snapshots?  It's not an option to just pick one of the states and grow the virtual disk for that.  I *must* be able to keep the snapshots!

Also, I have noticed an option in VMware Infrastructure Client that doesn't seem to work that *may* solve my problem - anyone know why it doesn't work?  This is what I'm doing:
- Select a VM
- Click on Edit Settings under Commands
- On the Hardware tab, select Hard Disk [x].  Observe the text box next to New Size: and that it is possible to enlarge this size.  Add a few GB and select OK.
- I get an error like the following:

A general system error occurred: Internal error

At other times it will look like the disk has been resized, but going back into the Edit Settings dialogue simply shows the original size again.

Any ideas?
Question by:thehoff
  • 3
  • 3
  • 2
  • +1
LVL 32

Expert Comment

ID: 24086258
Fitst things first, snapshots are NOT to be kept in perpetuity.  They are meant as a troubleshooting tool during patching and upgrading of your OS until it is stable, which is usually after a week or so.  At that point you would either commit or revert to snapshot.  Also snapshot will greatly affect your performance i/o as well.

Also if you are getting this error when the guest OS is running, try shutting down the guest and then increasing the size of your disk from the VI client>edit settings of the guest>hard disk


Expert Comment

ID: 24090756
What he said.
Fitst things first, snapshots are NOT to be kept in perpetuity.

You are tempting fate. Don't keep snapshots for long periods. Commit or roll back.
The snapshot function is not intended as a method of perpetually retaining the state of a guest.
If you don't understand why they are running out of space then take the advice given. Commit or remove.
Snapshot is not a replacement for backups.
If things really go wayward with your snapshots you may corrupt the guest disks. (don't ask how I know this)

Expert Comment

ID: 24090781
OH once you have cleared all you snapshots I expect you'll have no trouble expanding your disks. If you can't commit your snapshots as the inevidable has satarted to occur shut down you guest and use the importer to clone and resize the disk..
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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


Expert Comment

ID: 24092106
Firstly - never, ever, ever attempt to expand a disk that has a snapshot. If you manage to partially succeed you'll either lose the snapshot, the disk or the VM where the only recovery is to hope you haven't written new data to the original disk and reconstruct the CID chain.

If you absolutely must keep the snapshots as well as expanding the underlying disk size then your best option is to roll the snapshots back one at a time taking a clone of the disks at each stage so you can retain the versions of the data that you need. Of course this takes up a whole lotta disk space, and assumes you can still commit the snapshots.

I hope you haven't done something fun like a major ESX version upgrade or a storage migration on the snapshot, because that can also stop you from making further changes.

In all respects I very strongly suggest you take an independent backup of the data before you go any further with this just in case you corrupt something you can't fix.

Good luck!

Author Comment

ID: 24093098
Thanks for the replies, guys.  Unfortunately, these are test servers for our test team and we absolutely *must* use snapshots to go back to/upgrade from various versions.  Typically the snapshot would be used for a week of testing, and at the end of that, another snapshot would be taken to keep that state, and the system(s) would be reverted back to one of the earlier snapshots to go back to a release version to upgrade from.

So some of the older servers are starting to fill up with test data and add-on software that's been installed.  It is a *lot* of work to build a new test server (as typically there are at least 2, sometimes up to 6 servers that are all linked in certain states), hence my question here.

Is there no workaround or "cheat"?  Disk space on the ESX servers isn't so much of a concern (for now) so I'm open to all suggestions!

Expert Comment

ID: 24093215
I would suggest setting up for VCB and taking a VCB at the end of the week or possibly automating via the scheduler a weekly clod or hot clone depending on your licensing but pleasse listen to the advice that you may and likely will lose the lot if you don't change this practise.

Author Comment

ID: 24093237
Yes, we do backup every week.

Please, don't worry about us losing data - we have that area covered.  We have played around with resizing before and are aware of the problems it will cause if snapshots are involved, hence this question.

I am looking for a cheat/workaround in this case - something out of the norm - if it exists.  At the moment, it is looking very unlikely... :(

Accepted Solution

DChaffey earned 2000 total points
ID: 24096797
Firstlyl, let me go back and address your original main question more directly,
The option to expand disks in the VI client is just an automation for the console command "vmkfstools -X", with a less useful information output, so that's not a work around or anything new unfortunately.

In your current situation, I believe it boils down to the hard line that disk expansion and snapshots are essentially mutually exclusive. I do not think it likely that you will find a solution to fix your current predicament, but you can certainly find a method of operation to avoid it in the future while retaining the functionality you seek.
I maintain that your best 'out' at this point is probably to implement a better retention mechanism (like vRanger incremental backups or similar) and then do a staged set of commits through your snapshots with a backup between each. Then expand your disks and restore whichever version of the data you currently need. You will regain performance, flexibility and the ability to modify the disks, while retaining granular state control at a low cost.

VMware Lab Manager has a feature which effectively allows you to 'save' the state of a linked set of VMs and share it with other people or store it in a library, which may achieve the end you are looking for in a future case.
I presume that you've made use of your valid licensing and support contract to call VMware and seek a sneaky answer? I'm often surprised how many people forget that most support contracts have unlimited phone support.

Author Closing Comment

ID: 31567334
We apparently only have 2 free support tickets for every renewal of the software so I don't want to use one on this, especially when it appears that there is no "ideal" solution to the problem.  I guess we'll just have to pick one state and stick with that...

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

Question has a verified solution.

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

How much do you know about the future of data centers? If you're like 50% of organizations, then it's probably not enough. Read on to get up to speed on this emerging field.
Among the most obnoxious of Exchange errors is error 1216 – Attached Database Mismatch error of the Jet Database Engine. When faced with this error, users may have to suffer from mailbox inaccessibility and in worst situations, permanent data loss.
Advanced tutorial on how to run the esxtop command to capture a batch file in csv format in order to export the file and use it for performance analysis. He demonstrates how to download the file using a vSphere web client (or vSphere client) and exp…
How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…
Suggested Courses
Course of the Month3 days, 11 hours left to enroll

600 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