VMware Communities > VMTN > VMware Infrastructure™ > VI: ESX 3.5 > Discussions

This Question is Possibly Answered

1 "correct" answer available (10 pts) 1 "helpful" answer available (6 pts)
13 Replies Last post: Jun 26, 2009 2:07 PM by jsjaco37
Reply

Trying to recover deleted snapshot files.

Jun 24, 2009 8:24 AM

Click to view jsjaco's profile Novice jsjaco 6 posts since
Oct 12, 2008

Hello,

I am new to the VM world as well as to linux. I have a customer that is running ESXI 3.5 and decided that there was a need to delete some of their snapshot files to help increase performance. Is there a way to restore these files from the datastore? The VM will not start. The error message appears " A file was not found. There are 3 virtual hard drives and the files for the first two are there, but the file for the third is missing.

Thanks,

Jeff

Reply Re: Trying to recover deleted snapshot files. Jun 24, 2009 9:41 AM
Click to view matthiaseisner's profile Enthusiast matthiaseisner 39 posts since
Jun 5, 2009

Hi Jeff!

Could u pls be so kind and describe how the files have been deleted! This will help to think about the problem in detail. In detail I am interested if these files have been just deleted (using GUI or CLI) or did u use the snapshot manager.

Furthermore is there a possibility to restore the whole VM from a backup?

Cheers,

Matthias

Reply Re: Trying to recover deleted snapshot files. Jun 24, 2009 9:53 AM
in response to: matthiaseisner
Click to view jsjaco's profile Novice jsjaco 6 posts since
Oct 12, 2008

Matthias,

Thank you for the reply. They were deleted through the VCenter GUI. I have a data backup that I am preparing to restore to the original virtual drives, but was hoping that there would be another way to restore the missing file(s). The backup is a couple weeks old.

How can you make a backup of the whole VM? I didn't know that this was available.

Thanks again,

Jeff


Reply Re: Trying to recover deleted snapshot files. Jun 25, 2009 12:34 AM
in response to: jsjaco
Click to view matthiaseisner's profile Enthusiast matthiaseisner 39 posts since
Jun 5, 2009

Hi Jeff!

If u delete snapshot files pls always use the snapshot manager because it will ensure that the snapshots are persisted to the VMDK file if necessary.

Also consider that snapshots should only be used for temporary action. Pls don't use them as backup.

To backup a VM use VCB. This will quiesce the VM and the u're able to backup the VM, or u also can shut down the VM and just copy all files. For backup or vmotion consider that u have no active snapshot.

Cheers,

Matthias

Reply Re: Trying to recover deleted snapshot files. Jun 25, 2009 3:35 AM
in response to: matthiaseisner
Click to view Dynamax's profile Enthusiast Dynamax 30 posts since
Feb 16, 2008
can you list the contents of the relevant vm folder on the datastore. It mabe the -flat.vmdk file is still there and you're just missing the vmdk file to the third disk which you can recreate.

Also your vmx file would be handy to see what it is referencing

Reply Re: Trying to recover deleted snapshot files. Jun 25, 2009 4:18 AM
in response to: Dynamax
Click to view jsjaco's profile Novice jsjaco 6 posts since
Oct 12, 2008

Dynamax,

You are correct on the -flat.vmdk still there and the third vmdk is missing. How can the missing diskbe recreated?

Here is the vmx file:

config.version = "8"
virtualHW.version = "4"
floppy0.present = "true"
nvram = "KMB-Main.nvram"
deploymentPlatform = "windows"
virtualHW.productCompatibility = "hosted"
tools.upgrade.policy = "useGlobal"
powerType.powerOff = "default"
powerType.powerOn = "default"
powerType.suspend = "default"
powerType.reset = "default"

displayName = "KMB-Main"
extendedConfigFile = "KMB-Main.vmxf"

numvcpus = "2"
scsi0.present = "true"
scsi0.sharedBus = "none"
memsize = "8672"
scsi0:0.present = "true"
scsi0:0.fileName = "KMB-Main-000022.vmdk"
scsi0:0.deviceType = "scsi-hardDisk"
scsi0:1.present = "true"
scsi0:1.fileName = "KMB-Main_2-000022.vmdk"
scsi0:1.deviceType = "scsi-hardDisk"
scsi0:2.present = "true"
scsi0:2.fileName = "KMB-Main_2.vmdk"
scsi0:2.deviceType = "scsi-hardDisk"
ide0:0.present = "true"
ide0:0.fileName = "/vmfs/devices/genide/vmhba0:1:0"
ide0:0.deviceType = "atapi-cdrom"
ethernet0.present = "true"
ethernet0.wakeOnPcktRcv = "false"
ethernet0.networkName = "VM Network"
ethernet0.addressType = "vpx"
ethernet1.present = "true"
ethernet1.wakeOnPcktRcv = "false"
ethernet1.networkName = "VM Network"
ethernet1.addressType = "vpx"
guestOS = "winnetenterprise"
uuid.location = "56 4d b2 c1 d3 3d f3 03-b9 9f cd 52 32 5a 95 2e"
uuid.bios = "56 4d b2 c1 d3 3d f3 03-b9 9f cd 52 32 5a 95 2e"
sched.cpu.affinity = "all"
sched.mem.affinity = "all"

