Unable to open snapshot file, VMDB failure! -- Hot backup

1012 views
Skip to first unread message

James

unread,
Aug 13, 2009, 5:49:47 AM8/13/09
to vmsb...@googlegroups.com
I have just done a hot backup and attempted a test restore when clicking revert to snapshot in vmware I get two pop ups 'Error - Unable to open snapshot file' and 'Error - VMDB failure'.

Anyone else come across this?

James

10nico

unread,
Aug 13, 2009, 6:43:14 AM8/13/09
to vmsbackup
As usual with error reports, details are of fundamental importance.
So please give us every possible detail on this specifc error.

The more the better ^_^

Thanks,

Michele

James

unread,
Aug 13, 2009, 6:53:13 AM8/13/09
to vmsb...@googlegroups.com
Well, the snapshot works fine on the original VM, I tested it and it reverts fine.

As soon as I make a backup and place it in a different dir open it in vmware console right click it in the inventory and select revert from snapshot, I get the previous error.

I am using the user kjs btw so permissions look sane?

Strange how it worked on the machine yet not when it's backed up, the only difference is that the machine is in /home/vm-restore and not /home/virtual-machines.

James

[root@desktop01 Windows XP Professional]# ls -l
total 6855880
-rw------- 1 kjs kjs  268435456 Aug 13 12:16 564d2ba5-4a09-ac96-3f75-b93f89185660.vmem
-r--r--r-- 1 kjs kjs         11 Aug 13 12:16 564d2ba5-4a09-ac96-3f75-b93f89185660.vmem.WRITELOCK
-rw------- 1 kjs kjs       8664 Aug 13 12:16 nvram
-rw-r--r-- 1 kjs kjs      29779 Aug 13 12:15 vmware-0.log
-rw-r--r-- 1 kjs kjs      75982 Aug 13 11:45 vmware-1.log
-rw-r--r-- 1 kjs kjs      42183 Aug 12 17:58 vmware-2.log
-rw-r--r-- 1 kjs kjs      34824 Aug 13 12:20 vmware.log
-rw------- 1 kjs kjs    7536640 Aug 13 12:20 Windows XP Professional-000002-s001.vmdk
-rw------- 1 kjs kjs    7995392 Aug 13 12:20 Windows XP Professional-000002-s002.vmdk
-rw------- 1 kjs kjs     327680 Aug 13 12:17 Windows XP Professional-000002-s003.vmdk
-rw------- 1 kjs kjs      65536 Aug 13 12:17 Windows XP Professional-000002-s004.vmdk
-rw------- 1 kjs kjs        465 Aug 13 12:17 Windows XP Professional-000002.vmdk
-r--r--r-- 1 kjs kjs         11 Aug 13 12:17 Windows XP Professional-000002.vmdk.WRITELOCK
-rw------- 1 kjs kjs 2147221504 Aug 13 12:17 Windows XP Professional-f001.vmdk
-rw------- 1 kjs kjs 2147221504 Aug 13 12:17 Windows XP Professional-f002.vmdk
-rw------- 1 kjs kjs 2147221504 Aug 12 17:29 Windows XP Professional-f003.vmdk
-rw------- 1 kjs kjs     786432 Aug 12 17:26 Windows XP Professional-f004.vmdk
-rw------- 1 kjs kjs  268173312 Aug 13 12:17 Windows XP Professional-Snapshot5.vmem
-rw------- 1 kjs kjs   18206624 Aug 13 12:17 Windows XP Professional-Snapshot5.vmsn
-rw------- 1 kjs kjs        524 Aug 13 12:17 Windows XP Professional.vmdk
-r--r--r-- 1 kjs kjs         11 Aug 13 12:17 Windows XP Professional.vmdk.READLOCK
-rw------- 1 kjs kjs        905 Aug 13 12:17 Windows XP Professional.vmsd
-rwxr-xr-x 1 kjs kjs       1001 Aug 13 12:17 Windows XP Professional.vmx

James

unread,
Aug 13, 2009, 6:54:03 AM8/13/09
to vmsb...@googlegroups.com
Also forgot to add, the VM will boot up fine it's just not reverting from snapshot.

James

10nico

unread,
Aug 13, 2009, 7:32:00 AM8/13/09
to vmsbackup
I think the problem may be the owner of the files.
I tried to reproduce your error and as long as I restored the files
with the root user ( the same that owns the original files ) I get no
errors.
But if I change the owner of the files to someone other I start to get
errors, precisely:

"VMDB Failure"
followed by
"Insufficient permissions"

Also, please note that the .vmx file MUST also have execute
permissions, or else VMware Server won't be able to perform its
operations on it.

More precisely, the user with which you are logged into the VMware
Server console must have execute permissions on the .vmx file to be
able to manage that VM.

Please also note that I'm referring to VMware Server 1.x

