VMware Cloud Community
loflof
Contributor
Contributor

delta.vmdk accidentally deleted and VM cannot power on

I am in a mess.

We accidentally deleted the delta.vmdk files of a VM (in a bid to have more disk space).

The VM cannot power on. It throws us the following error: "Failed to power on: A file was not found".

Have we lost this VM? is there anything we can do to resolve this mess? all the other files (i.e. vmdk files, vmx, vmsd, and vmxf) are still intact.

Any suggestions?

Thanks

Reply
0 Kudos
17 Replies
oreeh
Immortal
Immortal

If you don't need the delta anymore edit the VMX to point it to the base disk.

If you need the delta stop doing anything and call Support.

Reply
0 Kudos
fakber
VMware Employee
VMware Employee

If you have deleted the delta file, then you must have had a snapshot on this VM. Deleting the delta file has caused you to lose any changes that were made to the VM's disks since the creation of the snapshot.

Once a snapshot is deleted you can run from the base disk but will have lost all of the changes.

Currently since you only deleted the delta disks, the system may still be pointing to it. I would suggest going in the VI Client and remove the disks and re-add them back to the VM and see if that will correct the pointers to the files.

Good Luck,

Faisal

Reply
0 Kudos
loflof
Contributor
Contributor

Thanks for your quick response.

How do I do this? Here is a copy of my vmx file:

###################################################################################

#!/usr/bin/vmware

config.version = "8"

virtualHW.version = "4"

floppy0.present = "true"

nvram = "SQLDEV.nvram"

powerType.powerOff = "default"

powerType.powerOn = "default"

powerType.suspend = "default"

powerType.reset = "default"

displayName = "SQLDEV"

extendedConfigFile = "SQLDEV.vmxf"

scsi0.present = "true"

scsi0.sharedBus = "none"

scsi0.virtualDev = "lsilogic"

memsize = "1024"

scsi0:0.present = "true"

scsi0:0.fileName = "SQLDEV-000001.vmdk"

scsi0:0.deviceType = "scsi-hardDisk"

ide0:0.present = "true"

ide0:0.fileName = "/dev/cdrom"

ide0:0.deviceType = "atapi-cdrom"

ide0:0.startConnected = "false"

floppy0.startConnected = "false"

floppy0.fileName = "/dev/fd0"

floppy0.clientDevice = "true"

ethernet0.present = "true"

ethernet0.allowGuestConnectionControl = "false"

ethernet0.networkName = "HQ_Internal"

ethernet0.addressType = "vpx"

guestOS = "winnetenterprise"

uuid.bios = "50 2e 3c 32 61 9e a2 93-21 f4 4b a0 ed bb e4 83"

log.fileName = "vmware.log"

sched.cpu.min = "0"

sched.cpu.units = "mhz"

sched.cpu.shares = "normal"

sched.mem.minsize = "0"

sched.mem.shares = "normal"

toolScripts.afterPowerOn = "true"

toolScripts.afterResume = "true"

toolScripts.beforeSuspend = "true"

toolScripts.beforePowerOff = "true"

ethernet0.generatedAddressOffset = "0"

scsi0:0.redo = ""

tools.syncTime = "FALSE"

vmware.tools.requiredversion = "7201"

ethernet0.generatedAddress = "00:50:56:ae:7d:be"

uuid.location = "56 4d b1 61 46 87 91 5e-52 81 ac 62 e8 88 3b a4"

sched.swap.derivedName = "/vmfs/volumes/46485cdf-76cc1749-ff71-0019b9c9f755/SQLDEV/SQLDEV-830bd73a.vswp"

ide0:0.clientDevice = "false"

scsi0:1.present = "true"

scsi0:1.fileName = "SQLDEV_1-000001.vmdk"

scsi0:1.deviceType = "scsi-hardDisk"

scsi0:2.present = "true"

scsi0:2.fileName = "SQLDEV_2-000001.vmdk"

scsi0:2.deviceType = "scsi-hardDisk"

scsi0:1.redo = ""

scsi0:2.redo = ""

Reply
0 Kudos
oreeh
Immortal
Immortal

Edit the following line

