60
22
This question is rather theoretical:
Suppose I have a PC with two different OS on two different partitions: OS1 on sda1 and OS2 on sda2. Is it somehow possible to set up a program like VMWare or Virtualbox in OS1, which accesses sda2, boots it and runs OS2? On the other hand OS2 should be bootable directly, as well.
I realize that the emulated OS2 would be an awful lot slower and probably noone would really use this setup, but I find this very interesting.
No. Currently, you need to install a guest OS on a VM using an image. If you want to run one of your OS setups on a VM, you can create an image of your exact system setup. There are instructions online on how to do this. – MorrisIriga – 2015-10-26T12:50:45.563
1@MorrisIriga are you sure? I remember that there was a virtualisation tool that was able to mount actual harddisks. Not sure if its oracle virtualbox or microsoft virtualpc. – LPChip – 2015-10-26T12:54:29.637
1
@LPChip Sorry, I had misunderstood the question. Yes, you can mount a physical hard disk using VirtualBox. Have a look at this or this. I don't know about other virtualization software.
– MorrisIriga – 2015-10-26T13:01:56.3571As a small side thought (to answer the question I thought this was) I saw a proof of concept rootkit a while back that would emulate the underlying hardware, thus becoming undetectable i.e. if you had a nvidia graphics card, it would emulate that into the OS, the same with all the other hardware. – Michael B – 2015-10-26T13:23:31.710
@MichaelB: For graphics cards, many hypervisors already support PCI passthrough as a feature. I guess it's the more obscure hardware (like internal chipsets and controllers) that needs to be sneakily emulated. – user1686 – 2015-10-26T13:55:51.103
4http://superuser.com/questions/625280/dual-boot-and-virtualize-both-windows-8-and-ubuntu – Ƭᴇcʜιᴇ007 – 2015-10-26T16:12:34.980
4http://superuser.com/questions/663697/can-i-boot-up-a-virtual-machine-natively – Ƭᴇcʜιᴇ007 – 2015-10-26T16:13:00.510
In fact, it may be inescapable.
– orome – 2015-10-26T16:51:55.5304
VMWare Fusion can launch a "Boot Camp" partition as a virtual machine inside the Mac OS X host: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1014618
– Jacob Krall – 2015-10-26T23:28:11.057Parallels can also do this. – geometrikal – 2015-10-27T05:18:42.283
I once did this with Virtualbox, but I cannot remember how. I think it's something like http://superuser.com/q/495025/190623 . Note: 1. Windows activation was invalidated, and after I re-activated it in VM, it became invalidated again when I reboot to sda2 physically. 2. You may want to unmount sda2 on host OS. I've corrupted sda2 several times before realizing this.
– jingyu9575 – 2015-10-27T12:38:23.9471Are you talking about Winception? – Prinsig – 2015-10-27T13:41:06.713
I don't think the title "Can a PC emulate itself?" describes this question at all! – mattdm – 2015-10-28T06:46:31.383
1So what you're saying is... you could have your OS running inside your OS, on the same physical hard drive? I gotta try that. – Thomas – 2015-10-28T11:38:18.977
This reminds me of QEMU-Puppy (http://www.erikveen.dds.nl/qemupuppy/), a version of Puppy Linux specifically designed to run off of a bootable USB drive or to be bootable from QEMU running on the Windows or Linux host.
– Kevin – 2015-10-28T15:36:17.770Isn't this the whole point of QubesOS ? – Racheet – 2015-10-28T17:26:45.337