Switching from Vmware to Virtual Box
Switching from Vmware to Virtual Box
by Craig Mayhew on Sat 16th Feb 2013 under Guides/Fixes
So I accidentally let one of my SSDs completely run out of space. My VM running on this disk then promptly crashed. I knew I had to repair it - but while I'm at it - I'm going to convert it to Oracles virtual box.
First problem is that my virtual disk is corrupted - this happens when you run out of space because the disk suddenly can't write the data it was expecting to write to disk. Ideally you will have a backup - but if you don't then make one now and then try to repair it using the application vmware-vdiskmanager.exe. Obviously - it needs to be moved to a drive that has space or you need to create some space on the full drive.
Open a command prompt and navigate to the directory containing your virtual disk. In my case this is the command:
cd "E:\Windows 7\"
Then, in my case the repair command was:
E:\Windows 7>"C:\Program Files (x86)\VMware\VMware Server\vmware-vdiskmanager.exe" -R "Windows 7_1500GB.vmdk"
If all goes well you will see this message:
The virtual disk, 'Windows 7_1500GB.vmdk', was corrupted and has been successfully repaired.
In the case of my windows 7 guest OS - it still had corrupted files even though the disk itself was now fine.
To find out if you have corrupted drivers etc then run this tool from within your guest: http://support.microsoft.com/kb/929833
Fixing DLL corruption in Windows 7 Service Pack 1
If, like me you managed to run out of disk space and corrupt your virtual disk, you may well find some of the dll files are a little "crashy". To repair this, you will need your Windows install DVD. If you are running Windows 7 Service Pack 1 - and you find your install DVD is without the Service pack, then the repair install will fail saying you can't overwrite a newer version of windows. To "work around" the issue, simply run the setup.exe in compatibility mode for "Vista service pack 2". This bodge worked for me. However, you should make a backup of your disk images before trying.
Converting to Virtual Box
To convert the disks run this command (modified for your paths etc):
E:\Windows 7>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" clonehd --format VDI "E:\Windows 7\Windows 7_1500GB.vmdk" F:\dDrive.vdi
Clone hard disk created in format 'VDI'. UUID: 9c41acd3-1e97-4792-9b37-1b4f7329ba25
I decided to create a virtual box machine and import the two hard disks. This would have worked great except I picked the wrong disk controller when setting up the machine. Which results in windows 7 showing this message at boot time:
A problem has been detected and Windows has been shut down to prevent damage to your computer.
If this is the first time you've seen this stop error screen, restart your computer. If this screen appears again, follow these steps: If this screen appears again, follow these steps:
Check for viruses on your computer. Check for viruses on your computer. Remove any newly installed hard drives or hard drive controllers. Remove any newly installed hard drives or hard drive controllers. Check your hard drive to make sure it is properly configured and terminated. Check your hard drive to make sure it is properly configured and terminated. Run CHKDSK /F to check for hard drive corruption and then restart your computer. Run CHKDSK / F to check for hard drive corruption and then restart your computer.
Technical information: Technical information:
*** Stop: (0xF78E2640, 0xC0000034, 0x00000000, 0x00000000)
The fix for me was to realise that vmwares "SCSI: LSI Logic SAS" translates to "SAS Controller" of type "LSI Logic SAS".
At this point my virtual box image boots but it is very unstable. It rebooted a few times to install the newly found hardware but then kept blue screening. This was due to disk corruption. Running chkdsk from within the VM (took about an hour) solved the issue. If still having issues - see the driver repair install further up this page.
Now - another issue I found is that copying VM disks can also cause issues due to the uuid that VirtualBox assigns to each disk. If you ever need to change the uuid, this is how you do it:
cd c:\Program Files\Oracle\VirtualBox
VBoxManage internalcommands sethduuid "E:\Windows 7\cDrive.vdi
Do not forget about VMWARE Tools
This is a pain to remove. This is the best guide I have found, also even the automated removal fails to get rid of all the registry keys, so you need to do manually (see the guide). http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1308
Back to home
© 2005-2020 Craig Mayhew