Regards,

Michele

James

unread,
Aug 13, 2009, 7:53:41 AM8/13/09
to vmsb...@googlegroups.com
I am using vmware server 1.*  I have not touched the perms on the files I will have a play now though and see if that fixes any thing... 

James

unread,
Aug 13, 2009, 7:57:02 AM8/13/09
to vmsb...@googlegroups.com
Just checked and the original vm perms and they are the same as the backup. I am doing everything as the same user...  even with the perms changed to 777 it fails.

James

10nico

unread,
Aug 13, 2009, 8:36:38 AM8/13/09
to vmsbackup
Are you sure you're logged in the VMware Server Console with the same
linux user you're using at the linux shell?

Also, could you please attach or paste here the log from the backup
script?

Michele

On 13 Ago, 13:57, James <packetsnif...@gmail.com> wrote:
> Just checked and the original vm perms and they are the same as the backup.
> I am doing everything as the same user...  even with the perms changed to
> 777 it fails.
>
> James
>
> On Thu, Aug 13, 2009 at 12:53 PM, James <packetsnif...@gmail.com> wrote:
> > I am using vmware server 1.*  I have not touched the perms on the files I
> > will have a play now though and see if that fixes any thing...
>

10nico

unread,
Aug 13, 2009, 8:49:21 AM8/13/09
to vmsbackup
So let's check another thing.
I see the files in the folder are owned by user "kjs" and group "kjs"

However I am not so sure you're logging into the VMware Server Console
with the same kjs user; are you?

Also please when you check, repeat all the steps, I mean:

1) remove the "test restore VM" both from the VMware inventory and
from the folder where you restored it
2) run the backup script again (and please tell me with which user you
run the script)
3) restore the files of the VM (and please tell me with which user you
do restore the files)
4) log on to the server with the VMware Server Console (and please
tell me with which user you are logging on to it)
5) register the VM into the inventory and try to "revert to snapshot"
6) report here any error you might still be getting at this point
7) post here the "lastlog" of backup_vmware (there's no need to post
the whole log here)

Thanks,

Michele


On 13 Ago, 13:57, James <packetsnif...@gmail.com> wrote:
> Just checked and the original vm perms and they are the same as the backup.
> I am doing everything as the same user...  even with the perms changed to
> 777 it fails.
>
> James
>
> On Thu, Aug 13, 2009 at 12:53 PM, James <packetsnif...@gmail.com> wrote:
> > I am using vmware server 1.*  I have not touched the perms on the files I
> > will have a play now though and see if that fixes any thing...
>

James

unread,
Aug 13, 2009, 11:55:24 AM8/13/09
to vmsb...@googlegroups.com
Hi :)
See below for answers:

On Thu, Aug 13, 2009 at 1:49 PM, 10nico <gcana...@yahoo.it> wrote:

So let's check another thing.
I see the files in the folder are owned by user "kjs" and group "kjs"

However I am not so sure you're logging into the VMware Server Console
with the same kjs user; are you?
Yes


Also please when you check, repeat all the steps, I mean:

1) remove the "test restore VM" both from the VMware inventory and
from the folder where you restored it
OK

2) run the backup script again (and please tell me with which user you
run the script)
Running script as root.

3) restore the files of the VM (and please tell me with which user you
do restore the files)
root

4) log on to the server with the VMware Server Console (and please
tell me with which user you are logging on to it)
kjs

5) register the VM into the inventory and try to "revert to snapshot"
Fail, same error as before

6) report here any error you might still be getting at this point
7) post here the "lastlog" of backup_vmware (there's no need to post
the whole log here)
Last log does not contain any info about this error, I did a "tail -f" while attempting to revert from snapshot, nothing was added to this log.

Regards
James
 

ronaldlw

unread,
Aug 13, 2009, 12:03:17 PM8/13/09
to vmsbackup
I'm not sure if this will help, but on server 2 I have had problems
reverting before and was able to fix it by deleting the lock folders.
This shouldn't be a problem since the first thing we do is revert to
snapshot, which would delete those anyway. Might be worth a try.

Ron

On Aug 13, 10:55 am, James <packetsnif...@gmail.com> wrote:
> Hi :)
> See below for answers:
>

James

unread,
Aug 13, 2009, 12:17:15 PM8/13/09
to vmsb...@googlegroups.com
Lock folders?

ronaldlw

unread,
Aug 13, 2009, 12:28:57 PM8/13/09
to vmsbackup
Again, I'm not familiar with Server 1.x, but it looks like you have
lock files instead of folders.

564d2ba5-4a09-ac96-3f75-b93f89185660.vmem.WRITELOCK
Windows XP Professional-000002.vmdk.WRITELOCK
Windows XP Professional.vmdk.READLOCK

Maybe try deleting those files and see what happens..

Ron

James