scsi0:0.fileName = "SQLDEV-000001.vmdk"

to

scsi0:0.fileName = "SQLDEV.vmdk"

provided the base disk is SQLDEV.vmdk (probablity 99.99%)

Before editing the VMX remove the invalid VM from inventory.

Again: Only do this if you don't need the data in the snapshot anymore !!!

Message was edited by: oreeh

Reply
0 Kudos
loflof
Contributor
Contributor

Thanks.

I have removed the invalid VM from the inventory, and editted the vmx file.

I need to get this machine back - what is the next step? (sorry) - I am a newbie Smiley Happy

Thanks

Reply
0 Kudos
oreeh
Immortal
Immortal

Readd it to the inventory:

Either use the datastore browse to browse to the VM folder, right click the VM and select register

or use the following command in the Service Console "vmware-cmd -s register path_to_the_vmxfile"

After that start the VM.

Depending how / when the snapshot was created the VMs filesystem isn't clean.

Reply
0 Kudos
loflof
Contributor
Contributor

It fails on registration thus:

vmware-cmd -s register SQLDEV.vmx

VMControl error -999: Unknown error: SoapError: ServerFaultCode(1588) : (Invalid datastore format '[]SQLDEV.vmx'.)

Any suggestions?

Thanks

Reply
0 Kudos
oreeh
Immortal
Immortal

You have to include the complete path in the vmware-cmd command

Example: vmware-cmd -s register /vmfs/volumes/testlun02/SQL_Server/SQLDEV.vmx

If the path contains spaces enclose it in double quotes.

Reply
0 Kudos
loflof
Contributor
Contributor

Thanks for the tip.

The VM was successfully registered. However, even with the edited vmxfile, on power on, I got the same error:

"Failed to power on: File not found" - any more suggestions?

Thanks

Reply
0 Kudos
oreeh
Immortal
Immortal

Post a file listing (including file sizes) of the VM folder.

Reply
0 Kudos
loflof
Contributor
Contributor

Here it is:

###############################################################################################

ls -alh

total 93G

drwxr-xr-x 1 root root 3.7K Dec 5 16:48 .

drwxrwxrwt 1 root root 2.9K Nov 9 11:08 ..

-rw------- 1 root root 247 Dec 5 12:41 SQLDEV-000001.vmdk

-rw------- 1 root root 252 Dec 5 12:41 SQLDEV_1-000001.vmdk

-rw------- 1 root root 60G Oct 9 11:17 SQLDEV_1-flat.vmdk

-rw------- 1 root root 341 Sep 20 11:38 SQLDEV_1.vmdk

-rw------- 1 root root 251 Dec 5 12:41 SQLDEV_2-000001.vmdk

-rw------- 1 root root 20G Oct 9 11:18 SQLDEV_2-flat.vmdk

-rw------- 1 root root 340 Sep 20 11:38 SQLDEV_2.vmdk

-rw------- 1 root root 12G Oct 9 11:18 SQLDEV-flat.vmdk

-rw------- 1 root root 8.5K Dec 5 12:41 SQLDEV.nvram

-rw------- 1 root root 18K Oct 9 11:18 SQLDEV-Snapshot1.vmsn

-rw------- 1 root root 338 Sep 20 11:38 SQLDEV.vmdk

-rw------- 1 root root 640 Oct 9 11:18 SQLDEV.vmsd

-rwxr-xr-x 1 root root 1.8K Dec 5 16:48 SQLDEV.vmx

-rw------- 1 root root 250 Dec 5 16:45 SQLDEV.vmxf

-rwxr-xr-x 1 root root 1.8K Dec 5 16:04 SQLDEV.vmx.ORIG

-rw-rr 1 root root 29K Dec 5 13:44 vmware-13.log

-rw-rr 1 root root 16K Dec 5 14:40 vmware-14.log

-rw-rr 1 root root 16K Dec 5 14:43 vmware-15.log

-rw-rr 1 root root 16K Dec 5 15:31 vmware-16.log

-rw-rr 1 root root 16K Dec 5 16:09 vmware-17.log

-rw-rr 1 root root 18K Dec 5 16:45 vmware-18.log

