Linux – How to set up interchangeable VM guest/hosts

hard-disklinuxvirtualboxvirtualizationwindows

I'm looking for a way to set up a computer so that the disk is partitioned for multi-booting to two operating systems: Linux and Windows.

Whichever one is booted, I want the other to be accessible as a VM guest, ie when booted into Linux, the Windows partition must be bootable as a VM.

My preferred Virtualization software is VirtualBox but if there is no way I will look at another option. It doesn't even absolutely have to be the same virtualization software under each operating system.

How do I partition the disks?
Should I use or should I avoid EFI labels?
In what order should I install the operating systems?
What boot-loaders should I use and can I get these to be maintained without extra effort.
Will the installed virtualization software device drivers and the guest add-on / drivers gracefully step out of the way when the specific operating system is loaded as the host / guest operating system?
Is there any specific versions of Windows for which this is impossible/near impossible?

For bonus points I'd like to add Solaris and other Linux distributions.

P.S. The main reason for this requirement is to be able to run virtualization software under each operating system! Occasionally I want to investigate the differences between virtualization under different host operating systems.

Best Answer

I virtualize a LOT. This is what I would do with my experience with VBox.

3 partitions:

1 for Windows install NTFS or whatever you like

1 for Linux/Unix, also whatever you like

1 for VM Images, format as NTFS or FAT so both Windows or Linux will be able to read the repository for booting the image in VBox.

I recommend this method because direct access to a partition from VirtualBox can be scary. The only direct access I would ever recommend is VMWares RDM, because the stability is there. I seen stuff go south really fast when booting a real partition in Virtualbox, then later trying to boot the physical system against that same partition.

Related Question