Running my "real" Linux system inside a VM as guest OS?
Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Running my "real" Linux system inside a VM as guest OS?
I have set up Windows 8.1 and LinuxMint on my laptop as dual boot.
I use LinuxMint for almost everything but occasionally need the Windows system as well.
I have set up LinuxMint with one big partition for everything (/, /boot, /home, etc. all in one)
I am wondering if it is possible to set up VirtualBox under Windows in a way that I can run my "real" LinuxMint as guest OS inside Virtualbox on the Windows host. Or at least something that comes as close as possible to my "real" LinuxMint without having to do everything twice. The idea would be to use the same user data files, use the same config files and installed packages, etc.
So everything I install in the "real" system will be available in the VM and the other way around. Same thing for changing files, configs, etc.
Maybe something along the lines of creating a new LinuxMint VM of the same version under Windows with only the very bare minimum (maybe the kernel and /boot ???)
Then have that VM mount my "real" LinuxMint partition and use everything else from there (like /usr, /home, /opt, etc)
Not sure what to do about things like /dev, /proc, /var/log, etc. Maybe those will be part of the VM as well.
This is a very high level idea and I have no idea if / how it can be done. I tried to Google it, but have not really found anything...
Has anyone done this, or can point me to a few links?
I used to do something like that years ago. I don't recall any problems, actually. There was a more seamless version without Virtualbox called colinux that was basically the same idea. The main hang ups I recall were (1) no specialized video drivers, or any other specialized hardware devices (2) I don't think Windows likes nested VMs much, so don't run Virtualbox inside your VM session.
(Edit) and if you compile your own kernel, don't be too restrictive with hardware. You can of course use Grub within VB to launch a different kernel in your VM rather than your physical machine if you need to.
Last edited by mostlyharmless; 12-14-2015 at 08:45 PM.
You run a virtual machine like normal. The only basic exception is that instead of using a virtual hard drive you make the vm a config file that points to a physical disk.
Linux may work fine but there may be some unique things that you may have to make generic. Maybe video but nic is generally supported in vm's.
If you mounted your physical partitions correctly and have a loader it should act like your normal linux. No need to worry about any subdirectory mounts usually.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.