LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This 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


Reply
  Search this Thread
Old 09-14-2021, 06:43 PM   #1
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,689
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
VM in VM in VM in VM ... multiple levels deep


while there's no practical case for doing this, perhaps beyond 2 levels deep, sometimes some people do this just to see if they can or to see how much it slows down, i'm curious who has tried this and how deep they got with which virtualization technology on what physical hardware host (or cloud provider as the case may be).
 
Old 09-15-2021, 01:37 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,041

Rep: Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348
why? embedding VMs into VMs is possible, depends only on the available resources (if you have enough resources to start a new VM). But as you told there is no practical case. It is extremely inefficient.
If I remember well we created an openstack environment inside a VM, probably that was 2 or 3 levels deep (altogether). Also started to test some software inside, but unfortunately I can't remember the details. It was definitely not a performance test. Usually we want to avoid that situation.
 
Old 09-16-2021, 01:56 PM   #3
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,689

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
> why?

why not.

if you are into systems or system setup or such, you may want to just play around. i did back in my mainframe days when i had an IBM 370/158 (8 MB memory) all to myself. i managed to run IBM's VM/CP (runs directly on hardware or as a guest OS in a VM) 6 levels deep before i ran out of spare disk space. it was a lot slower by this point. and it bogged down the host system rather hard, too, which is why i didn't try this on our primary machines.

i am also curious how well VirtualBox performs like this compared to QEMU/KVM with various Linux setups.

it's all for fun. those who have never done fun things on their own computers need not bother trying to answer in this thread.
 
Old 09-16-2021, 02:41 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,020

Rep: Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630
Most modern VM's have pretty good resource management. You just have to have almost unlimited resources to run almost unlimited nested VM's. Each VM has a bit of overheard and then the OS.

Nothing can get past the need for resources.
 
Old 09-16-2021, 03:03 PM   #5
maw_walker
Member
 
Registered: Jul 2021
Posts: 119

Rep: Reputation: Disabled
I run embedded VMs at work daily. Doing it as we speak. My attack box (jump box) is a Windows box which is a VM hosted on VMware (huge enterprise host somewhere). On that jump box, I run VirtualBox which hosts my Kali instance. Works perfectly That's as deep as I go though - no point in any more for me anyway.
 
Old 09-17-2021, 01:18 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,041

Rep: Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348
Quote:
Originally Posted by Skaperen View Post
> why?

why not.
You limit the resources of every VM and you need to divide these resources among the embedded VMs. That may mean you will be low on resources in the 3rd level, because there will be no [enough] resource to manage.
From the other hand every VM has its own [virtual] memory manager and that means on the 4th level [of nested VMs] you will have 4 (or 5) memory managers working "together" to try to serve its processes - without knowing anything about the other VMs. That will make the full system unstable, unreliable and most probably useless.

