Solved

Rebuild VM with original flat VMDK's

Posted on 2010-08-17
16
3,487 Views
Last Modified: 2012-06-27
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,
0
Comment
Question by:Schnizzle
  • 4
  • 4
  • 4
  • +3
16 Comments
 
LVL 23

Expert Comment

by:jakethecatuk
ID: 33458230
when you create your new VM, when you get to the disk section, choose the option to use an existing disk
0
 
LVL 22

Accepted Solution

by:
Luciano Patrão earned 214 total points
ID: 33458262
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
 
LVL 5

Expert Comment

by:ploftin
ID: 33458270
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
 
LVL 4

Assisted Solution

by:ericnils
ericnils earned 286 total points
ID: 33458319
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
 

Author Comment

by:Schnizzle
ID: 33458405
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
 

Author Comment

by:Schnizzle
ID: 33458480
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
 
LVL 4

Assisted Solution

by:ericnils
ericnils earned 286 total points
ID: 33458609
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
 
LVL 22

Expert Comment

by:Luciano Patrão
ID: 33458611
Hi

You cannot use flat vmdk as a existing disk

Jail
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 40

Expert Comment

by:coolsport00
ID: 33458627
I think these KBs should help:
http://kb.vmware.com/kb/1002511
http://kb.vmware.com/kb/1003743

Regards,
~coolsport00
0
 
LVL 22

Assisted Solution

by:Luciano Patrão
Luciano Patrão earned 214 total points
ID: 33458655
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
 

Author Comment

by:Schnizzle
ID: 33458776
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
 
LVL 4

Assisted Solution

by:ericnils
ericnils earned 286 total points
ID: 33458847
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
 

Author Comment

by:Schnizzle
ID: 33458906
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
 
LVL 5

Expert Comment

by:ploftin
ID: 33458984
Not sure about ESXi, but ESX does hide the flat files using the browser.
0
 
LVL 22

Assisted Solution

by:Luciano Patrão
Luciano Patrão earned 214 total points
ID: 33459033
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
 
LVL 4

Assisted Solution

by:ericnils
ericnils earned 286 total points
ID: 33459103
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

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

It Is not possible to enable LLDP in vSwitch(at least is not supported by VMware), so in this article we will enable this, and also go trough how to enabled CDP and how to get this information in vSwitches and also in vDS.
HOW TO: Connect to the VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere (HTML5 Web) Host Client 6.5, and perform a simple configuration task of adding a new VMFS 6 datastore.
Teach the user how to rename, unmount, delete and upgrade VMFS datastores. Open vSphere Web Client: Rename VMFS and NFS datastores: Upgrade VMFS-3 volume to VMFS-5: Unmount VMFS datastore: Delete a VMFS datastore:
Teach the user how to join ESXi hosts to Active Directory domains Open vSphere Client: Join ESXi host to AD domain: Verify ESXi computer account in AD: Configure permissions for domain user in ESXi: Test domain user login to ESXi host:

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now