Possible to have a VM inside a VM, inside a VM? Into eternity?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Well, if you want a true infinite loop you'll need a way to access images which are deposited outside the VM. This could be solved with NFS.
Of course you can have multiple layers of virtualization, but as every VM comes with a bit of overhead it'll get slower the further you descend into your VMs. Even on a high-powered PC. It'll just take a bit longer.
The only thing similar to this I have done so far was running multiple OpenVZ-VMs inside a KVM-VM.
But nothing recursive as you seem to think about.
If you could explain what's behind your idea maybe we could think about it some more and find a better solution than cascading VMs.
I have come up with one-problem for me is my 1GB RAM ain't enough after the 4th-5th window opens.
That is, I am running on live cd-using only the qemu from dsl-embedded, while running live I invoke the first window(1)-then inside that one I invoke another(2), then inside that one I invoke another(3)-then inside that one -another(4), etc.
So, I am running off a small MB livecd.
I am still trying now-will post screenshot next post.
Wanna know how I did it?
But why do you think this cascading is necessary?
It would be a lot better for performance, and probably also a lot easier, if you'd just use the host-system to run multiple VMs instead of VMs inside other VMs.
One of the main problems I see here is that running VMs in VMs builds up a considerable amount of overhead. Of course you also build up overhead when running several VMs side-by-side, but I'd say that this should be quite a bit less and thus have a smaller impact on the host-system.
Anyway, the "enjoyment" of running VMs heavily depends on the host-system and its capabilities.
As you say, you tested on a 1GB machine, which in my opinion isn't very suitable for desktop-virtualization in the first place. Especially when you consider that recent OSs already like 1GB or more for themselves in order to run nicely, outside a virtual environment.
The way I handle my VMs is this: Each VM gets 1GB of memory assigned to it. With a total of 8GB I could probably run 6 VMs without getting in trouble memory-wise. On the other hand I only have a dual-core-CPU, which will cause a slow-down on the host and the guests.
Effectively I usually run a maximum of 4 VMs at the same time, and usually 2 or 3 of those mostly idle around.
So, getting back to the topic what I would suggest, if I understand your project correctly (which I guess might be a LiveCD with different distros you can easily fire up in a VM and try them out) is having the host-system and then have several images with the guest-systems, pretty much the same way I have it on my PC. One host, multiple guests.
Also you may want to think about having a little shell-script which would detect if the CPU supports virtualization, how many CPUs/cores and how much RAM are available.
That way you can automatically decide if you have to use QEmu or if you can use KVM. You can adjust how much memory is assigned to a VM and maybe even impose some sort of limit on the number of VMs you let the user start, based on the number of CPUs/cores and amount of RAM available.