Can I run my windows installation in virtual box?

guest2013-1

guest
Joined
Aug 22, 2003
Messages
19,800
I was just thinking, seeing as I'm now dual booting my Windows installation and Linux, and as it's been explained to me that Linux basically made it's own partition (and shows up as a file in Windows) I was wondering if it would be possible running my Windows installation in Virtual Box from Linux?

That would certainly be A-for-awesome
 

d0b33

Honorary Master
Joined
Jul 16, 2004
Messages
17,462
You can convert your current installation into a virtual machine but you can't run it from the partition AFAIK.
 

concentricpuddle

Well-Known Member
Joined
Jul 8, 2009
Messages
241
Maybe. In the VirtualBox documentation there's something about making a hard disk accesible to a VM (I don't think it works for partitions though). I don't see why it shouldn't work...besides Windows giving you a blue screen, because the underlying hardware's changed.
 

guest2013-1

guest
Joined
Aug 22, 2003
Messages
19,800
Maybe. In the VirtualBox documentation there's something about making a hard disk accesible to a VM (I don't think it works for partitions though). I don't see why it shouldn't work...besides Windows giving you a blue screen, because the underlying hardware's changed.

No idea what Ubuntu did to install itself on my machine... can you call it a partition if you can uninstall it via windows? *shrug*
 

concentricpuddle

Well-Known Member
Joined
Jul 8, 2009
Messages
241
No idea what Ubuntu did to install itself on my machine... can you call it a partition if you can uninstall it via windows? *shrug*

:erm: Just read the docs. It's not a good idea, at all:

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.
 

guest2013-1

guest
Joined
Aug 22, 2003
Messages
19,800
Yes, okay...

I have Ubuntu installed on Windows. Dual-booted.

I'm in Ubuntu. Wondering if I can load the installation I also currently have on this machine of Windows in Virtual Box.

I don't want to transfer the partition. Change it to a different PC, or run Virtual Box within Windows and then run the same Windows I'm currently running in Virtual Box as well.

All I thought about is, "Okay, Ubuntu is running nicely... now I want to boot up to my Windows installation to start working in my dev enviroment without having to switch my OS by rebooting"
 

MyWorld

Executive Member
Joined
Mar 24, 2004
Messages
5,001
You need to be a bit clearer, you installed Ubuntu from within windows?
In other words you boot up Windows and then choose to run Ubuntu?

Or if you boot up your machine you can choose either Ubuntu or Windows from a menu and it will boot this option you chose?

From what I can gather it seems the latter, although I cannot see how this can work:
can you call it a partition if you can uninstall it via windows? *shrug*
How can you uninstall a dual boot OS from within Windows, that is impossible.

I would say the best bet would be to install Ubuntu in a virtual machine within Windows and use seamless mode, then you have the best of both worlds.
 

guest2013-1

guest
Joined
Aug 22, 2003
Messages
19,800
You need to be a bit clearer, you installed Ubuntu from within windows?
In other words you boot up Windows and then choose to run Ubuntu?

Or if you boot up your machine you can choose either Ubuntu or Windows from a menu and it will boot this option you chose?

From what I can gather it seems the latter, although I cannot see how this can work:

How can you uninstall a dual boot OS from within Windows, that is impossible.

I would say the best bet would be to install Ubuntu in a virtual machine within Windows and use seamless mode, then you have the best of both worlds.

wubi.exe or something allows you to install Ubuntu within Windows, then you reboot to dual-boot (meaning you get a screen going "Yo, which 1 you want bruffa")

http://wubi-installer.org/faq.php
 

MyWorld

Executive Member
Joined
Mar 24, 2004
Messages
5,001
From the page you posted you would have found your answer:
How does Wubi work?

Wubi adds an entry to the Windows boot menu which allows you to run Linux. Ubuntu is installed within a file in the Windows file system (c:\ubuntu\disks\root.disk), this file is seen by Linux as a real hard disk.
Is this running Ubuntu within a virtual environment or something similar?

No. This is a real installation, the only difference is that Ubuntu is installed within a file as opposed to being installed within its own partition. Thus we spare you the trouble of creating a free partition for Ubuntu. And we spare you the trouble to have of having to burn a CD-Rom.
It is not a partition, it is only a file in Windows.
So no, it doesn't seem like you will be able to run your current installed Windows within wubi Ubuntu.
 

