Hello,
I had installed a test ESX with VSphere 6.7, and created a few VMs. Then I needed to change the ESX RAID configuration.
- First I downloaded the VMs files on a another machine, using the datastore browser. The VMDK files were renamed filename_flat.vmdk ('_flat' added to the filename), and expanded to their max size.
- I powered off the ESX, change the Raid configuration, reinstalled VSphere 6.7, and create new datastores
- I uploaded the VMs files on a new datastore, in the same subfolders as they were on the previous installation
- I added existing VMs using the VMX files. No issue.
- I then tried to power up a VM, but each time I had the same message 'Unable to enumerate all disks'.
- I've changed in the VMX file the VMDK filename, to add the '_flat' text, but same issue.
- I've changed the VMDK filename to remove the '_flat' text, reset the VMX file to its original value, but still the same
Is there still hope to recover my VMs, or are they definitively lost ? :-(((
Thanks for your help,
Xavier
Could you post vmware.log file of this vm which you are trying to power on ??
regards
Gayathri
For one VM, can you run the below commands from within the VM folder and share the output?
1) ls -lrht *vmdk* | grep -i flat
2) ls -l *vmdk*
3) grep -i vmdk VM-name.vmx
4) cat VM-name.vmdk <-- For all the descriptor files
Cheers,
Supreet
Welcome to the Community,
When you downloaded the files from the datasatore browser, you should actually have downloaded two .vmdk files,. A small descriptor <vmname>.vmdk file, and the data <vmname<-flat.vmdk file. The small one only contains metadata, which descripbes the geometry, ... of the large one.
In case you don't have the small one, it may be recreated (see https://kb.vmware.com/s/article/1002511).
In case you are unsure, provide the information that the other users have already asked for, and we'll be glad to help.
Btw. do you remember whether the VMs were originally created with thin, or thick provisioned virtual disks?
To put it together:
André
PS: You will find the "Attach" link on the lower right in the reply window.
I think the VMs were created with Thin provisioning (I didn't create them by myself).
I downloaded all the VMs files from the datastore browser, but there was no small vmdk file. I had 4 files :
- a nvram file
- a vmx file
- the filename_flat.vmdk file
- a vmsd file (empty).
[root@CMPNYEX0001:/vmfs/volumes/5b71493b-cdf5f126-b1d9-90b11c5479bf/CMPNYTP0006] ls -lisa
total 67111040
2948 128 drwxr-xr-x 1 root root 73728 Aug 16 11:03 .
4 1024 drwxr-xr-t 1 root root 77824 Aug 14 15:40 ..
20974468 67108864 -rw-r--r-- 1 root root 68719476736 Aug 15 04:14 CMPNYTP0006-flat.vmdk
4197252 1024 -rw-r--r-- 1 root root 270840 Aug 14 15:05 CMPNYTP0006.nvram
8391556 0 -rw-r--r-- 1 root root 0 Aug 14 15:05 CMPNYTP0006.vmsd
12585860 0 -rw-r--r-- 1 root root 3311 Aug 14 15:05 CMPNYTP0006.vmx
[root@CMPNYEX0001:/vmfs/volumes/5b71493b-cdf5f126-b1d9-90b11c5479bf/CMPNYTP0006]
I've attached the vmx file, but could not find any vmware.log file for this VM, even after trying multiple times to power it up.
[root@CMPNYEX0001:/vmfs/volumes/5b71493b-cdf5f126-b1d9-90b11c5479bf/CMPNYTP0006] ls -lrht *vmdk* | grep -i flat
-rw-r--r-- 1 root root 64.0G Aug 15 04:14 CMPNYTP0006-flat.vmdk
[root@CMPNYEX0001:/vmfs/volumes/5b71493b-cdf5f126-b1d9-90b11c5479bf/CMPNYTP0006] ls -l *vmdk*
-rw-r--r-- 1 root root 68719476736 Aug 15 04:14 CMPNYTP0006-flat.vmdk
[root@CMPNYEX0001:/vmfs/volumes/5b71493b-cdf5f126-b1d9-90b11c5479bf/CMPNYTP0006] grep -i vmdk CMPNYTP0006.vmx
scsi0:0.fileName = "CMPNYTP0006.vmdk"
[root@CMPNYEX0001:/vmfs/volumes/5b71493b-cdf5f126-b1d9-90b11c5479bf/CMPNYTP0006] cat CMPNYTP0006.vmdk
cat: can't open 'CMPNYTP0006.vmdk': No such file or directory
I've recreated a descriptor .vmdk file. Please upload the attached .vmdk file to the VM's folder on the datastore to see whether this works.
Since you've used the datastore browser to download the virtual disk files, it's now thick provisioned. In case you'd like make it thin again, you may e.g. use the vmkfstools command line utility to clone the virtual disk to a thin provisioned disk.
André
Great !! It worked perfectly ! 🙂
As soon as I uploaded your vmdk file using the datastore browser, my VMname-flat.vmdk file disappear, and I could only see 1 VMDK file, with the size of the whole disk : 64GB
Can I just change the name of the VM in your VMDK file and apply it to all my others VMs, or are there any other parameters to change ?
Iv'e copied the file that André sent for all VMs, just change the VMname in it, and then the filename itself, and then I could boot all my VMs :-))
Thanks to all of you !
Can I just change the name of the VM in your VMDK file and apply it to all my others VMs, or are there any other parameters to change ?
What's important is not only the file name, and the flat.vmdk file's name within the file, but also the geometry, and the provisioned size (in 512kB blocks).
Caution: If you just copy the file, replace file names and use it for another virtual disk with a different provisioned size, you may be able to power on the VM, but this will most likely result in data corruption, or loss.
André
I ran in to the unable to enumerate disk error as well. It turned out that the VMSD file had an absolute path for snapshot0.disk1.fileName pointing to an invalid path. I fixed the path and was able to start my VM.