How to retrieve the data from vmdk file of Virtual Machine - virtual-machine

I had create a VM using Windows 7 x64 on Window 7 x64. 1 year ago. after that today I tried to start the VM but I'm getting the following error.
"System can not find the specified path"
After doing some google on error I found out that there are 2 different files
one is .vmdk and other is .vmdk
So I found this article explaining
How to recreate missing descriptor file.
But it was not helpful as i don't know what is ESX or ESXi. I Don't have any. I simply used my laptop to create VM using VMware.
What I want is, power on the created VM and retrieve the data in it.
Is there any ways/ alternate way to retrieve the data from those vmdk
file.
Let me know if you need any other information. I don't know much about this. Also I have more than 7 vmdk files.

If you created the Windows 7 x64 VM on a Windows system, hopefully you did it with VMware Workstation.
If so, Workstation has a 'Map Virtual Disks' option where you can mount a VMDK and access it through the host system.
It's available through 'File' -> 'Map Virtual Disks'
More detailed information can be found here: https://pubs.vmware.com/workstation-9/index.jsp?topic=%2Fcom.vmware.ws.using.doc%2FGUID-896E61F5-0865-4D3B-975E-DE476AFC7168.html

Related

How to import a virtual machine?

I was asked to create a virtual machine using vmware but I only received two files:
one with extension .vmsd
another one with extension .disk1
I am not seeing any option how to import such files and have the VM running. Please, any suggestion is highly appreciated.
Vmware Homepage
Click on Open a virtual machine
Open the location of the folder containing VMware files
Click on the config file that will be visible most likely a *.vmxFile to be opened
VMs can be created using two ways.
You can use the OS images provided by the VMware software. i.e., The list of OS available in the dropdown. This is a regular process.
The other way is to use your custom Image file (.iso file). This should be done while creating the VM itself but not after creation. Also your ISO file has to be pass the pre-checks done by the software.
The .vmsd & .disk1 files which you mentioned are for maintaining the metadata & files. You can attack them during the creation of VM in the Attach external disks section if I'm not wrong.

VMWARE - Migration went wrong - failure

Need your help:
Short story, I've tried to migrate a ESXI VM to a new ESXI server and make an huge mistake, instead of copy the VM I move it to a shared folder, NFS, when trying to add inventory it adds, but don't started. I've successfully create the vmx file and VM it worked, but now I have another problem, the VM has more then 1 year old, so it's missing the snapshot. Now start's my doubts and can't figure out after many hours... I've added the snapshot file and the vm but can't figure it out how to put it to work.
This is a picture of the files structure:
enter image description here
The image has two parts the, first it the VM working folder and the other folder "ZZ Temp", has the snapshot and the vm?. I had to create this folder because could not copy them inside the VM already exist also I've copy "Windows Server 2008 R2-000001-delta.vmdk" to the VM It later let me to do so...
Conclusion this is all a mess and can't figure it out how to reaseamble this, can someone help me to do this.
1- Can I copy the files to the old server and reassemble, but I have the same issue it don't let me copy all the files to the VM folder.
2-How can I know if the 300GB "Windows Server 2008 R2-flat.vmdk" file is the base file server?
Do I need it or I just need this 2 from ZZ Temp folder "Windows Server 2008 R2-flat.vmdk","Windows Server 2008 R2-000001-delta.vmdk"
I'm completely lost need your guidance.

Drive Letter Change - Reregister VDI for VirtualBox VM

Today, I was trying to get on my Kali Linux virtual machine to just do a basic vulnerability check on a VPS I own. I have my Kali Linux Virtual Disk Image (VDI) saved on a USB external drive, so I plugged that in, fired up Virtual Box, but I got an error when I went to start it. It would appear that the drive letter for this drive has changed from F: to E:. Thus, VirtualBox could not retrieve the VDI from F:\Kali Linux VM\.
Trying to troubleshoot this on my own, I decided to open up the VM settings, remove the SATA Controller VDI that was registered on the F: drive, and then add the VDI from the E: drive (same VDI, just a difference in drive letter). That, however, did not go as smoothly as planned. I was able to remove incorrect VDI path without any problems, but when I tried to add the VDI on the proper path, I got the following error:
Cannot register the hard disk 'E:\Kali Linux VM\Kali Linux.vdi' {6b214e73-ae38-427b-90f8-995c7dd4211c} because a hard disk 'F:\Kali Linux VM\Kali Linux.vdi' with UUID {6b214e73-ae38-427b-90f8-995c7dd4211c} already exists.
Result Code:
E_INVALIDARG (0x80070057)
Component:
VirtualBoxWrap
Interface:
IVirtualBox {0169423f-46b4-cde9-91af-1e9d5b6cd945}
Callee RC:
VBOX_E_OBJECT_NOT_FOUND (0x80BB0001)
It looks like I cannot add the VDI back to the VM because it is identical to the VDI I removed.
Has anyone else encountered a problem like this? And does anyone have a fix for this so I don't lose all the data on that VM?
Thank you all in advance.
Note: I know this isn't a programming question, so this may be the wrong Stack Exchange. Please let me know if this would be better suited under a different Stack Exchange site.
Open Oracle VM VirtuaBox Manager. Now go to
File > Virtual Media manager
Under Hard disks, select Kali Linux.vdi. Right click and remove it.
NOTE: If remove is disabled. Click release first. Then right click and remove.
Now add the VDI Kali Linux.vdi again.