unread,
Aug 14, 2009, 6:40:16 AM8/14/09
to vmsb...@googlegroups.com
Ok tried this, same error.

I have tried upgrading to 1.9 from 1.5 - same error

I have tried moving the vm by hand to a different location on the hard disk and reverting from backup and it works.

But when i run the script and extract the tar.gz  then import the vm and do a revert from snapshot i get a fail! 

I get the same error on 2003 server and windows XP.

Has no one else came across this error?

James

10nico

unread,
Aug 14, 2009, 7:00:16 AM8/14/09
to vmsbackup
Maybe you're using vesion 3.12a of the script?
If this is the case, have you disabled background snapshots?

If you haven't , please do and restart vmware server service ( /etc/
init.d/vmware restart ), then try again.

I just have this feeling that background snapshots are the problem
here, and 3.12a has a bug that allows the backup to proceed even if
the background snapshots are enabled.

Please let us know

Michele

James

unread,
Aug 14, 2009, 7:19:41 AM8/14/09
to vmsb...@googlegroups.com
I am using 3.12a when I watch the vm as the script runs it looks like it is attempting to make a snapshot of the vm, and I restore that snapshot on the vm, just not after i have restored from backup.

Where is this background snapshot setting?

Thanks
James

James

unread,
Aug 14, 2009, 7:24:26 AM8/14/09
to vmsb...@googlegroups.com
I just checked in host settings  > priority and "Take and restore snapshots in the background" is ticked.

Is this right or wrong? I am guessing this is correct!?

Thanks
James

James

unread,
Aug 14, 2009, 7:38:52 AM8/14/09
to vmsb...@googlegroups.com
Also I get an error resuming the VM (even though it seems to resume fine...).

See below:

2009-08-14 [12:27:19] -> the VM Windows Server 2003 Standard Edition is powered on, will proceed with the snapshot/suspend operation
SNAPOK = TRUE
2009-08-14 [12:27:36] -> snapshot of the VM Windows Server 2003 Standard Edition created successfully
MYFUNCTION - backupvm MYFUNCTION
variable list
$STRATEGY = hot
$DEBUG = 1
$ARCHIVETYPE = gzip
$GUESTPATH = /home/virtual-machines
$LVM = false
$SNAPPATH = /mnt/snapshot
$GUESTNAME = Windows Server 2003 Standard Edition
$TEMPLOG = /tmp/desktop01_templog.txt
$SLICESIZE = 1480m
$BACKPATH = /home/backups/
$ARCHIVESUFFIX = tar.gz
2009-08-14 [12:27:38] -> started archiving the VM files
2009-08-14 [12:35:35] -> compressed archive Windows Server 2003 Standard Edition.tar.gz created successfully
STARTOK = FALSE
2009-08-14 [12:35:38] -> an error occurred while resuming the VM Windows Server 2003 Standard Edition
2009-08-14 [12:35:38] -> help file Windows Server 2003 Standard Edition_instructions.txt has been created
2009-08-14 [12:35:38] -> one or more errors occurred while backing up the VM Windows Server 2003 Standard Edition
/usr/local/bin/backup_vmware3.12a.sh: line 2048: /usr/bin/sendEmail: No such file or directory
2009-08-14 [12:35:38] -> email sent
2009-08-14 [12:35:38] -> script completed


Thanks!
James

James

unread,
Aug 14, 2009, 7:57:36 AM8/14/09
to vmsb...@googlegroups.com
Humm still getting this error, might have to give up with hot backups... (as much as I hate to say it!).

James

10nico

unread,
Aug 14, 2009, 8:39:18 AM8/14/09
to vmsbackup
Having background snapshots enabled is WRONG.
So please disable them by unticking the checkbox and then restart
vmware by issuing the following command:

/etc/init.d/vmware restart

Please note that if you don't restart vmware server the setting won't
be effective.

Then your snapshots and your backups should work as expected.

Please keep us posted!

Regards,

Michele

On 14 Ago, 13:24, James <packetsnif...@gmail.com> wrote:
> I just checked in host settings  > priority and "Take and restore snapshots
> in the background" is ticked.
>
> Is this right or wrong? I am guessing this is correct!?
>
> Thanks
> James
>
> On Fri, Aug 14, 2009 at 12:19 PM, James <packetsnif...@gmail.com> wrote:
> > I am using 3.12a when I watch the vm as the script runs it looks like it is
> > attempting to make a snapshot of the vm, and I restore that snapshot on the
> > vm, just not after i have restored from backup.
>
> > Where is this background snapshot setting?
>
> > Thanks
> > James
>
> ...
>
> leggi tutto

James

unread,
Aug 14, 2009, 9:42:43 AM8/14/09
to vmsb...@googlegroups.com
Wahoo! it's working!

Thanks again!!

James
Reply all
Reply to author
Forward
0 new messages