Hi all,
I had a snapshot on vm on an esxi server 4.1, build 320137
When I later (1 day) removed the snapshot ("delete all" action in snapshot manager in vSphere client) I got an error saying:
Remove all snapshots
<myvmname>
Unable to access file
<unspecified
filename> since it is
locked
root
At this point there isn't anymore the snapshot, according to the vSphere client and also to the commandline:
/vmfs/volumes/4cb6cf27-7d884680-68bf-00221965eca8 # vim-cmd vmsvc/snapshot.get 176
Get Snapshot:
(176 is the vmid of my machine)
but actually the snapshot is still present, with 3 delta (one for each disk) of about 1 GB (it is an heavily used machine, with 1 o.s. disk of 16 GB
and 2 data disks of 200 GB, almost full)
the question is: what can I do to merge the delta vmdk into their respective disks ?
Or what can I do to create 3 new disks containing all the data, i.e. using vmkfstools
(then I will replace old disks with these new ones in vm configuration)
The operations can also be done in power off status without any problem (night-time....)
thanks in advance,
Andrea
seem to see this regularly here 🙂
First have a look at the summary of the VM or look at the vmx file to verify what VMDKs are being used.
one you have that you need to consolidate the vmdks for this the VM needs to be down as otherwise it will lock the files.
then you run vmkfstools -i /vmfs/volumes/datastorename/vmname/vmdk-from-vmx-file new.vmdk
You will need to run this for all disks you have on that VM.
this will consolidate the vmdks but it will not remove old ones. You will then need to edit settings of the VM and remove old disks and re-add custom disks using the new vmdk you created.
Once VM is up and running you can clean out the old files...
good luck
seem to see this regularly here 🙂
First have a look at the summary of the VM or look at the vmx file to verify what VMDKs are being used.
one you have that you need to consolidate the vmdks for this the VM needs to be down as otherwise it will lock the files.
then you run vmkfstools -i /vmfs/volumes/datastorename/vmname/vmdk-from-vmx-file new.vmdk
You will need to run this for all disks you have on that VM.
this will consolidate the vmdks but it will not remove old ones. You will then need to edit settings of the VM and remove old disks and re-add custom disks using the new vmdk you created.
Once VM is up and running you can clean out the old files...
good luck
Before I can give you an advice, I need to know exactly what you have. I assume the VM is up and running and the failed snapshot removal did not do any harm!?
Please provide the following:
Are you using a backup application which may have a lock on one of the virtual disk files?
André
OK, last night I did what opbz suggested and everything now is ok.
after clonong the three disks, removing from vmx the old and adding the new ones,
last little problem was the vm presented a new snapshot named :
--Snapshot Name : Consolidate Helper- 0
I just removed (deleted) this one (actually no delta files were present) and now all is ok
In order to answer also to André, yes, I have a backup procedure developed by myself and running fine since a couple of
years on a large number of esxi server: basically it creates a snapshot, clones the disks via vmkfstools and
at the end deletes the sanpshot.
First of all it checks the existance of a preexisting snapshot: if it exists no backup is actually done and I am email-alerted
What exactly happened was the following:
Backup started, created the snapshot and started cloning the disks to an iscsi vmfs storage.
The iscsi target experienced a problem and crashed, the backup hung itself, the snapshot was not removed, I was
alerted by an email. I went to the vSphere client in order to delete the snapshot and this operation crashed
as you could read above.
Thanks all for your help
Andrea