Solved

Rebuild VM with original flat VMDK's

Posted on 2010-08-17
16
3,747 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 23

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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
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 23

Expert Comment

by:Luciano Patrão
ID: 33458611
Hi

You cannot use flat vmdk as a existing disk

Jail
0
 
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 23

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 23

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 learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
Ransomware is a malware that is again in the list of security  concerns. Not only for companies, but also for Government security and  even at personal use. IT departments should be aware and have the right  knowledge to how to fight it.
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:
This Micro Tutorial walks you through using a remote console to access a server and install ESXi 5.1. This example is showing remote access and installation using a Dell server. The hypervisor is the very first component of your virtual infrastructu…

696 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