Rebuild VM with original flat VMDK's

Hello, I need the Experts help with rebuilding a VM. I accidentally deleted most of the files from my VM directory (oops!), luckily it's not production. Anyway, all I have left are the Flat VMDK files from the VM, everything else is gone. Is there a way I can recreate this VM with these two flat VMDK files?
I was thinking I could create a new VM with the same name in the same datastore and the same size VMDK's and possibly copy the flat VMDK's over to it?

Any help is appreciated.

thanks,
SchnizzleAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jakethecatukCommented:
when you create your new VM, when you get to the disk section, choose the option to use an existing disk
0
Luciano PatrãoICT Senior Infraestructure  Engineer  Commented:
Hi

vmdk files is just metadata, the real data is in the flat files

Just try to create a new VM and create the 1 disk with exact the same size. Do this for each disk that was on the deleted VM

Then after this just copy that files to inside of your VM folder. Then power up the VM

I think this will work

Hope this can help
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ploftinCommented:
One question first - for clarification. When you say the only file you have is the flat VMDK file, do you mean you have (for example) VM1_FLAT.VMDK but not the VM1.VMDK?
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

ericnilsCommented:
If you deleted the vmdk file, but not the flat.vmdk file you can do exactly as you suggested.

Create a new VM
Delete the newly created flat.vmdk file
Rename your old flat.vmdk file with the name of the file you just deleted
Start the server

One warning: The disk adapter is part of the vmdk file so make sure you create the new server with the same disk adapter as the old or you might not have the proper drivers loaded in the OS to boot.
0
SchnizzleAuthor Commented:
Wow! thanks all for the qucik responses!

Yes, I have VM1_FLAT.VMDK but not the VM1.VMDK

I have created the new VM, same disk size as the original and same options etc. that the original had. The new VM directory contains five files as list below:
vm1.vmx
vm1.vmdk
vm1_1.vmdk
vm1.vmxf
vm1.vmsd

the original flat files I have are:
vm1-flat.vmdk
vm1_1-flat.vmdk

thanks,
0
SchnizzleAuthor Commented:
I did try using an existing disk when I create the new VM but when I browsed to the flat vmdk's - the browse windows couldn't see them for some reason.
0
ericnilsCommented:
The flat.vmdk files are not disks.  They are the contents of the disk.  The "Disk" as VMware sees it is the .vmdk text configuration file so you have to leave the new .vmdk file in place and replace the new flat.vmdk file with your old one.  

It looks like you might have had two disks on that server if you have two flat files.  Create another disk and follow the same steps I outlined above.
0
Luciano PatrãoICT Senior Infraestructure  Engineer  Commented:
Hi

You cannot use flat vmdk as a existing disk

Jail
0
coolsport00Commented:
I think these KBs should help:
http://kb.vmware.com/kb/1002511
http://kb.vmware.com/kb/1003743

Regards,
~coolsport00
0
Luciano PatrãoICT Senior Infraestructure  Engineer  Commented:
Hi

After creating the new disks, did you copy the flat files to the VM folder?? If yes this will work without any problem

Jail
0
SchnizzleAuthor Commented:
I tried copying the original flat VMDK's to the new VM folder but it said that they already exist. So I moved the new VMDK's out of the new vm directory and then copied the originals over, started the VM and it gave me <unspecified filename> was not found.
So obviously I didn't do something right....
0
ericnilsCommented:
Did you remove both the .vmdk and the flat.vmdk file from the new VM folder?  You should only move the flat.vmdk and leave the new .vmdk file in place.
0
SchnizzleAuthor Commented:
i'm doing this from the ESXi Data Browser interface, I do not see any flat.vmdk files in the directory of the VM I just created - only the .vmdk's  - does esx hide the flat files? When Idid the above operation I moved just the .vmdk's out because I can't see the flat.vmdk's (if they're there).
oes that make sense?
0
ploftinCommented:
Not sure about ESXi, but ESX does hide the flat files using the browser.
0
Luciano PatrãoICT Senior Infraestructure  Engineer  Commented:
Hi

Start again

Create new VM, and new disks

After this copy the flat files to the same folder, replace any files that is that folder

And try again

Jail
0
ericnilsCommented:
You should do this from the command line (SSH) to prevent the GUI from hiding things from you.

This tell you how to enable SSH on ESXi 4.1.  Once you've done that you can connect with putty from Windows (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html).
http://www.thomasmaurer.ch/2010/07/activated-ssh-on-esxi-4-1/
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VMware

From novice to tech pro — start learning today.