rurapente

Expert Member
Joined
Jan 4, 2009
Messages
2,521
You can boot into ubuntu, and BOOT an EXISTING Windows Partition in a VM. I've done this with VMWARE before. I.e machine had Windows, now machine has Linux + Windows in separate partitions. I boot Linux, load VMware and boot the physical partition with windows (i.e a real disk running through a VM)

It worked fine for me. However it is tricky, and you need to first boot Windows and create another hardware profile and boot that one, since all your drivers will change on first boot. Have not tried it with VirtualBox but it seems it needs a "fake" virtual disk pointing to the physical one. Interestingly VMware doesnt, it can talk to a physical disk or partition.

Try this : http://www.bluemind.org/tips-a-tricks/9-linux/29-virtualbox-using-physical-bootable-partition.html

Finally, remember creating a virtual disk will be the most efficient, since a VM is designed to run virtual machines in its proprietory disk structure in a file, not a physical disk. Although some would argue its trivial since its emulating a PC either way. Oh yes, and NEVER tell a VM to boot your primary partition that the VM Host is on. Unless you really wanna see suprises... :)
 
Last edited:

Bule

Well-Known Member
Joined
Feb 4, 2006
Messages
208
Sure, I am running Windows Server 2008 SP 2 in vBox. You can do the same in KVM if you want. Download vBox from http://www.virtualbox.org/wiki/Linux_Downloads, then you may need to disable processor virtualization and rest is really simple: create disc insert win install DVD or mount ISO ...
Well, for existing one you need to backup and restore.
 
Last edited:

guest2013-1

guest
Joined
Aug 22, 2003
Messages
19,800
You can boot into ubuntu, and BOOT an EXISTING Windows Partition in a VM. I've done this with VMWARE before. I.e machine had Windows, now machine has Linux + Windows in separate partitions. I boot Linux, load VMware and boot the physical partition with windows (i.e a real disk running through a VM)

It worked fine for me. However it is tricky, and you need to first boot Windows and create another hardware profile and boot that one, since all your drivers will change on first boot. Have not tried it with VirtualBox but it seems it needs a "fake" virtual disk pointing to the physical one. Interestingly VMware doesnt, it can talk to a physical disk or partition.

Try this : http://www.bluemind.org/tips-a-tricks/9-linux/29-virtualbox-using-physical-bootable-partition.html

Finally, remember creating a virtual disk will be the most efficient, since a VM is designed to run virtual machines in its proprietory disk structure in a file, not a physical disk. Although some would argue its trivial since its emulating a PC either way. Oh yes, and NEVER tell a VM to boot your primary partition that the VM Host is on. Unless you really wanna see suprises... :)

Ah okay so I would need to put my linux on a different partition. Does it matter if the physical disk is split into 2 partitions? I guess not really...

Why would windows boot up with different set of drivers or have any issues with it? It's still the same laptop with the same hardware as it's running now, or does VMWare/Vbox do something different to make it think it's on a different type of PC?
 

kilos

Expert Member
Joined
Jun 28, 2005
Messages
2,796
Alternatively you can use VMware Converter to convert your Windows XP into a VMware Image and run your Windows XP from within your Ubuntu
Allows you to convert your Physical Windows machines into a Virtual PC
 

davemc

Executive Member
Joined
Apr 8, 2009
Messages
6,518
I think I went crosseyed reading this thread.
But, damn interesting, thanks.
 

jGLZa

Well-Known Member
Joined
Oct 12, 2010
Messages
114
Alternatively you can use VMware Converter to convert your Windows XP into a VMware Image and run your Windows XP from within your Ubuntu
Allows you to convert your Physical Windows machines into a Virtual PC

Can I use a use a VMware image in Virtual Box? If not is there a similar way to create a virtual box image? (I would like to create a virtual box image of an already existing OS)

Thanks for the HowTo link Bule.
 

HavocXphere

Honorary Master
Joined
Oct 19, 2007
Messages
33,155
Acid just remember you'll lose the ability to game. Basic 3D gfx is implemented in Virtualbox but its slow.
 
Top