Using HGFS within VMware to run web server

I have VMware running Ubuntu 14.02 and A Windows 8 Host. I've enabled shared folders and installed VMware tools. Now what I want is to run the web server through /mnt/hgfs/ProjectName
At this point I can access the shared folder from within Ubuntu. I do not have to run sudo to create new folders or files or edit existing. The folder is not mounted as read only and not treated as read only; however, when I try to change the read only attribute within Windows it reverts back afterwards. Is there any clue as to why the web server cannot read the folder as a web server? Even being mounted as read only the web server should be able to read the files.
Turns out the best way to run this is to name the project folder html within vmware and then mount it to the /var/www folder. Now edits have no problem being made and the server runs great for access to both the host and the guest OS.

Cannot connect to Compute Engine CentOS Virtual Machine

I am new to Virtual Machines and CLI so please bear with me.
I have a CentOS 6.5 running on Compute Engine.
I ran yum update (without creating a snapshot of the previous disk - Yes I am an idiot) and not I cannot connect to the machine using the ip address.
I tried the following steps.
Tried to connect through Filezilla - didn't work.
Tried through Putty - didn't work
Tried through the browser option given by the CE console - didn't work.
I even tried creating a snapshot and starting up another VM with the snapshot - didn't work.
If anyone knows how I can get the files and folders out from the previous disk, I can start up a new VM and transfer everything again.
I do not have the latest database and this is important.
Please help!
Thanks
Warren
The way to recover is to delete your VM without deleting the disk, then create another VM with its own boot disk, attach and mount the original disk, and recover any data that you need from it.
First things first: on the VM instances page, click on the instance name that is currently running with that disk, and uncheck the box "Delete boot disk when instance is deleted". Then delete the instance.
Now, create a new instance with its own boot disk. To differentiate this new disk from the original boot disk:
using a different OS (or version of the OS) for the new disk, e.g., if using Ubuntu, try a different version or use Debian; if using RHEL, try CentOS, or vice versa
see which one is mounted at / — this should be the new disk
Mount the original disk as read-only and recover any information you need. Once you have a backup of your data, you can remount it with read-write access and try to fix it (but back up the data first!).
I finally solved this problem thanks to Misha for sending me in the right direction.
The steps are below for anyone who has the same issue.
Problem:
While updating the Centos server using yum update, I was unable to connect back to the server.
I tried all possible combinations but no luck. This seems to be a known issue as there was some material on the Compute Engine site regarding this.
Solution:
I followed the steps as Misha suggested. I started up another VM with its own boot disk and then attached the original disk with read write access.
Note: I was unable to mount the disk as just read only.
The commands were
mkdir /mnt/sdb1
mount /dev/sdb1 /mnt/sdb1
Once I mounted the VM, I copied the files from the html folder in the sdb1 disk to the html folder in the sda1(the new boot disk).
The database was a bit more challenging.
I tried quite a few times but copying the files from /dev/sdb1/var/lib/mysql into the new disk mysql folder was not working.
I found some tutorials but nothing helped.
Finally I downloaded the files from within the /dev/sdb1/var/lib/mysql and put them in my local windows mysql installation within the data folder.
Remember you have to download everything which includes the ib_logfile0 , ib_logfile1 and ibdata1 including the folder which has the *.frm files.
Then I opened localhost/phpmyadmin and voila... the files were there.
The rest was pretty simple... Exporting and uploading the SQL scripts back to the server.
This took me about 12 hours to figure out.
Thanks again Misha.