Windows XP vmdk "ERROR LOADING OPERATING SYSTEM"

Discussions about using Windows guests in VirtualBox.
gitm
Posts: 5
Joined: 27. Jun 2013, 08:22

Windows XP vmdk "ERROR LOADING OPERATING SYSTEM"

Post by gitm »

Hi all!

I'm using Oracle Virtualbox (version 4.2.12.r84980) on Linux mint 15.
Yesterday, I created a virtual machine with the existing windows xp professional vmdk image. It was created by using Vmware workstation 6.5.
And when I launched the vm, I got an error ( "Error loading operating system" .. just that ).
After that I tried to use same vmdk file on vmware and got the similar error ( I have installed vmware on the windows 7 and that image was working perfectly before this).

I have really important data and software setup on that image( too bad, I didn't make the backup :( before trying to mount it on virtualbox ).
I googled various options ( windows rescue boot, disabling agp440 service,...) none of them seems to work :(
I also removed and reinstalled vmware (as well as vbox) but still got the same error. ( I think vbox must have made some changes in the vmdk file :( )

I would really appreciate if someone cud help me out here.

I have attached vbox definition file.check the attachment. I'll also provide more details as required.
Attachments
cognos.vbox-prev.xml
Vbox definition file
(6.99 KiB) Downloaded 1195 times
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Windows XP vmdk "ERROR LOADING OPERATING SYSTEM"

Post by mpack »

One tip up front: do not thrash around at random (e.g. uninstalling and installing software), as that usually only makes things worse. Do things only when you know in advance what the effect will be. I can best help you if I can predict what you've done, which is made harder if you do random things.

"Error loading operating system" means that the the boot process couldn't get beyond the earliest stages. This is probably because the VM you created was not a good enough match for the old VM. In particular you probably have the wrong disk controller.

If you still have access to the VMWare VM then the simplest solution is probably to export it from VMWare as an appliance which you then import into VirtualBox. In general VMs should not be moved around as bare disk images.

Failing that, I would set try setting the disk controller type to IDE. Unfortunately XP is not very tolerant of IDE chipset changes either, so we'll just have to see how you get on. One way to make XP more tolerant in this regard is to run MergeIDE on the XP image before you export or copy it.

ps. If all you want to do is get some files off the disk then you should find that the disk itself is perfectly readable if you attach it to another VM. It's only the OS that's having a problem booting up due to incorrect drivers, the disk will be fine.
gitm
Posts: 5
Joined: 27. Jun 2013, 08:22

Re: Windows XP vmdk "ERROR LOADING OPERATING SYSTEM"

Post by gitm »

I truly appreciate you helping me out here.
Yes I agree, I did take some actions haphazardly... I was desperate to restore my system.
I do have important data as well as some large warehouse software setup ( I don't have access to the original installers now... so obtaining and configuring
new systems will take forever.. that's the reason for making VM in the first place ).

Storage controller is already set to IDE( type: PIIX4, 'Use host I/O checked). Will it helpful to use MergeIDE in this context? ( If so, can elaborate how to do it? )

I exported the vmdk image ( in ova virual appliance format ) using "import or export" option in vmware workstation. But I got the following error while loading it in the vbox :

Code: Select all

Failed to import appliance C:\VmImage\windowsxp.ova.

Could not create the clone medium 'C:\Users\gitm\VirtualBox VMs\windowsxp\windowsxp.vmdk'.

VMDK: Compressed image is corrupted 'C:\VmImage\windowsxp.vmdk' (VERR_ZIP_CORRUPTED).

Result Code: VBOX_E_FILE_ERROR (0x80BB0004)
Component: Appliance
Interface: IAppliance {3059cf9e-25c7-4f0b-9fa5-3c42e441670b}
I'll make another post about various things I tried.( cant post right now.. forum needs 1 more post (or a day) to be able to use external links
gitm
Posts: 5
Joined: 27. Jun 2013, 08:22

Re: Windows XP vmdk "ERROR LOADING OPERATING SYSTEM"

Post by gitm »

Please check following link ... cant paste any links yet :( ( Come on, I'm not a spam bot )
h t t p : / / p a s t e b i n . c o m / Bi2Un1HG
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Windows XP vmdk "ERROR LOADING OPERATING SYSTEM"

Post by mpack »

gitm wrote:Storage controller is already set to IDE( type: PIIX4, 'Use host I/O checked). Will it helpful to use MergeIDE in this context? ( If so, can elaborate how to do it? )
The linked download of MergeIDE explains how to use it, as does the Microsoft original report. Unfortunately it normally needs to be run inside the working system, prior to imaging it. It is possible to attach the disk to another windows VM and modify the registry data files on the external drive, but that requires rather more knowledge, and it isn't something I've ever needed to do.
gitm wrote:I exported the vmdk image ( in ova virual appliance format ) using "import or export" option in vmware workstation.
But I got the following error while loading it in the vbox :

Code: Select all

Failed to import appliance C:\VmImage\windowsxp.ova.

Could not create the clone medium 'C:\Users\gitm\VirtualBox VMs\windowsxp\windowsxp.vmdk'.

VMDK: Compressed image is corrupted 'C:\VmImage\windowsxp.vmdk' (VERR_ZIP_CORRUPTED).
That looks quite straightforward: the message means what it says, i.e. the .OVA file is corrupted. Taking a wild guess I'd say you transported the OVA file on a FAT32 formatted USB drive, which would have truncated the file at 4GB (the FAT32 max file size). You need to ensure there is enough space on the USB drive, and then either use a file splitter, or format the drive in a more modern filesystem which both PCs support (e.g. NTFS).

ps. I do not click offsite links, especially obfuscated ones that just say "please click this" and give no description!
gitm
Posts: 5
Joined: 27. Jun 2013, 08:22

Re: Windows XP vmdk "ERROR LOADING OPERATING SYSTEM"

Post by gitm »

mpack wrote:ps. I do not click offsite links, especially obfuscated ones that just say "please click this" and give no description!
I understand. But I was unable to post any kinds of external links (or [url] bbform tags ) because forum required more than 1 post count and 1 day subscription. ( pretty clever anti-spam scheme :D)

And I assure you, I didn't have such illicit intent. I was trying to list various actions I took and was referring their sources.
If you haven't read those, I'll paste it here again.


Things I had tried :

IN LINUX MINT

1. Tried to load vmdk file in vbox(linux) by creating new virtual machine ==> got "ERROR LOADING OPERATING SYSTEM"
2. Disabled floppy/cd-rom devices from settings-->system menu ( thought system was booting from the wrong device) but no change.
Enabled it again.

IN WINDOWS 7

1. Started previously working VM in vmware ==> Got "ERROR LOADING OPERATING SYSTEM"
2. Googled for the solutions
a. Try to change disk controller ( I don't know how to, just there's an option to select various SCSI port(SCSI 0:0, SCSI 0:1,..
just tried various ports ... no change.)

b. Tried to change controller from the BIOS ( using "POWER ON TO BIOS" ... in BIOS setup only Primary Master option with the VM Disk set to (AUTO) ...rest options were empty.. tried to set (AUTO-->USER TYPE(w/o any changes in other suboptions)-->CD_ROM) ... no change.

c. Installed Vbox on windows and tried these
I. changing controller to SATA as per this post
http://smallbusiness.chron.com/open-vmd ... 28847.html

II.

Code: Select all

vmware-vdiskmanager.exe -R "c:\blah\my vm disk.vmdk"
command from http://superuser.com/questions/223872/v ... ystem-help this post ... no luck

(From the same post, 2nd solution about windows rescue disc ... downloaded "MS Windows XP / 2003 / VISTA CD setup file (ISO file)" from http://www.freepctech.com/index.php/dow ... boot-disks this website .. mounted and tried to boot from it.. didn't work.. just the black screen.

III. Downloaded another boot disk from here http://www.thecomputerparamedic.com/files/rc.iso ( I don't have the original XP cd/dvd to boot from)... chose Repair (R) option after booting into setup screen....tried 'fixmbr, chkdsk commands'... no change either.


d. http://www.linuxquestions.org/questions ... xp-780952/ From this post , I disabled the agp440 service... still no change.

e. Removed vmware completely.... tried Vbox (no change).
f. Removed vbox , installed Vmware ... no change
g. Installed vbox , no change.

BACK ON LINUX MINT
1. Converted vmdk to vdi again on linux
2. New Vm with vdi ... no luck :(


Well these are pretty random methods I tried from various post(pretty useless I guess)... but that's it.
I haven't made any configuration editing on any of the systems.

I hope this shades some light. ( also now the links do have some context )

In addition, I'll try to make that ova virtual appliance again, although I haven't used usb drive ( source and destination of the process were on the same hard disk 300gb) during the process.
gitm
Posts: 5
Joined: 27. Jun 2013, 08:22

[Retry] Windows XP vmdk "ERROR LOADING OPERATING SYSTEM"

Post by gitm »

Fortunately, I got hold of my original non-tainted VMDK image ( Thank god, I had backed up it on one of my friends external hard disk.)
and it works perfectly on vmware as it used to.

So now, If I want to port it to virtualbox what are the steps that I should follow ?

(I tried exporting vmdk from the vmware as an Open Virtualization format (ovf) and imported successfully on the virtual box.But when I started the vm I got the same error "Error loading operating system" ).

There must be some intermediate step.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Windows XP vmdk "ERROR LOADING OPERATING SYSTEM"

Post by mpack »

An XP system image is not easy to migrate by default, you need to prepare it. The most important preparation is that MergeIDE step which I already mentioned. Also: after you import the VM, make sure the VirtualBox VM is configured to use an IDE controller, and since it's coming from VMWare you will probably need to enable the IO APIC option in the VM settings | System | Motherboard.
luminelx64
Posts: 1
Joined: 23. Jun 2018, 16:26

Re: Windows XP vmdk "ERROR LOADING OPERATING SYSTEM"

Post by luminelx64 »

I have finally been able to resolve this issue by following instructions at this link (I'm unable to post links due to forum new member restrictions. Will update later).

All standard solutions like “chkdsk /r”, “chkdsk /p”, fixmbr, fixboot,… did not work

STEPS
  1. Use the MergeIDE utility as explained above, before exporting from VMware.
  2. Attach the broken boot disk (vmdk) to another virtual machine
  3. Download the tool “Testdisk“ from cgsecurity website (I'm unable to post links due to forum new member restrictions. Will update later)
    If the virtual machine you're booting from is Windows XP, make sure to download version 7.0 of testdisk. Newer builds are no longer compatible with xp.
  4. unzip the tool and start testdisk_win.exe on the virtual machine you use for repair
  5. Select “No Log”
  6. Select the disk you want to repair
  7. Select “Intel/PC partition”
  8. select “MBR Code – Write TestDisk MBR code to first sector”
  9. confirm “Write a new copy of MBR code to first sector” with y (yes)
  10. confirm “Write a new copy of MBR code, confirm” with y (yes)
  11. Select OK after the new copy of MBR code has been written successfully.
  12. Now select “Advanced – Filesystem Utils”
  13. In the next window select “Boot”
  14. If there are mismatches or problems you will get a view like this.
    (I'm unable to post links due to forum new member restrictions. Will update later)
  15. to solve this, select “Rebuild BS”
  16. select Write
  17. type of Filesystem (NTFS)
  18. when the rebuild was successfull, leave the tool using “quit” till all windows are closed
  19. unattach the virtual disk from the virtual machine
  20. power on your broken Virtual machine – it should now boot without any problems!
GenghisKhan
Posts: 9
Joined: 23. Feb 2018, 17:54

Re: Windows XP vmdk "ERROR LOADING OPERATING SYSTEM"

Post by GenghisKhan »

I just came here to say that after a lot of trial and errors, this was the real deal.

And I just want to add a note regarding step 19., I have also removed all Controllers that came after the importation, and created only one for IDE, and attach the virtual disk there.

And a final step for Network configuration, that you need to do. Be sure that you have uninstalled all vmware tools, and then turn off the VM, and then go to VM Settings, Network, expand the Advanced part, and choose PCnet-FAST III (Am79C973), and ok. Now turn on the VM and check if you will have a new card installed under Network Connections.

Note that if you had mess with macaddress, by changing it, you will have to reactivate it or simple copy paste your previous macaddress under the new VM Network Settings in the same place mentioned above!

Thanks a lot luminelx64, your comment here was GOLD!!!
Last edited by socratis on 18. Oct 2018, 21:06, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Windows XP vmdk "ERROR LOADING OPERATING SYSTEM"

Post by socratis »

Not sure why this is on "Linux Hosts", moving to "Windows Guests", its natural habitat...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
FrederikB
Posts: 15
Joined: 7. Aug 2015, 12:53

Re: Windows XP vmdk "ERROR LOADING OPERATING SYSTEM"

Post by FrederikB »

Unfortunately this topic became quite alive again for me because a) the Windows10 update november 2019 now forces me to uninstall older Vmware workstation b) XP modes dont work on Windows10 and c) the Dutch 'Belastingdienst' requires me to produce data from their 'Belastingdiskette' way back to the year 2004 which only run on .. of course XP.
So I did load my older vmdk into Vbox only to find 'error loading operating stystem'. Tried all the different storage settings - no luck. I had a copy of this VM and copied it over. Opened it with the older VMWorkstation - no problem. Powered it off normally. Opened the vmdk with Vbox - BANGG!!! Error loading .. etcetera. Tried opening with Vmware workstation - Error loading OS.. This only means, yeah I wouldnt believe it, but Vbox corrupts the XP Operating System just by trying to boot from it. :evil: Aint that awful. Now retrying and getting the old backup yeah and I guess trying the MergeIDE process. I think Vbox should have a warning built in not to open a windowsXP vmdk in a new virtual machine without having taken the preparation steps.
so, then, here 'DO NOT OPEN AN XP VMDK IN VIRTUALBOX' before having prepared it.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Windows XP vmdk "ERROR LOADING OPERATING SYSTEM"

Post by mpack »

FrederikB wrote:This only means, yeah I wouldnt believe it, but Vbox corrupts the XP Operating System just by trying to boot from it.
Maybe you shouldn't be so ready to believe such nonsense.

VirtualBox is a hardware simulator, including a simulation of a hard disk drive. It only does writes to virtual hard drives when the software running in the VM asks it to. I mean, what did you imagine would be in the sectors that VirtualBox would write? It just creates data for the sector out of thin air? The idea doesn't stand up to a second of thought.

What you mean to say is that something you or the guest OS did in your attempts to boot the OS caused the boot sector data to be changed. VirtualBox had nothing to do with it.
MisterR
Posts: 2
Joined: 6. Nov 2019, 19:37

Re: Windows XP vmdk "ERROR LOADING OPERATING SYSTEM"

Post by MisterR »

I think FrederikB is right.

This situation happened to me also. Booting a Win XP vm that came from VMWare (and was working well) into VirtualBox gave the error loading os message. Then trying to boot this vm back into VMWare gives error.
This I tried with two different vms. Fortunately, I was using copies, so I lost nothing.
BTW, you can see that the image file date and time has changed after trying to boot into VirtualBox. So looks like Virtualbox does modify the file even if it does not boot.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Windows XP vmdk "ERROR LOADING OPERATING SYSTEM"

Post by mpack »

MisterR wrote:I think FrederikB is right.
On what facts? You have just described doing exactly the same thing as FrederikB, so naturally you got the same result. That doesn't mean that your (or his) explanation for it makes any sense. Best guess? You or XP tried some kind of boot repair function. That's what stops it booting when you go back.

And if you want to stop it happening? Easy. Don't experiment on your only copy of the data.
Locked