?
Solved

Rebuild VM with original flat VMDK's

Posted on 2010-08-17
16
Medium Priority
?
4,075 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 24

Accepted Solution

by:
Luciano Patrão earned 856 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 4

Assisted Solution

by:ericnils
ericnils earned 1144 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 1144 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 24

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 24

Assisted Solution

by:Luciano Patrão
Luciano Patrão earned 856 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 1144 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 24

Assisted Solution

by:Luciano Patrão
Luciano Patrão earned 856 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 1144 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

Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

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…
In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
This Micro Tutorial steps you through the configuration steps to configure your ESXi host Management Network settings and test the management network, ensure the host is recognized by the DNS Server, configure a new password, and the troubleshooting…
In this video tutorial I show you the main steps to install and configure  a VMware ESXi6.0 server. The video has my comments as text on the screen and you can pause anytime when needed. Hope this will be helpful. Verify that your hardware and BIO…
Suggested Courses

801 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