ESXi

 View Only
Expand all | Collapse all

Need Help with delete all snapshots

MAHernandez2011

MAHernandez2011Aug 07, 2011 03:41 AM

  • 1.  Need Help with delete all snapshots

    Posted Aug 06, 2011 07:42 PM

    We have a webserver VM that had about 6 snapshots attached to it.

    We were running out of space on our LUN so we did a delete all, but that didn't do anygood and I think the snapshots (197GB) are still in the VM folder.

    We have about 18GB of free space left.

    Please advised.



  • 2.  RE: Need Help with delete all snapshots

    Posted Aug 06, 2011 07:59 PM

    Welcome to the Community,

    you are posting in the VMware Server forum. Is this question really related to VMware Server or are you using ESXi? Please clarify which product, version and build number you are using.

    André



  • 3.  RE: Need Help with delete all snapshots

    Posted Aug 06, 2011 08:25 PM

    Oops! I am using Vsphere4 for virtualization.



  • 4.  RE: Need Help with delete all snapshots

    Posted Aug 06, 2011 08:29 PM

    Please post the exact version and build number of the hosts!

    Also post a screen shot of the datastore browser window, showing all the files (with full names, sizes, date/time) in the VM's folder. In addition to the screen shot, please attach the latest vmware.log file from the VM's folder.

    André

    PS: Assuming you are using ESXi, I'm going to move the question to the appropriate forum.



  • 5.  RE: Need Help with delete all snapshots

    Posted Aug 06, 2011 11:51 PM

    First of all, shutdown the VM (we don't want more data being used on the datastore). If there are no snapshots on the snapshot manager, check on the VM edit settings if the disks are poiting to a <vm_name>-00000X.vmdk file, instead of <vm_name>.vmdk (this indicate that the VM still are using the snaps). If this is the case, try taking another snap (vm still powered off please :smileyhappy: ) and doing a Delete All again on the Snap Manager window.

    If this does not work, try this steps: http://kb.vmware.com/kb/1005503

    Also, you can simply clone the VM (if vcenter is available) so the snaps will be automatically commited.

    Good luck.

    Marcelo Soares



  • 6.  RE: Need Help with delete all snapshots

    Posted Aug 07, 2011 12:22 AM

    It is important to have all the information that a.p. requested available before taking any action.



  • 7.  RE: Need Help with delete all snapshots

    Posted Aug 07, 2011 03:04 AM

    Sorry VMWare VCenterServer 4.0.0 Build 162856

    We are using a LeftHand San iSCSI

    I tried a quick snapshot with 27GB , but the VM was running and it failed.

    So now I am trying to free up space on another  datastore to clone it to the new one.



  • 8.  RE: Need Help with delete all snapshots

    Posted Aug 07, 2011 03:41 AM

    The hosts are using

    VMware ESX 4.0.0 build 175625


  • 9.  RE: Need Help with delete all snapshots

    Posted Aug 07, 2011 09:19 AM

    With the rather old patch level you are currently running, a "Delete All" action will need tons of additional disk space on the datastore due to the way the snapshots are merged. This behavior was modified with ESXi 4.0 Update 2 (Build 261974), where "Delete All" only needs some additional disk space when deleting the snapshots with the VM powered on and no additional disk space at all with the VM powered off. The above assumes that the base virtual disk is thick provisioned though.

    With the information you provided and the 6 snapshots, I think the link marcelo.soares provided to clone the virtual disk will be the safest way to get rid of the snapshots. Make absolutely sure you specify the latest snapshot vmdk file (the one you find in the vmx file) as the source virtual disk for the "vmkfstools -i ..." command.

    André



  • 10.  RE: Need Help with delete all snapshots

    Posted Aug 07, 2011 12:39 PM

    It will not allow me to clone stating that the destination storage drive has insufficiant space.

    I downloaded the VCenter standalone converter tool. It think that will let me resize the drives for what I need and transfer over to the datastore



  • 11.  RE: Need Help with delete all snapshots

    Posted Aug 07, 2011 01:32 PM

    I tried the stand alone converter but it says unable to get hardware information.



  • 12.  RE: Need Help with delete all snapshots

    Posted Aug 07, 2011 01:56 PM

    To be able to help you, I need:

    • a screen shot of the datastore browser window, showing all files with full file names, sizes, date/time
    • the latest vmware.log file(s) from the VM's folder
    • the vmx file
    • the vmsd file

    How much free disk space do you currently have on the datastore?

    Do you have other datastores with free disk space, which could temporarily be used? If yes, please mention the free disk space.

    André



  • 13.  RE: Need Help with delete all snapshots

    Posted Aug 07, 2011 02:14 PM

    I have 1Mb of free space.

    I have another datastore with 467GB of storage but everytime I convert I get an insufficiant space.

    These disks are Thick provisioned and combined are no more the 380GB

    There is 1 20GB drive, 1 250GB drive and 1 100GB drive(empty) I tried to delete the 100GB drive while the machine is off but it says another operation is running.

    Snapshots coming.



  • 14.  RE: Need Help with delete all snapshots

    Posted Aug 07, 2011 02:15 PM

    I get an error when trying to download the .vmx file.



  • 15.  RE: Need Help with delete all snapshots

    Posted Aug 07, 2011 03:22 PM

    Is the VM currently powered off? Can you afford some downtime for this VM?

    To free up some disk space, you can safely delete the "wwwtest-Snapshot8.vmsn" file. Unless you plan to revert to a snapshot this file is useless.

    If the VM is powered off and the "wwwtest-????????.vswp" file still exists, this can also be deleted.

    With the VM powered off:

    create a new folder "wwwtest-new" on the datastore with the 467 GB free disk space

    and then try to run the following command:

    vmkfstools -i /vmfs/volumes/iscsi_vmfs02/wwwtest/wwwtest_1-000007.vmdk /vmfs/volumes/<datastore_with_free_disk_space>/wwwtest-new/wwwtest.vmdk

    Replace "<datastore_with_free_disk_space>" with the name of the target datastore.

    Enter the command without line breaks.

    If this works, please report back and I will guide you through the next steps. Don't try to power on the VM at this point.

    André

    PS: What error do you get when you try downloading the vmx file?



  • 16.  RE: Need Help with delete all snapshots

    Posted Aug 07, 2011 03:38 PM

    The VM is powererd off but it keeps trying to turn itself back on.

    When I try and download the VMX file I get Expected put message. Got:Error

    Would this be the right command and where do I run this from? I am having issues SSH to the hosts.

    vmkfstools -i /vmfs/volumes/iscsi_vmfs02/wwwtest/wwwtest_1-000007.vmdk /vmfs/volumes/vmfs/volumes/iscsi_vmfs01/wwwtest-new/wwwtest.vmdk



  • 17.  RE: Need Help with delete all snapshots

    Posted Aug 07, 2011 04:06 PM
    The VM is powererd off but it keeps trying to turn itself back on.

    Is there any tools or application monitoring the VM, which might try to power it on?

    What you should do is to delete the "wwwtest-Snapshot8.vmsn" file. This will free up ~4 GB. Then power on the VM, but only to cleanly shut it down.

    Once the VM is powered off (and stays off) run the command from the command line. If you have no ssh access, you can run the command on the host's console. To logon to the console, press ALT-F1, type "unsupported" and press ENTER. Then enter the root password. (see http://kb.vmware.com/kb/1003677)

    Would this be the right command and where do I run this from? I am having issues SSH to the hosts.

    vmkfstools -i /vmfs/volumes/iscsi_vmfs02/wwwtest/wwwtest_1-000007.vmdk  /vmfs/volumes/vmfs/volumes/iscsi_vmfs01/wwwtest-new/wwwtest.vmdk

    If the target datastore is "iscsi_vmfs01" then yes, that's what you will have to run. Don't forget to create the "wwwtest-new" folder prior to running the command.

    Again, after the cloning is done, we need to do some more small modifications. Please report back when done.

    André



  • 18.  RE: Need Help with delete all snapshots

    Posted Aug 07, 2011 04:27 PM

    I cannot get into the Host server.

    IT does not like my password.

    I've tried it 5 different ways.

    Is there another way?



  • 19.  RE: Need Help with delete all snapshots

    Posted Aug 07, 2011 04:52 PM

    Does that mean you don't remember the "root" password?

    Ok there's another way, but you need to answer my questions!

    • Is there any tool or application monitoring the VM, which might try to power it on?

    Please do the following:

    • Delete the "wwwtest-Snapshot8.vmsn" file. This will  free up ~4 GB.
    • Power on the VM
    • Cleanly shut down the VM

    After shutting the VM down, download the wwwtest.vmx file as well as the vmware.log from the datastore and attach these two files to your next post.

    André



  • 20.  RE: Need Help with delete all snapshots

    Posted Aug 07, 2011 06:01 PM

    ok we have it shut down, we freed up space.

    Here are your logs.

    We are running the command

    and have Destination disk format: VMFS zeroedthick



  • 21.  RE: Need Help with delete all snapshots
    Best Answer

    Posted Aug 07, 2011 06:46 PM

    Sounds good.

    I saw you removed the third virtual disk from the VM (without deleting from disk). To avoid issues, delete the "wwwtest.vmsd" file at this point.

    Once the cloning is done (vmkfstools completed successfully), edit the VM's settings and remove the second HDD (don't yet delete it from the disk, only remove it from the virtual hardware), then add the new cloned virtual disk to the VM (make sure it's connected to "scsi0:1"). To ensure the old virtual disks are not being used anymore, create a new sub-directory in the VM's folder and move all the "wwwtest_1*.vmdk" files to this folder (this can be done using the datastore browser).

    Now it's time to power on the VM to see whether everything works as expected. If so, you can safely delete the files you moved to the sub-directory.

    Caution: If you have trouble, please don't try to re-attach the old virtual disk. Report back here and I will help.

    After you confirm the above steps, we can do some clean up and/or move the cloned virtual disk back to it's "home" folder. Please attach the latest vmware.log once again, so I can take a look at it.

    André



  • 22.  RE: Need Help with delete all snapshots

    Posted Aug 07, 2011 09:33 PM

    We get an error when trying to power up the VM.

    Insufficient resources to satisify configured failover level for HA



  • 23.  RE: Need Help with delete all snapshots

    Posted Aug 07, 2011 09:40 PM

    Any VM for that matter.



  • 24.  RE: Need Help with delete all snapshots

    Posted Aug 07, 2011 09:51 PM

    This is like a great mix of problems.... :smileyhappy: This isolated one you can resolve by only Editting the Cluster  settings, going to the HA Options and allowing vms to power on even if  they violate availability constraints. Have in mind that doing this will  not guarantee the power on of your VMs by the HA in case you have host  failures.

    Marcelo Soares



  • 25.  RE: Need Help with delete all snapshots

    Posted Aug 07, 2011 10:04 PM

    Where do I find that setting?



  • 26.  RE: Need Help with delete all snapshots

    Posted Aug 07, 2011 10:06 PM

    - Right click the cluster where this VM resides;

    - Click Edit Settings;

    - Click on VMware HA (not sure, but something like this)

    - There will be an option regarting the allowing or not the power on on constraint violation.

    Marcelo Soares



  • 27.  RE: Need Help with delete all snapshots

    Posted Aug 07, 2011 10:19 PM

    Thanks sooooo much.

    Do you have an address where we can send a thank you gift from our school.



  • 28.  RE: Need Help with delete all snapshots

    Posted Aug 07, 2011 10:19 PM

    Thank you very much we sure do appreciate it.

    DO you have an address where we can send swag.



  • 29.  RE: Need Help with delete all snapshots

    Posted Aug 08, 2011 06:37 PM

    You are welcome, no need to send anything. I'm glad the issue could be solved and your system is up and running again.

    André



  • 30.  RE: Need Help with delete all snapshots