-rw-rr 1 root root 18K Dec 5 16:48 vmware.log

-r----


1 root root 1.0M Dec 5 12:16 vmware-vmx-zdump.0

-r----


1 root root 60K Dec 5 12:24 vmware-vmx-zdump.1

-r----


1 root root 5.6M Dec 5 13:44 vmware-vmx-zdump.2

Reply
0 Kudos
oreeh
Immortal
Immortal

You deleted the snapshots of all the disks, so try the following VMX

#!/usr/bin/vmware
config.version = "8"
virtualHW.version = "4"
floppy0.present = "true"
nvram = "SQLDEV.nvram"
powerType.powerOff = "default"
powerType.powerOn = "default"
powerType.suspend = "default"
powerType.reset = "default"

displayName = "SQLDEV"
extendedConfigFile = "SQLDEV.vmxf"

scsi0.present = "true"
scsi0.sharedBus = "none"
scsi0.virtualDev = "lsilogic"
memsize = "1024"
scsi0:0.present = "true"
scsi0:0.fileName = "SQLDEV.vmdk"
scsi0:0.deviceType = "scsi-hardDisk"
ide0:0.present = "true"
ide0:0.fileName = "/dev/cdrom"
ide0:0.deviceType = "atapi-cdrom"
ide0:0.startConnected = "false"
floppy0.startConnected = "false"
floppy0.fileName = "/dev/fd0"
floppy0.clientDevice = "true"
ethernet0.present = "true"
ethernet0.allowGuestConnectionControl = "false"
ethernet0.networkName = "HQ_Internal"
ethernet0.addressType = "vpx"
guestOS = "winnetenterprise"
uuid.bios = "50 2e 3c 32 61 9e a2 93-21 f4 4b a0 ed bb e4 83"
log.fileName = "vmware.log"
sched.cpu.min = "0"
sched.cpu.units = "mhz"
sched.cpu.shares = "normal"
sched.mem.minsize = "0"
sched.mem.shares = "normal"
toolScripts.afterPowerOn = "true"
toolScripts.afterResume = "true"
toolScripts.beforeSuspend = "true"
toolScripts.beforePowerOff = "true"

ethernet0.generatedAddressOffset = "0"
scsi0:0.redo = ""
tools.syncTime = "FALSE"
vmware.tools.requiredversion = "7201"

ethernet0.generatedAddress = "00:50:56:ae:7d:be"

uuid.location = "56 4d b1 61 46 87 91 5e-52 81 ac 62 e8 88 3b a4"
sched.swap.derivedName = "/vmfs/volumes/46485cdf-76cc1749-ff71-0019b9c9f755/SQLDEV/SQLDEV-830bd73a.vswp"

ide0:0.clientDevice = "false"

scsi0:1.present = "true"
scsi0:1.fileName = "SQLDEV_1.vmdk"
scsi0:1.deviceType = "scsi-hardDisk"
scsi0:2.present = "true"
scsi0:2.fileName = "SQLDEV_2.vmdk"
scsi0:2.deviceType = "scsi-hardDisk"

scsi0:1.redo = ""
scsi0:2.redo = ""

Reply
0 Kudos
loflof
Contributor
Contributor

Thanks for all your help,

with vmx file you have editted for me, I get this error:

vmware-cmd -s register /vmfs/volumes/VMFS-2/SQLDEV/SQLDEV.vmx

VMControl error -999: Unknown error

Any suggestions?

Thanks

Reply
0 Kudos
oreeh
Immortal
Immortal

In this case create a new VM and attach the existing disks to the new VM.

Reply
0 Kudos
fakber
VMware Employee
VMware Employee

If you're getting a 999 error, try the attaching of the VM as oreeh says, but if that fails, restart hostd/vpxa.

To restart those agents run:

service mgmt-vmware restart

service vmware-vpxa restart

loflof
Contributor
Contributor

Thanks a million Fakber and Oreeh.

You guys are incredibly patient and brilliant.

I now know not to delete the *delta.vmdk files from the cmd line Smiley Happy

Cheers.

Reply
0 Kudos
loflof
Contributor
Contributor

Please look at the entire posting for the solution.

Reply
0 Kudos