Does it make any sense to run a virtual machine with a "master" guest,
and in that master guest run many other guests?
Has anyone tested this? Is it even possible?
Are there better ways to accomplish my goals? (Read on.)
(I googled for "guest in guest" and found nothing)
What I want to do: I'd like to set up and test various virtual networks, with database and application servers, and test different firewall, DNS server, database server configs, etc.
I could do this by running guests directly on my host computer, but then I might need to modify the network config on my host (e.g. configure dnsmasq?), depending on what network setup I'm about to test. I'd also need to start each guest individually. Whereas if all guests run inside a master guest, then I can config the network on that master guest, and I need only start and stop that master guest, and take snapshots of it, to implicitly start & stop & snapshot all guests running inside it.
(I would have many master guests, probably only one running at a time.)
I'm using Ubuntu 11.4 and KVM, with hardware virtualization support (AMD-V).
Do you think the guests-in-the-guest would benefit from virtualization?
Update: I should have googled for "Nested Virtualization" not "guests in guest". Now I find lots of links :-) E.g. this example of actually migrating a running VM from the host machine to a nested VM host: VMotion from physical ESX 4 to virtual ESX 4
You who replied, thanks for mentioning "Nested Virtualization" :-)
Update: Performance info, for AMD processors, from 2008: [...] up until now, when kvm virtualizes a processor, the guest sees a cpu that is similar to the host processor, but does not have virtualization extensions. This means that you cannot run a hypervisor that needs these virtualization extensions within a guest (you can still run hypervisors that do not rely on these extensions, such as VMware, but with lower performance). With the new patches, the virtualized cpu does include the virtualization extensions; this means the guest can run a hypervisor, including kvm, and have its own guests. (thanks "wzzrd")
Update: Performance info on Intel processors, from 2011: "There ist no support for nested virtualization with intel vmx in the current version of kvm in the Ubuntu repositories. With the newest patches for kvm it is possible, but there are still in development"