ethernet0.generatedAddress = "00:50:56:9d:5f:01"
ethernet1.generatedAddress = "00:50:56:9d:60:93"

scsi0:0.redo = ""
scsi0:1.redo = ""
scsi0:2.redo = ""
sched.swap.derivedName = "/vmfs/volumes/49c11759-8172d694-57fd-0030487ed5e0/KMB-Main/KMB-Main-af56f81a.vswp"
hostCPUID.0 = "0000000a756e65476c65746e49656e69"
guestCPUID.0 = "0000000a756e65476c65746e49656e69"
userCPUID.0 = "0000000a756e65476c65746e49656e69"
hostCPUID.1 = "000006f7000408000004e3bdbfebfbff"
guestCPUID.1 = "000006f800010800000022010febbbff"
userCPUID.1 = "000006f7000408000004e3bdbfebfbff"
hostCPUID.80000001 = "00000000000000000000000120100000"
guestCPUID.80000001 = "00000000000000000000000120100000"
userCPUID.80000001 = "00000000000000000000000120100000"
evcCompatibilityMode = "FALSE"

floppy0.startConnected = "false"
floppy0.clientDevice = "true"
guestOSAltName = "Microsoft Windows Server 2003, Enterprise Edition (32-bit)"
sched.cpu.max = "20128"
sched.cpu.units = "mhz"

floppy0.fileType = "device"
floppy0.fileName = ""

scsi0.virtualDev = "lsilogic"
sched.scsi0:0.shares = "normal"
sched.scsi0:1.shares = "normal"
sched.scsi0:2.shares = "normal"

ide0:0.clientDevice = "false"
ide0:0.startConnected = "true"

tools.syncTime = "false"
bios.forceSetupOnce = "false"

tools.remindInstall = "FALSE"

sched.cpu.shares = "high"
sched.mem.shares = "high"

Reply Re: Trying to recover deleted snapshot files. Jun 25, 2009 5:45 AM
in response to: jsjaco
Click to view Dynamax's profile Enthusiast Dynamax 30 posts since
Feb 16, 2008

this should help. You'll need to rename the vmdk to whatever one you're missing from the 3 listed in the vmx file you just posted

http://www.vm-aware.com/2008/06/23/recreating-missing-vmdk-descriptor-files/

Reply Re: Trying to recover deleted snapshot files. Jun 25, 2009 5:55 AM
in response to: Dynamax
Click to view jsjaco's profile Novice jsjaco 6 posts since
Oct 12, 2008

Thanks Dynamax.

I am an extreme novis when it comes to linux commands. I have never used an ssh connection to the esxi server. Any suggestions or could I give you some information on how to contact me to setup some assistance over the phone or a remote connection?

Jeff


Reply Re: Trying to recover deleted snapshot files. Jun 25, 2009 6:00 AM
in response to: jsjaco
Click to view Dynamax's profile Enthusiast Dynamax 30 posts since
Feb 16, 2008

have you got access to the machine to log onto the console then you wont need ssh.

Do you have the root password. You might not be able to directly log in with root so you may need a normal user login and then have to su to root. Do you know these?

Reply Re: Trying to recover deleted snapshot files. Jun 25, 2009 6:04 AM
in response to: Dynamax
Click to view jsjaco's profile Novice jsjaco 6 posts since
Oct 12, 2008
Yes I have the root password. I am not sure what "su to root is though. I have relocated the server to my office and have the VI client install on my workstation.
Reply Re: Trying to recover deleted snapshot files. Jun 25, 2009 6:30 AM
in response to: jsjaco
Click to view Dynamax's profile Enthusiast Dynamax 30 posts since
Feb 16, 2008

alot of setups dont allow the root user to directly log onto the console. Therefore usually another user account is created, once logged on with that account you issue -su command and that will ask for the root password and allow you root access. Do you have a normal account. If you connect the vi client directly to the esx server you could create one and use this to log on and -su.


Reply Re: Trying to recover deleted snapshot files. Jun 25, 2009 6:41 AM
in response to: Dynamax
Click to view jsjaco's profile Novice jsjaco 6 posts since
Oct 12, 2008
I have a user setup. How do I get to the point to type -su? I take it that this is to be done at the server and not through my workstation?
Reply Re: Trying to recover deleted snapshot files. Jun 25, 2009 7:41 AM
in response to: jsjaco
Click to view Dynamax's profile Enthusiast Dynamax 30 posts since
Feb 16, 2008

log in with that user on the console then type su -

it will ask for the root password

Reply Re: Trying to recover deleted snapshot files. Jun 26, 2009 2:07 PM
in response to: Dynamax
Click to view jsjaco37's profile Lurker jsjaco37 1 posts since
Jun 26, 2009
Thank you everyone that gave assistance. This seemed to turn out to be a lost battle.
Actions