Solved

Rebuild VM with original flat VMDK's

Posted on 2010-08-17
16
3,618 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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
 
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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

This article will show you how to create an ISO CD-ROM/DVD-ROM image (*.iso), and MD5 checksum signature, for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5). It's a good idea to compare checksums, because many installations fail because of a corr…
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
Teach the user how to configure vSphere clusters to support the VMware FT feature Open vSphere Web Client: Verify vSphere HA is enabled: Verify netowrking for vMotion and FT Logging is in place or create it: Turn On FT for a virtual machine: Verify …
How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…

825 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