Hello everyone,
After several months trying to convert a Windows XP virtual machine from VMware to Oracle VirtualBox, I have finally got it working with some help of Oracle VirtualBox Community(I am GenghisKhan there), that you will be able to check in the end of this tutorial, and my objective here was to create a step by step tutorial with all the necessary steps, since I was unable to find one who have worked.
Necessary programs and tools:
- A Windows 7/8/10 Host
- Windows XP VMware Virtual Machine
- A Windows 10 VirtualBox Virtual Machine
- MergeIDE
- OVFTool 4.0
- TestDisk 7.0 from CGSecurity
Note that in order for you to be able to download from VMware you just need to create an account in their website, and then it will start downloading.
The steps necessary to acchive this are:
1 – Turn ON the Windows XP Virtual Machine(VM) from VMware and uninstall all vmware tools from “Add/Remove Programs” from the VM.
Note, if you dont have a VMware to open the target VM, you can always use the free version of VMware Workstation Player to gain access to its content.
2 – Download and execute MergeIDE.
3 – Then you must export the VMware VM to OVF format in order to be able to import it from VirtualBox, and to acchieve that you must download and install OVFTool.
2 – Open the Command Line with elevated privileges as an Administrator and navigate to where OVFTool is placed and convert to OVF:
4.1 – Navigate to the location of OVFTool(I assume that you have OVFTool in the default instalation path):
cd “C:\Program Files (x86)\VMware\VMware OVF Tool”
4.2 – Here can take sometime, depending in the size of your Windows XP VM:
ovftool “<path>\<VMware VM Name>.vmx” “<path>\<VirtualBox file to be imported next>.ovf”
5 – Import the OVF file in you VirtualBox.
6 – Then go to your new VM Settings in VirtualBox, and dettach in Storage the virtual disk where Windows XP is, and attach it in SATA controller of your other Windows 10 VM in VirtualBox, side by side of your already installed Windows 10 virtual disk, and start Windows 10 VM.
7 – Now download, unzip the folder and execute TestDisk 7.0, through testdisk_win.exe.
8 – In the Command Line Interface, do:
8.1 – Select “No Log”.
8.2 – Select the virtual disk of Windows XP that you have attached.
8.3 – Select “Intel/PC partition”.
8.4 – Select “MBR Code – Write TestDisk MBR code to first sector”.
8.5 – Confirm “Write a new copy of MBR code to first sector” writing “yes”.
8.6 – Confirm “Write a new copy of MBR code, confirm” writing “yes”.
8.7 – Select OK after the new copy of MBR code has been written.
8.8 – Now select “Advanced – Filesystem Utils”.
8.9 – In the next window select “Boot”.
8.10 – Then choose “Rebuild BS”.
8.11 – Select “Write”.
8.12 – Type of Filesystem (NTFS)
8.13 – In the end of the rebuild, leave the tool using “Quit” till all windows are closed
9 – Turn OFF the Windows 10 VM, and unattach the virtual disk going again to VM Settings, Storage and select the virtual disk and remove, and OK. And go the same part in Windows XP VM, and remove all Controllers there. Then create a new IDE Controller and attach the virtual disk there, and OK.
10 – Then go to Network in Windows XP VM Settings, and expand the “Advanced” and choose in “Adapter Type” the adapter “PCnet-FAST III (Am79C973)”, and OK.
11 – Turn ON the Windows XP VM, and if everything had been done correctly it will boot without problem, and also with a network adapter working inside of the VM.
Note that if you get in Windows XP any window to reactivate Windows, you will need to reactivate it in order to get access of yout previous account or accounts. To do this you can always use the phone call option, or change the MacAddress of that VM to the same that you had in VMware VM.
I hope that this tutorial could help others facing the same problem.
Special thanks to luminelx64:
https://forums.virtualbox.org/viewtopic.php?f=7&t=56195&p=431345#p431345
winxpimage
Windows XP OVA virtual image file to be used on Virtual Box, VmWare.
This image was created for students that are learning pentesting in order to follow many penetratin testing books like «Penetration Testing: A Hands-On Introduction to Hacking». Today is very hard to find Windows XP images or even ISO’s so I had created this to help you out. This is a clean installation. I had created the OVA file right after the Windows XP instalation from the ISO file and this can save you some time.
Disclaimer!
Be careful using this machine as Windwows XP is not support by Microsoft for a long time ago and it’s full of vulnerabilities! Use it with care!
Download Link
Google Drive — https://drive.google.com/file/d/1GrMcl90R36AoQXvJkiTp_npzxV0UESnW/view?usp=sharing
Credentials
There are no credentials. I turned off the guest user and the only existing user is the Administrator. No password.
Windows XP Screenshot
Notes
For any feedback feel free to create an issue here or reach out to me over Twitter — @lucianoferrari
- Publication date
-
2022-10-18
- Usage
- Public Domain Mark 1.0
- Topics
- virtualbox, vbox, vm, virtual machine, windows xp, ova
- Language
- English
- Item Size
- 857.8M
A Vbox OVA file for easy setup instead of having to install manually
- Addeddate
- 2022-10-21 02:04:15
- Identifier
- windows-xp_20221021
- Scanner
- Internet Archive HTML5 Uploader 1.7.0
plus-circle Add Review
plus-circle Add Review
comment
Reviews
(2)
There are 2 reviews for this item. .
1,198
Views
1
Favorite
2
Reviews
DOWNLOAD OPTIONS
download 1 file
ITEM TILE download
download 1 file
JPEG download
download 1 file
TORRENT download
download 9 Files
download 8 Original
SHOW ALL
IN COLLECTIONS
Community Software
Uploaded by
FunAni798
on
Recently I had migrated laptops and I wanted to move my VMware workstation VMs to VirtualBox. All of my VMs were in the .vmware folder so I just copied that to my laptop. Here are the contents of that folder:
[elatov@klaptop ~]$ ls -1 .vmware/
ace.dat
dndlogs
favorites.vmls
inventory.vmls
playerUploadedData.log
preferences
preferences-private
shortcuts
UCSPM
unity-helper.conf
view-preferences
Windows XP Professional
workstationUploadedData.log
There are only two VMs: UCSPM (the UCS Manager Emulator) and Windows XP Professional (My Windows XP machine). I am just going to convert my Windows XP machine. Inside that folder, I saw the following:
[elatov@klaptop ~]$ ls -1 .vmware/Windows\ XP\ Professional/
caches
vmware-0.log
vmware-1.log
vmware-2.log
vmware.log
Windows XP Professional.nvram
Windows XP Professional-s001.vmdk
Windows XP Professional-s002.vmdk
Windows XP Professional-s003.vmdk
Windows XP Professional-s004.vmdk
Windows XP Professional-s005.vmdk
Windows XP Professional-s006.vmdk
Windows XP Professional-s007.vmdk
Windows XP Professional-s008.vmdk
Windows XP Professional-s009.vmdk
Windows XP Professional-s010.vmdk
Windows XP Professional-s011.vmdk
Windows XP Professional.vmdk
Windows XP Professional.vmsd
Windows XP Professional.vmx
Windows XP Professional.vmxf
Pretty standard stuff, but I realized that when I created that VM I used the 2GB Split Sparse VMDK format. I don’t even know why I did that. I was probably thinking that if I was backing up to a FAT32 partition then this might help out. But who uses FAT partitions anymore?
So the first thing I wanted to do, was to convert the 2GB Split Spare VMDKs into a single monolithic VMDK (also reffered to as Monolithic Sparse VMDK). You can check out all the VMDK formats in the Virtual Disk Programming Guide Virtual Disk Development Kit (VDDK) 5.1. Here is a table from that pdf:
Convert Split Sparse VMDK to a Monolithic Sparse VMDK
Looking over a couple of sites, it looks like vmware-vdiskmanager is the way to go:
- VMWARE: Converting Multiple VMDK files into one
- Converting Multiple VMDK (Virtual Machine Disk) files into one
The vmware-vdiskmanager is packaged with the “Virtual Disk Development Kit” which you can download from here. Here is screenshot of the available downloads after I logged into the VMware portal:
After I downloaded the archive, I had the following file:
[elatov@klaptop downloads]$ ls *vix*
VMware-vix-disklib-5.1.0-774844.x86_64.tar.gz
So I went ahead and extracted the contents:
[elatov@klaptop downloads]$ tar xvzf VMware-vix-disklib-5.1.0-774844.x86_64.tar.gz
Now let’s go ahead and install the package:
[elatov@klaptop downloads]$ cd vmware-vix-disklib-distrib
[elatov@klaptop vmware-vix-disklib-distrib]$ sudo ./vmware-install.pl
Creating a new VMware VIX DiskLib API installer database using the tar4 format.
Installing VMware VIX DiskLib API.
You must read and accept the VMware VIX DiskLib API End User License Agreement to continue.
Press enter to display it.
...
...
What prefix do you want to use to install VMware VIX DiskLib API?
The prefix is the root directory where the other folders such as man, bin, doc, lib, etc. will be placed. [/usr]
The installation of VMware VIX DiskLib API 5.1.0 build-774844 for Linux completed successfully. You can decide to remove this software from your system at any time by invoking the following command: "/usr/bin/vmware-uninstall-vix-disklib.pl".
Enjoy,
## --the VMware team
After the install, I tried to check the consistency of my files and I ran the following:
[elatov@klaptop Windows XP Professional]$ vmware-vdiskmanager -R Windows\ XP\ Professional.vmdk
VixDiskLib: Failed to load libvixDiskLibVim.so : Error = libvixDiskLibVim.so: cannot open shared object file:
No such file or directory.
No errors were found on the virtual disk, 'Windows XP Professional.vmdk'.
I then re-read the “Virtual Disk API Programming Guide”, and saw the following:
To Install the package on Linux
- On the Download page, choose the binary tar.gz for either 32‐bit Linux or 64‐bit Linux.
Unpack the archive, which creates the vmware-vix-disklib-distrib subdirectory.
tar xvzf VMware-vix-disklib.*.tar.gz
Change to that directory and run the installation script as root:
cd vmware-vix-disklib-distrib sudo ./vmware-install.pl
Read the license terms and type yes to accept them.
Software components install in /usr unless you specify otherwise.You might need to edit your LD_LIBRARY_PATH environment to include the library installation path, /usr/lib/vmware-vix-disklib/lib32 (or lib64) for instance. Alternatively, you can add the library location to the list in /etc/ld.so.conf and run ldconfig as root.
So I went ahead and created a file /etc/ld.so.conf.d/vmware-vix-64.conf with the following contents:
[elatov@klaptop ~]$ cat /etc/ld.so.conf.d/vmware-vix-64.conf
/usr/lib/vmware-vix-disklib/lib64
I then ran ldconfig to apply the changes:
[elatov@klaptop ~]$ sudo ldconfig -v | grep vix
/usr/lib/vmware-vix-disklib/lib64:
libvixDiskLib.so.5 -> libvixDiskLib.so.5.1.0
libvixDiskLibVim.so.5 -> libvixDiskLibVim.so.5.1.0
libvixMntapi.so.1 -> libvixMntapi.so.1.1.0
and I can see the new libraries are now included. If you don’t want to mess with the system’s libraries you can always just set the LB_LIBRARY_PATH variable. Another person had issues by changing the ld.so.conf files and ended going that route. The issue and steps around it are described in this VMware’s Communities page.
Now re-running my consistency check, I saw the following:
[elatov@klaptop Windows XP Professional]$ vmware-vdiskmanager -R Windows\ XP\ Professional.vmdk
No errors were found on the virtual disk, 'Windows XP Professional.vmdk'.
That looks good. Now let’s go ahead and convert it. Checking out the vmware-vdiskmanager --help
output, I saw the following:
-r <source -disk/> : convert the specified disk; need to specify
destination disk-type. For local destination disks
the disk type must be specified.
And here are the available disk types:
Disk types:
0 : single growable virtual disk
1 : growable virtual disk split in 2GB files
2 : preallocated virtual disk
3 : preallocated virtual disk split in 2GB files
4 : preallocated ESX-type virtual disk
5 : compressed disk optimized for streaming
6 : thin provisioned virtual disk - ESX 3.x and above
So the command for the conversion, looked like this:
[elatov@klaptop Windows XP Professional]$ vmware-vdiskmanager -r Windows\ XP\ Professional.vmdk -t 0 Windows_XP.vmdk
Creating disk 'Windows_XP.vmdk'
Convert: 4% done.
and that went on for a little bit. Notice that the destination VMDK is called Windows_XP.vmdk. After the conversion is finished we will see this:
Convert: 100% done.
Virtual disk conversion successful.
Checking out the final file, I saw the following:
[elatov@klaptop Windows XP Professional]$ ls -lh Windows_XP.vmdk
-rw------- 1 elatov elatov 18G Mar 22 15:10 Windows_XP.vmdk
and then checking the old files:
[elatov@klaptop Windows XP Professional]$ du -hsc *-s0*
2.0G Windows XP Professional-s001.vmdk
2.0G Windows XP Professional-s002.vmdk
2.0G Windows XP Professional-s003.vmdk
2.0G Windows XP Professional-s004.vmdk
2.0G Windows XP Professional-s005.vmdk
5.1M Windows XP Professional-s006.vmdk
2.0G Windows XP Professional-s007.vmdk
2.0G Windows XP Professional-s008.vmdk
2.0G Windows XP Professional-s009.vmdk
1.1G Windows XP Professional-s010.vmdk
1022M Windows XP Professional-s011.vmdk
18G total
The size matched up, which is perfect.
From this point on, I could’ve probably just added the vmdk to VirtualBox, but I wanted to preserve all the Memory and CPU settings. To save those settings we can package the VMX and VMDK into an OVA template and then import it into VirtualBox.
Create an OVA Template from a VMware Workstation VM
The VMX file is where all the configurations are stored, and my VMX file was still pointing at the old Split Sparse VMDK:
[elatov@klaptop Windows XP Professional]$ grep vmdk *.vmx
scsi0:0.fileName = "Windows XP Professional.vmdk"
I edited the VMX file and pointed to the newly converted VMDK. After I was done, I had the following:
[elatov@klaptop Windows XP Professional]$ grep vmdk Windows\ XP\ Professional.vmx
scsi0:0.fileName = "Windows_XP.vmdk"
Now that my VM is ready to be imported into an OVA, let’s check out the OVF Tool User Guide. From the guide, here is the install process:
To install the VMware OVF Tool
- Download VMware OVF Tool as an installer or an archive (zipped/compressed) file:
- Install using the method for your operating system:
Here is the download page for the ovftool application. After I logged in, here were the downloads that I saw:
When I was done with the download, I had the following file:
[elatov@klaptop downloads]$ ls *ovf*
VMware-ovftool-3.0.1-801290-lin.x86_64.txt
Now let’s install the ovf tool:
[elatov@klaptop downloads]$ chmod +x VMware-ovftool-3.0.1-801290-lin.x86_64.txt
[elatov@klaptop downloads]$ sudo ./VMware-ovftool-3.0.1-801290-lin.x86_64.txt
Extracting VMware Installer.
At this point a GUI installer will come up, like so:
Just hit “Install” and the process with go through pretty quickly. After it’s finished you will see the following:
In the OVF User Guide there are good examples of how to use ovftool. Here is what I ran to create my OVA template:
[elatov@klaptop Windows XP Professional]$ ovftool Windows\ XP\ Professional.vmx Win_XP.ova
Opening VMX source: Windows XP Professional.vmx
Opening OVA target: Win_XP.ova
Writing OVA package: Win_XP.ova
Progress: 2%
It started to create the template. The extension is actually important, if I specify an “ovf” extension then it will create an OVF file along with VMDKs. Where the ‘.ova’ extension encompasses both. From the guide:
Converting a VMX to an OVF
To convert a virtual machine in VMware runtime format (.vmx) to an OVF package, use the following syntax:
ovftool /vms/my_vm.vmx /ovfs/my_vapp.ovf
The result is located in /ovfs/my_vapp.[ovf vmdk] Converting a VMX to an OVA
To convert a VMX to an OVA file, use the following syntax:
ovftool vmxs/Nostalgia.vmx ovfs/Nostalgia.ova
Also from the same guide:
Supports both import and generation of OVA packages (OVA is part of the OVF standard, and contains all the files of a virtual machine or vApp in a single file.)
Here is also a table comparison:
After the process was done, I saw the following:
[elatov@klaptop Windows XP Professional]$ ovftool Windows\ XP\ Professional.vmx Win_XP.ova
Opening VMX source: Windows XP Professional.vmx
Opening OVA target: Win_XP.ova
Writing OVA package: Win_XP.ova
Transfer Completed
Completed successfully
Now checking for the OVA file:
[elatov@klaptop Windows XP Professional]$ ls -lh Win_XP.ova
-rw------- 1 elatov elatov 11G Mar 22 13:54 Win_XP.ova
To get information about the OVA file you can also use ovftool in “probe mode”:
[elatov@klaptop Windows XP Professional]$ ovftool Win_XP.ova
OVF version: 1.0
VirtualApp: false
Name: Windows XP Professional
Download Size: 10.66 GB
Deployment Sizes:
Flat disks: 18.00 GB
Sparse disks: 17.80 GB
Networks:
Name: nat
Description: The nat network
Virtual Hardware:
Family: vmx-09
Disk Types: SCSI-buslogic
As a last note, an OVA file is just a tar archive, and you can check the contents of the OVA file like so:
[elatov@klaptop Windows XP Professional]$ tar tvf Win_XP.ova
-rw-r--r-- someone/64 6284 2013-03-22 13:42 Win_XP.ovf
-rw-r--r-- someone/64 125 2013-03-22 13:42 Win_XP.mf
-rw-r--r-- someone/64 11445539328 2013-03-22 13:54 Win_XP-disk1.vmdk
All of the above looks good, now let’s import the OVA template into VirtualBox.
Import an OVA Template into VirtualBox
We can use the VBoxManage to import an OVA Template. From the command line:
[elatov@klaptop ~]$ VBoxManage import
Usage:
VBoxManage import <ovf /ova>
[--dry-run|-n]
[--options keepallmacs|keepnatmacs]
[more options]
(run with -n to have options displayed
for a particular OVF)
So let’s use -n to see all the options:
[elatov@klaptop ~]$ VBoxManage import -n .vmware/Windows\ XP\ Professional/Win_XP.ova 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interpreting /home/elatov/.vmware/Windows\ XP\ Professional/Win_XP.ova...
OK.
Disks: vmdisk1 18 19109117952 http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized Win_XP-disk1.vmdk 11445539328 -1
Virtual system 0:
0: Suggested OS type: "WindowsXP"
(change with "--vsys 0 --ostype <type>"; use "list ostypes" to list all possible values)
1: Suggested VM name "vm"
(change with "--vsys 0 --vmname <name>")
2: Number of CPUs: 1
(change with "--vsys 0 --cpus <n>")
3: Guest memory: 512 MB
(change with "--vsys 0 --memory <mb>")
4: USB controller
(disable with "--vsys 0 --unit 4 --ignore")
5: Network adapter: orig nat, config 2, extra type=nat
6: CD-ROM
(disable with "--vsys 0 --unit 6 --ignore")
7: SCSI controller, type BusLogic
(change with "--vsys 0 --unit 7 --scsitype {BusLogic|LsiLogic}";
disable with "--vsys 0 --unit 7 --ignore")
8: IDE controller, type PIIX4
(disable with "--vsys 0 --unit 8 --ignore")
9: Hard disk image: source image=Win_XP-disk1.vmdk, target path=/home/elatov/.virt/vm/Win_XP-disk1.vmdk, controller=7;channel=0
(change target path with "--vsys 0 --unit 9 --disk path";
disable with "--vsys 0 --unit 9 --ignore")
That looks perfect. There is only one Virtual Disk and the Memory, CPU, and other settings are there as well.
Running without the -n (dry run) option looked like this:
9: Hard disk image: source image=Win_XP-disk1.vmdk, target path=/home/elatov/.virt/vm/Win_XP-disk1.vmdk, controller=7;channel=0
(change target path with "--vsys 0 --unit 9 --disk path";
disable with "--vsys 0 --unit 9 --ignore")
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Successfully imported the appliance.
Initially I had an issue with the OVA template, another user ran into the issues and it’s described in this VirtualBox forum. I got around the issue by re-creating another OVA template. If you still have issues just extract the OVA into a folder and then import the OVF instead. That process seems to be more stable, here is the command you would run if you had extracted the OVA template under a folder called test:
[elatov@klaptop ~]$ VBoxManage import test/Win_XP.ovf
After the import is finished, start VirtualBox and you will see you newly imported VM:
If you want to keep it command line, you can run:
And that will show you a lot of information regarding the VM that you just imported. Here is a shorter version:
[elatov@klaptop ~]$ VBoxManage list vms
"vm" {26008c65-d6ef-40d8-8a2e-093a5eb8baa5}
After powering on the VM, I saw the following:
Fixing “Error loading operating system” After Migrating XP VM
The first that I did was change the Disk Controller from SCSI to IDE. Here is how the Storage settings initially after the migration:
Then I changed the Contoller to IDE and also added my XP ISO, so I could boot from it. Here is how the settings looked like after the changes:
Reboot the VM and you will see “Press any key to boot from the CD..”. I pressed “Enter” and it started booting from the CD and then you will see this screen:
At this point I typed “R” to bring up the “Recovery Command Prompt”. At the command prompt, I ran the following:
Here is how that looks like:
That should re-install the MBR on the disk. After I rebooted the error was gone, but it just showed a black screen like so:
At this point I booted from the Vista Recovery Disk. The disk used to be available for free from “Windows Vista Recovery Disc Download”, but now you have to pay for it. If you have a Vista Install CD, you can use that as well. Here is how my storage settings looked after I added the new ISO:
Rebooting the VM and pressing “Enter” at the “Press any key to boot from CD….”, I saw the following screen:
I then clicked “Next” and saw the following screen:
Then I clicked “Repair your Computer” and I saw the following:
At that screen I clicked “Next” and that yielded this screen:
I then clicked “Command Prompt” and in the command prompt I fixed the MBR again (just for good measure) with following commands:
bootrec /fixmbr
bootrec /fixboot
Here is how it looked like:
Looking around some settings, I noticed that the partition is not active, I then ran the following to activate the partition:
c:\diskpart
DISKPART>select disk 0
DISKPART>select partition 1
DISKPART>active
Here is how it looked like in the prompt:
Notice the “*” (star) next to the partition after making it active. Then I rebooted and I saw a successful Windows boot process:
I hope this post can help others importing working VMs (not only Windows XP) from VMWare Workstation/Player to VirtualBox (converted with ovftool), suffering from «error loading operating system», where the original VMWare VMs work fine in VMWare Workstation/Player.
Symptom:
VMWare Workstation/Player Windows XP virtual machine converted to OVF and imported into VirtualBox does not boot, displaying «error loading operating system» on black screen.
Summary:
VirtualBox does not correctly set the disk geometry in certain imported VDI files.
A simple fix to the VirtualBox VDI disk geometry solves the problem, using CHS data from original VMDK file:
Code: Select all
vbox-img geometry --filename <diskimage>.vdi --format VDI --cylinders <C> --heads <H> --sectors <S>
Checks:
- No obvious issues with disk controller setting or MBR.
- Several threads (listed at end) referenced.
Many dealt with issues related to P2V process.
Common issues were Windows XP drivers and MBR.
These are not applicable in this case. - Several unsolved threads seem to be like this case.
Solution:
- One or two of the referenced threads mentioned disk geometry issues in converted VirtualBox virtual machines.
VirtualBox conversion of VDMK disk during OVF import does not correctly set the CHS (cylinder/head/sector) values in the VDI file for the imported VMDK disk under certain conditions. I think from reading the various threads that the developers have stated that only standard geometry of 255 heads and 63 sectors is expected, and that the VMDK CHS information is ignored. When this expectation is not met, the VDI file will have the wrong information. - Check the original VMDK and converted VDI disk geometry in VBox.log.
- Manually set correct geometry using vbox-img command.
Details:
Two original VMWare VMs, both clones of the same Windows XP Home VM, using VMWare, probably VMWare Workstation 9.x on Debian GNU/linux 32-bit or 64-bit, sometime around 2010-2014.
Current hardware (Intel Core2Duo motherboard) too old for latest VMWare Workstation, while Debian GNU/linux kernel too new for old VMWare workstation 9 or 10 to build necessary modules.
So, I converted the VMWare virtual machines (both with VMWare workstation 9 hardware compatibility) to OVF and attempted to import into VirtualBox 6.1.4, during which the VMDK disk is imported as a VDI file (this is where the problem arises).
One of them worked fine, the other did not, with the error mentioned.
The results was the same whether performing conversion and import on my 64-bit Debian GNU/linux machine or on 64-bit Windows 10.
Despite reading of numerous threads about this error, and trying to fix from the OS level, it turned out that the problem was incompatible disk geometry in the VMDK file, and VirtualBox import does not correctly use the data in the VDI disk file.
So, the solution I found was to change the geometry of the VDI disk file.
After importing and attempting to boot the imported VMs in VirtualBox, I could see In the VBox.log file the original VMWare VMDK file CHS information and the converted result.
First (working) Windows XP Home:
Checking VMDK:
SCSI capacity: 83886080
logical sector size 512
geometry (CHS): 5221/255/63
VBox.log file after importing OVF (which converts VMDK to VDI file):
CHS = 1024/255/63
VMWare was 5221/255/63
vbox-img shows 1024/255/63 in VDI disk
Code: Select all
vbox-img info --filename <diskimage>.vdmk
Header: Geometry PCHS=16383/16/63 LCHS=1024/255/63 cbSector=83886080
VBox.log:
00:00:01.326888 PcBios: SCSI LUN#0 LCHS=1024/255/63
00:00:01.378575 VMMDev: Guest Log: BIOS: SCSI 0-ID#0: LCHS=1024/255/63 0x0000000005000000 sectors
Second (problematic) Windows XP Home:
Checking VMDK:
SCSI capacity: 83886080
logical sector size 512
geometry (CHS): 5874/255/56
VBox.log file after importing OVF (which converts VMDK to VDI file):
CHS = 5220/255/63
VMWare was 5874/255/56
vbox-img shows 0/0/0 in VDI disk
Code: Select all
vbox-img info --filename <diskimage>.vdmk results:
Header: Geometry PCHS=0/16/63 LCHS=0/0/0 cbSector=83886080
VBox.log:
00:00:01.191130 PcBios: SCSI LUN#0 LCHS not provided
00:00:01.230446 VMMDev: Guest Log: BIOS: SCSI 0-ID#0: LCHS=5220/255/63 0x0000000005000000 sectors
Correction
Solution was to use vbox-img, included with VirtualBox, to change the geometry of the VDI disk:
Code: Select all
vbox-img geometry --filename <diskimage>.vdi --format VDI --cylinders 5874 --heads 255 --sectors 56
Now that this matched the geometry of the original VMDK file, Windows booted up perfectly.
VBox.log entries:
00:00:01.140001 PcBios: SCSI LUN#0 LCHS=5874/255/56
00:00:01.187537 VMMDev: Guest Log: BIOS: SCSI 0-ID#0: LCHS=1024/255/56 0x0000000005000000 sectors
I have no explanation why one clone had a geometry which was compatible with Virtualbox expectations, and the other one had a different geometry.
Referenced threads:
- Oct 2019: current discussion (latest discussion)
Error loading operating System error when loading a XP Guest on a W10 Host.
viewtopic.php?f=6&t=95312&p=461562 - July 2018: no solution
error loading operating system
viewtopic.php?f=1&t=88923&p=426436 - July 2015: no solution
Yosemite using a bootcamp as a VM
viewtopic.php?f=8&t=68756&p=327375 - Sep 2014: same issue — led me to solution
Geometry of imported disk images
viewtopic.php?f=1&t=63454&p=297969 - Sep 2014: possibly same issue
Vmware vmdk to virtualbox
viewtopic.php?f=7&t=63861&p=300061 - Feb 2014: possibly similar issue
error loading operating system XP
viewtopic.php?f=8&t=60208&p=280213 - Jan 2014: different issue
Mac OS as host, Ubuntu 12.04 (64b) guest as dual-boot on VB
viewtopic.php?f=8&t=59529&p=276902 - July 2013: possibly different issue
Discussion: MacOS Bootcamp Partition as a VBox Guest
viewtopic.php?f=8&t=48704&p=318314 - July 2013: different issue
[Solved] vboxmanage — resized to 50TB instead of 50GB
viewtopic.php?f=1&t=56261&p=260448 - June 2013: same issue no doubt, discussion but no solution
Windows XP vmdk «ERROR LOADING OPERATING SYSTEM»
viewtopic.php?f=2&t=56195&p=260535 - Jan 2013: likely same issue
VMWare VM
viewtopic.php?f=6&t=53533&p=245620 - Dec 2012: likely same issue
vmdk file fails to load in Vbox
viewtopic.php?f=6&t=52924&p=242640 - Aug 2012: different issue
[FIXED] Existing Windows 7×64 machine do not run
viewtopic.php?f=36&t=51049&p=233826 - April 2011: different issue
Raw Disk Access for existing Windows XP with host opensuse
viewtopic.php?f=7&t=41018&p=184445 - Feb 2011: could be same issue
Using VMWare SCSI Image in VB 4.0.2
viewtopic.php?f=2&t=38776&p=242645 - Oct 2010: different issue
«Error loading operating system» after host reinstall
viewtopic.php?f=2&t=35416&p=158679 - Mar 2010: could be same issue
Problem using VMWare vmdk images with Virtualbox
viewtopic.php?f=1&t=28611&p=127642 - Feb 2010: possibly related
Importing Xen virtual appliance?
viewtopic.php?f=1&t=28354&p=126281 - Aug 2009: related issues discussed here
Howto: Windows XP in both VM and native — DISCUSSION
viewtopic.php?f=2&t=9700&p=95231 - Dec 2008: different issue
Cant install windows xp on VM
viewtopic.php?f=7&t=12101&p=49311 - Sep 2008: different issue
how to use vmdk files with XP host
viewtopic.php?f=6&t=9360&p=36143 - Dec 2007: migrating windows XP (different issue)
How to disable LBA on Raw disk non-LBA partition
viewtopic.php?f=7&t=3408&p=11947 - Nov 2007: different issue
Error loading operating system (Win XP raw guest on Gutsy)
viewtopic.php?f=2&t=2776&p=9734