Embedding VMs only one by one into each other is just wasting resources (like in post #5), but can work without problems - if you have enough resources to waste.
 
Old 09-18-2021, 08:01 PM   #7
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,689

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by jefro View Post
Most modern VM's have pretty good resource management. You just have to have almost unlimited resources to run almost unlimited nested VM's. Each VM has a bit of overheard and then the OS.

Nothing can get past the need for resources.
so you are saying that i can run as many levels of VMs as i have resources for?

i have about 16GB of RAM and 1TB of storage to play with. how many levels do you think someone could achieve with that and their choice of distro and VM software (same at each level except the first host, configured best for this effort)? a VM that need a zillion libraries would be one that i would avoid.
 
Old 09-18-2021, 08:19 PM   #8
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,689

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
i already "play" with resources like trying to run the largest buffers i can in a process to see how slow everything else comes to be. i do other kinds of resource consuming "playing around" like that when not running anything serious on here (as i am right now, running 3 concurrent copies of ffmpeg for the past 2 weeks reformatting over a hundred MP4 videos into WEBM/VP9 format to save space).

each level of VM will need to be configured with enough resources to run all the levels it hosts. each level would be smaller and smaller until the last can barely run helloworld.
 
Old 09-18-2021, 08:22 PM   #9
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,689

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
i used to do embedded systems at a previous job. but there were several eval boards to run on direct hardware. i don't do embedded, anymore.

Last edited by Skaperen; 09-18-2021 at 08:23 PM.
 
Old 09-18-2021, 08:27 PM   #10
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,689

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by maw_walker View Post
I run embedded VMs at work daily. Doing it as we speak. My attack box (jump box) is a Windows box which is a VM hosted on VMware (huge enterprise host somewhere). On that jump box, I run VirtualBox which hosts my Kali instance. Works perfectly That's as deep as I go though - no point in any more for me anyway.
are you running an embedded distro as the guest OS?
 
Old 09-18-2021, 10:05 PM   #11
maw_walker
Member
 
Registered: Jul 2021
Posts: 119

Rep: Reputation: Disabled
Yes. The host is on VMware and the guest is a VM on VirtualBox.
 
Old 09-20-2021, 03:14 PM   #12
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,020

Rep: Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630
Each level consumes resources. You can keep installing what ever you want till it stops.
 
1 members found this post helpful.
Old 09-20-2021, 03:21 PM   #13
maw_walker
Member
 
Registered: Jul 2021
Posts: 119

Rep: Reputation: Disabled
In my case, most of our servers are virtualized on VMWare. I and each of my testers has their own server jump box that we attack hosts from. On each of those virtualized hosts, we run Kali Linux in VirtualBox. Performance is near bare metal, as far as I am concerned. I have no idea what the physical VMWare hosting server is though, but I believe it is quite beefy.
 
Old 09-22-2021, 04:04 AM   #14
Vmwaretyu
LQ Newbie
 
Registered: Sep 2021
Location: HK
Posts: 5

Rep: Reputation: Disabled
I thought about this question a long time ago. I can give it a try.

Research problem:

Virtual machine nesting ability test:

1. Is infinite nesting possible?

2. Actually feasible nesting level.

Conjecture: VMWare supports unlimited nesting.
Because VMWare supports virtualized VT and VTx, it is speculated that in theory, it can be nested infinitely. If the virtual machine's ability to "virtualize" does not decrease as the number of nesting levels increases, this assumption is true.

Experiment procedure:

The first layer is no problem, VMWare is successfully installed in the virtual machine.

Then when running VM-XP2, the splash screen was loaded, and then the VM crashed. There is no documentation for this magical error.

But the Linux virtual machine can run normally, and it runs in the VT-x/EPT virtualization mode

Therefore, it is certain that multi-level nesting is actually feasible. In fact, it is of course possible to use pure software to simulate hardware operations, such as Bochs. But the performance will drop by several orders of magnitude. The performance degradation of VM-XP is too severe. I think changing to VMWare, Hyper-V, VirtualBox, Xen or even Bochs with Linux and Windows may be better. Forget it, I can continue to do it anyway... I have lost the interest in studying how many levels can be nested, it doesn't make much sense anyway.

Last edited by Vmwaretyu; 09-22-2021 at 04:10 AM.
 
Old 09-22-2021, 02:28 PM   #15
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,020

Rep: Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630
You can't get infinite unless you have God's computer.

You will quickly find this task to fail. It basically useless to attempt it unless you just want to see. There is no practical use for it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash: Breaking multiple levels? fatalerror0x00 Programming 5 12-19-2012 02:47 PM
Multiple Samba User Permission Levels Temujin_12 Linux - Software 7 03-11-2008 06:32 AM
How do I serch for files on multiple directory levels? vasco-t Ubuntu 5 03-15-2007 03:51 PM
Why won't my FC3 rc0 and rc6 levels not call kill script when entering those levels? dvkwiatk Linux - General 2 11-11-2006 08:09 AM
gcc multiple optimization levels ? Ikebo Programming 2 07-11-2004 11:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 07:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration