I have a VM that seems to be working ok, but when VMWare DR (or I) tries to create a snap shot, it fails, and when I view the summary page of the VM it has a warning at the top showing that the disks need to be consolidated.
So I go to snapshot manager for the VM and choose consolidate (in snapshot manager, there are no snapshots actually listed by the way). If fails with this error:
This virtual machine has 255 or more redo logs in a single branch of its snapshot tree. The maximum supported limit has been reached, creating new snapshots will not be allowed. To create new snapshots, please delete old snapshots or consolidate the redo logs.
If I browse the data store (which has plenty of free space, 2 TB and this vm is under 40gb), in the vm folder, I do in fact see a bunch of files, numbered all the way to 0255:
- myvm-000255-ctk.vmdk
- myvm-000255-delta.vmdk
- myvm-000255.vmdk
How can I clean all this up? Is there an SSH command line command or can I delete some of the files safely? Thanks!
Here is KB about fixing this problem. I did not move staff around but just committed few snapshots in the middle to get to more manageable count and then used "Consolidate"...
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1004545
What I did is the following:
Use with caution and do not copy commands blindly. Your actual file names, numbers, locations, etc. might vary. You should have backups of your data!
While the virtual machine is still running:
This consolidates all snapshots up to snapshot no. 254 in a single disk in
consolidate/myvm.vmdk
. We can do that since actual write activity is only on myvm-000255.vmdk (The last snapshot of the disk).Keep in mind your actual numbers may vary.
Now shut down the VM.
Remove the VM from inventory.
Edit
consolidate/myvm-000255.vmdk
:Change
parentCID
to the CID entry ofconsolidate/myvm.vmdk
(In my case this was already ok, sincevmkfstools -i
seems to keep the CID.)Change
parentFileNameHint
:Now copy the files from
consolidate/
back in place:Reregister your VM.
Power up your VM.
Now you can use the consolidate option in vSphere Web Client to consolidate the last delta while the VM is already running.
If everything is running fine you can delete the backup folder.
In general a good resource for manual VMWare disk editing is: http://sanbarrow.com/vmdk-handbook.html
Although this isn't really a "fix" as such, and may not be of use to a production server, when I've been faced with issues like this in the past I find the easiest solution is just to use Vmware converter to v2v the machine, this provides an identical machine with a single vmdk per disk and is done with an agent within the VM, rather than at the hypervisor level, so it isn't aware of snapshots.