VMware to VirtualBox migration
Finally, I joined the VirtualBox bandwagon. Installed it on Linux. Now, what guest do I run? I'm too lazy to install a new OS so I tried to load existing VMware Windows guest image(*.vmdk) .
Didn't work on the 1st try. OK.... I searched internal resource and found Migrate_Windows - VirtualBox. It says there are 3 steps. Took step 1 and tried again. It now dies miserable BSOD.

All right, I have to take step 2&3. So, I read the wiki page once again. Hmm... Correct me if I'm wrong. But..., It says one has to tweak the Windows driver & registry in the ORIGINAL system. In the case of VMware, it may be acceptable. But in case one creates VDI(VirtualBox native image format) from physical Windows system, one have to change physical system first. This is not what people want to do. So I thought I would experiment other means to do the same. What is required here are 2 things.
- Copy files to NTFS
- Modify Windows registry
I tried NtPasswd first. Offline NT Password & Registry Editor . This is a very small(3MB) bootable image specifically created for Windows repair. I have successfully used this for VMware twice in the past. But on VirtualBox, it didn't detect the HDD. I think this is because NtPasswd iso image doesn't have the driver. NtPasswd FAQ page says there is no support for 3rd party driver. So, I gave up on it.
Moving on... I googled and found this page. Hack 75 Reset Lost NT Passwords . I downloaded latest Knoppix iso file and booted with it. It detected the HDD. It didn't have 'Windows Registry Editor' called 'chntpw' installed. So, I followed the instruction and installed chntpw. I could mount NTFS fine and edited a registry value. I finished step#3 here. The only remaining step is #2. I wanted to see if it made any difference so I rebooted this VirtualBox vm. No change. It still dies BSOD.
Now, it looks like I have to really apply step#2. Let's see what kind of files are copied to NTFS.
$ unzip -p MergeIDE.zip MergeIDE.bat|grep -Ei 'expand|ctdir'
set ctdir=%1:\i386
set ctdir=%SystemRoot%\Driver Cache\i386
if exist "%ctdir%\driver.cab" goto isda
echo *** Datei %ctdir%\Driver.cab nicht gefunden ***
expand>NUL "%ctdir%\driver.cab" -f:Atapi.sys "%SystemRoot%\System32\Drivers"
expand>NUL "%ctdir%\driver.cab" -f:Intelide.sys "%SystemRoot%\System32\Drivers"
expand>NUL "%ctdir%\driver.cab" -f:Pciide.sys "%SystemRoot%\System32\Drivers"
expand>NUL "%ctdir%\driver.cab" -f:Pciidex.sys "%SystemRoot%\System32\Drivers"
OK. There are just 4 files. As for registry..., there are so many. I don't write about it today.
So... I have to use 'chntpw' again. Since the Knoppix didn't have it, I seached for Linux Live CD that comes with it. The first one I found was 'BackTrack'(Security Xploded by Nagareshwar Talekar). 2nd one I found was Knoppix-STD. I downloaded the latter and booted the vbox vm with it. I could mount NTFS. It did have a Windows *.cab file extractor tool called 'cabextract' as well. And I confirmed 4 required driver files are right there in WINDOWS folder. Nice! I think most Windows installation have these 4 files somewhere within C: drive.
Unlike what the name suggests, 'chntpw' is not just for changing password. It's a registry editor.
Here's me checking 'agp440' service that was mentioned in VirtualBox wiki.

<Start> value was '0'(BOOT_START) but I changed it to '4'(Diabled) using this tool.
So... it looks like it's doable. i.e.) one doesn't boot into original system to make the vm work in VirtualBox.
The remaining part is mass registry update. Here, I found a 'expect' script which feeds input to 'chntpw'. Nice!
Remastering Knoppix as a Windows Rescue CD (aioscript) - Knoppix.net
Maybe I can convert Windows *.reg file to expect script.
You probably need to do an "SFC /scannow" after you boot the new windows because the versions of the sys files you copy in will normally be wrong. If you do the copy on a running system the SFC will replace the versions of intelide.sys with the correct versions from the current service pack (It'll even do this if you make a new empty file called intelide.sys) but there's no trigger for it to repair if windows isn't running when you do the update.
Having said this I'd be more inclined to just go ahead and do it on the original machine; assuming I have an image backup of course. see: http://support.microsoft.com/kb/314082
Posted by Robert on April 06, 2008 at 06:17 PM JST #
Thanks, Robert. Please see my newest entry also.
http://blogs.sun.com/LetTheSunShineIn/entry/migrating_vmware_virtualbox_windows_xp
Posted by Katsumi INOUE on April 07, 2008 at 01:35 AM JST #
Thanks for this blog entry.. it seems like it will help me out greatly. However, I can't figure out how the 'expect' script updates the XP registry. Can you elaborate on that?
thanks!
Posted by Cowmix on April 18, 2008 at 12:44 AM JST #
Cowmix,
Can you please read http://blogs.sun.com/LetTheSunShineIn/entry/migrating_vmware_virtualbox_windows_xp ?
For XP, I think it will work.
As for 'expect', I thought I would use it for mass offline registry update. If one wants to change many registry entry from Linux, it should be automated in some way.
Posted by Katsumi INOUE on April 19, 2008 at 10:17 AM JST #
Posted by Let the Sunshine In on August 29, 2008 at 04:16 PM JST #