Booting of the existing OS from VirtualBox problem


I have openSuse 11.1 installed on my hard drive. I want to use it both natively & from VirtualBox hosted by Windows Vista.

I had to create a mapping VirtualBox drive , thanks to VBoxManage command. I pointed 2 drives: the drive with Linux & the swap drive.

D:\Program Files\Sun\VirtualBox>VBoxManage.exe internalcommands createrawvmdk -f
ilename d:\Virtuals\openSUSE11_drive_physical_mapping\drive.vmdk -rawdisk \.\Ph
ysicalDrive0 -partitions 2,6

Then when it goes to load from VirtualBox it doesn’t boot at all.

The message is

Waiting for device /dev/disk/by-id etc
Want me to fall back to… (Y/n)

Both variants Y and N are not working. I guess there must be something done with fstab, but as I want to boot linux from pc & from VirtualBox too, I can’t simply change fstab. So what should I do ?


Let me summarize: you want to multi-boot openSUSE native with Vista and you want the same openSUSE install to be a VM in Vista? Is that what you want, or do you want the native openSUSE to boot and a VM with a separate openSUSE install in VBox?

I want to boot the same OS (openSUSE) during the startup of the PC & from VirtualBox. The same os from the same drive.

I donot mean at the same time of course :slight_smile: from VM it will be hosted by Vista.

So,does anybody know the solution ? I believe this is a common stuff.

pop in to #vbox on IRC, it IS possible but the manual for vbox is not entirely clear on the subj.

But it is not virtual box issue, it is completely linux thing , I guess. We are to do something with GRUB & fstab I think.

So, you do want what I thought. And so, this is a VirtualBox problem. There are guidelines to run native installed OS’s in VBox but none official. They are generally used to virtualize windozes on linux systems.

Did a quick search. One of the devs at says:

  1. if it works you must be using VBox
  2. if it almost works you have to keep trying VBox
  3. if it doesn’t work, go via bugtracker to get VBox working

Summarizing what I’ve read: it may be possible, but it’s not recommended.

The quick answer is yes, you can do this with VirtualBox, but it’s a bunch of work. VirtualBox doesn’t give you an easy way to configure this (it’s one of those things that’s technically possible, but not officially supported or recommended). It requires using VBoxManage to change the .xml config files to enable “raw” drive access.

Refer to the VirtualBox documentation (see Documentation - VirtualBox) for the detailed procedure; look for the section, “Advanced Topics,” sub-heading, “Access to entire physical hard disk.” That’ll get you started.

And don’t miss this warning:


Raw hard disk access is for expert users only. Incorrect use or use of an outdated configuration can lead to total loss of data on the physical disk. Most importantly, do not attempt to boot the partition with the currently running host operating system in a guest. This will lead to severe data corruption.

When I get time, I’m going to try this with my existing Windows XP partition.

Guys, thank you very much. But as I say, I have already done with raw disks mount. I have GRUB appearing, then I click “load Suse” and it says it can’t manage the situation with drives. Because I guess the identifiers of the drives are different between the PC and VirtualBox.
That’s why I say that we are to do something with GRUB or fstab, because my VirtualBox has already got a right access to the raw drives. I haven’t found a solution yet.
If anyone knows what to do in this situation please comment on that.


That sounds like a pretty cool concept! I like it, you can have your cake and eat it too!

Yeah, I left out something extremely important: don’t forget that the emulated hardware inside the “box” will almost certainly be different from that recorded by the OS when it was originally installed. For example, VirtualBox will typically tell the “box” that it has a PCNet NIC, where you might actually have a Broadcomm or some other brand. When you originally installed the OS, it would have set up the drivers for your actual NIC. When you boot that same OS under VirtualBox, it’s going to see different hardware.

Programmer768 said: Because I guess the identifiers of the drives are different between the PC and VirtualBox.

This is just one example. The video will almost certainly be different as well. I’ve already mentioned the NICs.

It’s my understanding that this is the biggest “gotcha,” for example, when trying to virtualize an existing Windows installation. Windows will typically refuse to even start, and even if you could get it to run, it will probably bring up the dreaded “you need to re-register this copy of Windows” dialog. I did a Web search and found a page that offered steps to get around this, but it involves hacking (and I do mean, “hacking”) the registry.

OK, suppose you do that: you get Windows to use the “new” Virtualized hardware, and it’s running fine in the “box.” But if you were then to boot directly into that Windows partition again, outside of VirtualBox, the hardware drivers would be wrong again. Even after you got that sorted it would probably ask you to register yet still AGAIN! :slight_smile:

(Ah, one of the nice things about F/OSS software – no stupid activation codes, or “You Must Register” boxes, or any of that nonsense!)

I was fortunate enough to have two copies of XP here (… hmmm … should we use the word, “fortunate” for this??), so when I started using VirtualBox, I left the original Windows XP intact in a dual boot, and installed the spare copy of XP in a “box” so that I can dip into Windows on those rare occasions when I think I need to punish myself. :slight_smile:

Hmm… I think I have an OEM of Windows XP, so that may work too.

Thank you for your comment.

I guess that CAN be the thing.
But in Windows the situation is a little bit different, because there is a rule that when 3 new devices are appearing at the boot - Windows will refuse to work.
I guess technicaly there is no limitation to have it booted.
The same to Linux - I have installed full installation of openSUSE, I guess it won’t cause any problem with new video and other things, because the Kernel is smart. Ain’t I right ?