Error loading operating system after importing OVA
Error loading operating system after importing OVA
I exported a Windows XP-based guest from a laptop running VMWare Player to an OVA file. I then imported that OVA file to a VirtualBox VM (using all the default settings on import) on my current laptop. When I start up the VM, I get the message "Error loading operating system".
I have tested the OVA by re-importing it into VMWare and that worked successfully.
After copying the OVA to the laptop that runs VirtualBox, I have verified that the MD5 sum on the copied OVA calculated on my current laptop is identical to the MD5 sum calculated on the laptop that created the OVA before I copied it.
Any ideas why VirtualBox is not working with this OVA?
I have tested the OVA by re-importing it into VMWare and that worked successfully.
After copying the OVA to the laptop that runs VirtualBox, I have verified that the MD5 sum on the copied OVA calculated on my current laptop is identical to the MD5 sum calculated on the laptop that created the OVA before I copied it.
Any ideas why VirtualBox is not working with this OVA?
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: Error loading operating system after importing OVA
Since you are able to start the guest I take it that the import process completed without overt error.
"Error loading operating system" does not sound like a familiar Virtualbox error to me. Did you uninstall any VMware guest tools before bring the guest over? I think those might interfere. Does the XP guest boot in Safe Mode?
"Error loading operating system" does not sound like a familiar Virtualbox error to me. Did you uninstall any VMware guest tools before bring the guest over? I think those might interfere. Does the XP guest boot in Safe Mode?
Re: Error loading operating system after importing OVA
Thanks for your reply. That error message comes from the PC's BIOS, meaning that it cannot load the OS. Windows does not even start to load, so I don't get to the point where I have the option of choosing to boot in Safe Mode. The error message typically means that the BIOS does not support the size of disk (it seems to be a 50GB SCSI drive) or that the operating system was not properly installed (it was, since it ran ok on VMWare).scottgus1 wrote:Since you are able to start the guest I take it that the import process completed without overt error.
"Error loading operating system" does not sound like a familiar Virtualbox error to me. Did you uninstall any VMware guest tools before bring the guest over? I think those might interfere. Does the XP guest boot in Safe Mode?
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: Error loading operating system after importing OVA
Please post a screenshot of that error, using the forum's Upload Attachment tab, crop & resize to get the file under 128kB.
If the "PC's BIOS" (Virtualbox BIOS) could not boot the guest OS it would say "FATAL! No boot medium found". If the error actually says "Error loading operating system" then it's not coming from Virtualbox. The screenshot might help us.
If the "PC's BIOS" (Virtualbox BIOS) could not boot the guest OS it would say "FATAL! No boot medium found". If the error actually says "Error loading operating system" then it's not coming from Virtualbox. The screenshot might help us.
Re: Error loading operating system after importing OVA
Here's the screenshot showing Error loading operating system:
And in case it's also useful, here are the settings:
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: Error loading operating system after importing OVA
Thanks for the screenshots! After googling "error loading operating system" I find that this is a Windows error, not from Virtualbox, and it happens on real PCs too. Therefore you should troubleshoot this error using web-searches and Windows help channels.
Based on my googling, there might be one thing, regarding the method the Virtualbox BIOS uses to set up an IDE drive's "cylinders and heads" but I don't know if there are any Virtualbox settings to modify this behavior. Scanning the PDF of the manual for the word "head", nothing pertinent to an IDE drive appears. Aside from this, I do not think there is anything in Virtualbox that can be done about this error.
Based on my googling, there might be one thing, regarding the method the Virtualbox BIOS uses to set up an IDE drive's "cylinders and heads" but I don't know if there are any Virtualbox settings to modify this behavior. Scanning the PDF of the manual for the word "head", nothing pertinent to an IDE drive appears. Aside from this, I do not think there is anything in Virtualbox that can be done about this error.
-
- Volunteer
- Posts: 5678
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: Error loading operating system after importing OVA
I'd try and attach the virtual disk image to a virtual IDE controller instead of the virtual SCSI controller.
Re: Error loading operating system after importing OVA
Thanks, scottgus1.
Thanks for the suggestion, fth0, but I tried it and it I still get the same problem.
Thanks for the suggestion, fth0, but I tried it and it I still get the same problem.
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: Error loading operating system after importing OVA
"Error loading operating system" has been a standard error message since DOS days. It means that the BIOS found the drive, and it found boot code in sector 0 on the drive - and that boot code is in fact what issued that message. The message itself means that it couldn't find a boot partition, or if it did then it couldn't find a secondary boot sector there (no magic 0xAA55 marker).
Guess: the disk is truncated. What is the imported VDI/VMDK file size?
Guess: the disk is truncated. What is the imported VDI/VMDK file size?
Re: Error loading operating system after importing OVA
Thanks, mpack. The original VMDK is 3.12 GB and the imported VDI is 3.25 GB.mpack wrote:"Error loading operating system" has been a standard error message since DOS days. It means that the BIOS found the drive, and it found boot code in sector 0 on the drive - and that boot code is in fact what issued that message. The message itself means that it couldn't find a boot partition, or if it did then it couldn't find a secondary boot sector there (no magic 0xAA55 marker).
Guess: the disk is truncated. What is the imported VDI/VMDK file size?
I also tried removing the imported VDI from the VirtualBox VM, and replacing it with the original VMDK from the VMWare VM. It still gives me the same error.
So it doesn't really look like file truncation; as we've seen the very same VMDK file works in a VMWare machine but not in a VirtualBox machine.
-
- Volunteer
- Posts: 5678
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: Error loading operating system after importing OVA
You wrote that it is a Windows XP-based guest, so I assume that the original VM uses a legacy BIOS (not a UEFI BIOS), and the virtual hard disk uses MBR (not GPT). Can you extract the MBR from the virtual disk image? One way to do that, would be to boot the VM from a Linux ISO and use dd to extract the first sector of the virtual hard disk.
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: Error loading operating system after importing OVA
No need for any of that. Just open the virtual disk in CloneVDI and view partition info (i.e. MBR decoded), plus that or any other sector can be viewed in hex form or dumped to a file.fth0 wrote:Can you extract the MBR from the virtual disk image? One way to do that, would be to boot the VM from a Linux ISO and use dd to extract the first sector of the virtual hard disk.
Re: Error loading operating system after importing OVA
fth0 and mpack, thanks for the replies.
I've used mpack's CloneVDI utility to look at the disk and compare it with another Windows XP disk that I created directly in VirtualBox. I've got screenshots for both disks (which I've called "bad-disk" and "good-disk". The MBR of the "bad-disk" looks ok to me. The only difference I can see that I think might be significant is the LCHS geometries (see attached).
I've used mpack's CloneVDI utility to look at the disk and compare it with another Windows XP disk that I created directly in VirtualBox. I've got screenshots for both disks (which I've called "bad-disk" and "good-disk". The MBR of the "bad-disk" looks ok to me. The only difference I can see that I think might be significant is the LCHS geometries (see attached).
- Attachments
-
- bad-disk-partitioninfo.png (4.09 KiB) Viewed 8512 times
-
- CloneVDIscreenshots.zip
- (67 KiB) Downloaded 21 times
Last edited by mpack on 24. May 2020, 16:23, edited 1 time in total.
Reason: Break screenshot out of zip.
Reason: Break screenshot out of zip.
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: Error loading operating system after importing OVA
I don't believe the disk geometry is significant. Both the "good" and "bad" disks are larger than 8GB, so CHS addressing SHOULDN'T apply (see note below), only LBA addressing. The fictional geometry is something that VirtualBox will write into the header at some point after a successful boot.
Note that I said that the error means that a boot sector was found at sector 0, so you are not showing the important sector - we already knew that sector 0 was good.
What's more important is to look at the first sector of the boot partition volume... and it's interesting to me that the "good" drive has a boot partition starting at sector 63 - which is very much the standard value from the XP era (more modern OS would use something like sector 2048). You bad drive has a partition starting at sector 56... which I've never seen before. So how about looking at sector 56 and see if it contains the expected secondary boot sector?
Note: I say that CHS addressing shouldn't apply. That's because the encoding of C,H,S used in the MBR maxes out at approximately 8GB. The picture below shows a maxed out MBR partition entry in an XP VM.
Note that I said that the error means that a boot sector was found at sector 0, so you are not showing the important sector - we already knew that sector 0 was good.
What's more important is to look at the first sector of the boot partition volume... and it's interesting to me that the "good" drive has a boot partition starting at sector 63 - which is very much the standard value from the XP era (more modern OS would use something like sector 2048). You bad drive has a partition starting at sector 56... which I've never seen before. So how about looking at sector 56 and see if it contains the expected secondary boot sector?
Note: I say that CHS addressing shouldn't apply. That's because the encoding of C,H,S used in the MBR maxes out at approximately 8GB. The picture below shows a maxed out MBR partition entry in an XP VM.
- Attachments
-
- Capture.PNG (11.19 KiB) Viewed 8512 times
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: Error loading operating system after importing OVA
Actually, I'm going to call it now. I suspect the original VM used a weird disk geometry, and this info was not preserved correctly when it was exported. You can probably fix it by establishing where the boot partition actually begins and hacking the MBR appropriately.