VMware Cloud Community
JimAnstiss
Contributor
Contributor

Cancelling "remove snapshot" task.

Hello All,

(How) Can I cancel the "remove snapshot" task?

The reason I ask is there is one in progress and it would appear that after 4 hours it is at 7% and is occupying 3.8GB of store space, extrapolating this means we are looking at about 50GB for 100% and there is only 10GB of space left in the datastore.

If I can't cancel the task, what will happen when the store runs out of space?

I have ESXi 5.0 with 2 Win2008r2 guest VM's

TIA,

Jim

Tags (3)
0 Kudos
5 Replies
a_p_
Leadership
Leadership

... it is at 7% and is occupying 3.8GB of store space,

Can you please explain this? Which file is occupying the space? The Consolidate-Helper snapshot?

Please post a screen shot of the datastore browser window showing the files and sizes .

Discussion successfully moved from VI: VMware ESX™ 3.5 to VMware ESXi 5

André

0 Kudos
JimAnstiss
Contributor
Contributor

André

The file that has appeared and is now growing is STJ-Server01-000002.vmdk

STJ VM DAS.PNG

Also the original server disk file STJ-Server01.vmdk has grown by about 10GB. These files between them have consumed the available disk space in the store.

When this happens the VM hangs and will dismount it self if no more disk space can be found. I have then had to reduce the amount of RAM available to the guests in order to get the VM's restarted, but it would appear that the process is still continuing and the few GB I was able to release has been consumed again. Once more the server dismounts.

Is there any way I can stop or pause this while I source some more disk space for the store?

Regards,

Jim

0 Kudos
a_p_
Leadership
Leadership

Sorry I can't give you an advice other than freeing up disk space. The 000002.vmdk is a "Consolidate-Helper" snapshot which gets automatically created when you delete a snapshot with for powered on VM. This ensures the previous snapshot(s) can be merged into their parent(s).Although this helper snapshot grows  depending on your VM's disk activity (writes/changes), the main issue you are having is with merging the 000001.vmdk snapshot's data into the base disk. Depending on the data in this snapshot the base disk could theoretically grow from a few MB up to the size of the snapshot. This means you may need to - at least temporarily - free up up to 133GB (worst case).

I don't think there's a way to cancel the task other to killing it from the command line, which however could result in unpredictable results.

André

JimAnstiss
Contributor
Contributor

André,

Thanks for the input, I have had VMWare support helping with this issue also, and like you they agree that the task can't be cancelled once started. They didn't suggest killing the task, but I suspect that was due to the unpredictable results, you and other thread posters have mentioned.

Anyway long story, short.

After trying an online consolidation which was thought would succeed (it failed after consuming all the new made disk space).

Then an offline consolidation which again failed after sitting at 99% complete for 7 hours.

I went to plan D. Bring on old box out of retirement, load with ESXi and use as a remote datastore to restore the failing production machine from backup.

I have one of two servers running from the remote datastore right now, and the second one restoring.

Hopefully a full bare metal restore into a new data store will solve the disk space issue and reclaim unused space in my disks at the same time Smiley Happy

Stay tuned for the next exciting episode...

Regards,

Jim

0 Kudos
sudhakar_a_k
Contributor
Contributor

Hi Team,

I am facing my experience for snapshot cancellation. We have a VM which had near 3-4 month old snapshot. And there was activity for that VM to upgrade the mysql database which was running on that server. So i thought i will first delete this old snapshot and will take new snapshot before  upgrade activity. So database team activity was just going to start before that i deleted the  snapshot, i thought it will take less time. But it was taking more time and database team was asking me continously that can they start their upgrade activity. So finally i canceled the snapshot deletion task successfully with below method but after canceling it i got VM disk consolidation required message which i can consolidate do later as well. Below command i used to cancel snapshot deletion task with command line.

Open an SSH shell session to the host that is performing the consolidation and snapshot deletion task by running this command:

1. vim-cmd vimsvc/task_list

You see a task similar to:

(ManagedObjectReference) [
'vim.Task:haTask-9-vim.VirtualMachine.removeAllSnapshots-304060994'

2.  As per below command output , you can know if you can cancel it or not with cancelable parameter which is True in below output.
vim-cmd vimsvc/task_info haTask-9-vim.VirtualMachine.removeAllSnapshots-304060994

You see output similar to:
(vim.TaskInfo) {
dynamicType = ,
key = "haTask-9-vim.VirtualMachine.removeAllSnapshots-304060994",
task = 'vim.Task:haTask-9-vim.VirtualMachine.removeAllSnapshots-304060994',
description = (vmodl.LocalizableMessage) null,
name = "vim.VirtualMachine.removeAllSnapshots",
descriptionId = "VirtualMachine.removeAllSnapshots",--running process>
entity = 'vim.VirtualMachine:9', 
entityName = "SvC5sql01",---Virtual Machine name>
state = "running",---make sure the status is running & is not in a error state>
cancelled = false,
cancelable = True,
error = (vmodl.MethodFault) null,
result = ,
if above, cancelable is True then you can go with next step otherwise dont cancel it , let it run and if you cancel it your vm will get corrupted.

3. vim-cmd vimsvc/task_cancel haTask-9-vim.VirtualMachine.removeAllSnapshots-304060994

Now when you will go on Vcenter dashboard, you will see that there is VM consolidatoin message. So you need to consolidate the VM disk, you can do it later as well during night or anytime.

So in my case , i did not consolidate the disk because it again taking long time, i just take the snapshot and asked Database team to do theri upgrade activity. we rebooted the VM as well ,no issue faced.

So after one week, during night we right clicked on VM and snapshot and did the consolidation and it run during night for long time and it completed.Then there was no consolidation message on vcenter.

In case any issue-+919650416888

0 Kudos