Solved KVM nested virtualization ? stable and why would you ?
-
Hi,
So I have been seriously playing with KVM lately, and to test it out I installed it on ESXi 6.5 server as Centos 7 VM with the ability to pass VT-d extensions which is supported by ESXi (also workstation).
Why I did this, cause I need to test KVM on real server hardware, and the real server already had ESXi installed.
And I am liking it more and more each day, its stable and have better options compared to ESXi standalone server, and you can clone vms easily, of course I cloned the KVM guest server and made 2 KVM servers, and the ability to move VMs offline (not live migration) was very easy, and simple. I was not able to perform a successful live migration yet.So this got me thinking, why would anybody run KVM nested ? one idea came to my mind is perhaps somebody can do the opposite of what I did which is to run KVM then run ESXi 6.5 guest machine, but the real head scratcher for me is WHY this is needed in production environments ? is it only a testing thing, that I can understand.
So why do you run nested virtualization, also I tested this with VMware workstation back in the day and I know that nested virtualization feature in VMware is stable, is KVM the same ?
Many thanks.
-
One use of nesting that I know of is when a vendor demands that you run a specific hypervisor, like VMware ESXi, and will not support you unless you do; but you run KVM or Xen in production. You can virtualize the hypervisor for that vendor to meet their support requirements without changing your core infrastructure.
But that's pretty weak versus just replacing the vendor, in most cases.
-
Nesting is, with only the rarest exception, not something you do in production. It is almost exclusively for labs or for emergency recovery scenarios.
-
What even lead you to think that nesting in production was even possibly a good idea?
As stated nesting is great so that you can test something new without removing your existing set up but sorry I'm just mind locked. what the f*** are you possibly thinking is valid here?
-
Unethical reasons.
since KVM and usually other hyper visors allow you to play with CPU and core count of the guest VMs, I wondered if you can get away with limitations of other paid Hypervisors that limit the core count.
Not sure, just wondered what everybody else uses that tech for.
-
@msff-amman-Itofficer said in KVM nested virtualization ? stable and why would you ?:
Unethical reasons.
since KVM and usually other hyper visors allow you to play with CPU and core count of the guest VMs, I wondered if you can get away with limitations of other paid Hypervisors that limit the core count.
Nope, it does nothing of the sort. Every hypervisor lets you do that. Licensing isn't affected by the number of "presented vCPUs". So what you are suggesting does, quite literally, nothing. For example, Windows is licensed by the number of hardware cores that you have - no relationship to the number shown to the OS by the hypervisor. You gain nothing by faking this, but you lose performance and reliability.
-
@msff-amman-Itofficer said in KVM nested virtualization ? stable and why would you ?:
Not sure, just wondered what everybody else uses that tech for.
Nothing at all It's a neat idea, I wish that VirtualBox had it to make testing on my laptop a little easier for playing with different hypervisors, but outside of that, it's effectively a useless technology. I'm not aware of any real use of it in production.
-
@msff-amman-Itofficer said in KVM nested virtualization ? stable and why would you ?:
I wondered if you can get away with limitations of other paid Hypervisors that limit the core count.
I'm not sure what you mean. Do you mean like virtualizing loads of VMware ESXi Free instances on top of KVM? While feasible, it would be really silly. You'd have all the limitations of ESXi combined with all of the limitations of KVM plus all of the overhead of both. The only hypervisor with limitations is ESXi Free which I doubt any of us would run in production anyway. It, too, is really just for lab use.
-
One use of nesting that I know of is when a vendor demands that you run a specific hypervisor, like VMware ESXi, and will not support you unless you do; but you run KVM or Xen in production. You can virtualize the hypervisor for that vendor to meet their support requirements without changing your core infrastructure.
But that's pretty weak versus just replacing the vendor, in most cases.
-
Its posts/replies like this, makes me wonder why this site does not have ''mark as solution'' option given to the topic opener, and when done the topic will have green color for example.
But maybe that will be a double edge sword, cause it will block future answers and thinking on the topic...
-
@msff-amman-Itofficer said in KVM nested virtualization ? stable and why would you ?:
Its posts/replies like this, makes me wonder why this site does not have ''mark as solution'' option given to the topic opener, and when done the topic will have green color for example.
But maybe that will be a double edge sword, cause it will block future answers and thinking on the topic...
The topic opener can do that. First the topic opener must market as a question. Then the topic opener can market individual solution as an answer.
-
@msff-amman-Itofficer said in KVM nested virtualization ? stable and why would you ?:
Its posts/replies like this, makes me wonder why this site does not have ''mark as solution'' option given to the topic opener, and when done the topic will have green color for example.
But maybe that will be a double edge sword, cause it will block future answers and thinking on the topic...
I did it for you, assuming that I picked the response that you meant. There is the functionality that you want, it just isn't as obvious as you'd hope.
-
@scottalanmiller said in KVM nested virtualization ? stable and why would you ?:
@msff-amman-Itofficer said in KVM nested virtualization ? stable and why would you ?:
Not sure, just wondered what everybody else uses that tech for.
Nothing at all It's a neat idea, I wish that VirtualBox had it to make testing on my laptop a little easier for playing with different hypervisors, but outside of that, it's effectively a useless technology. I'm not aware of any real use of it in production.
You could just run KVM on your laptop and then you would be able to do that.
-
@stacksofplates said in KVM nested virtualization ? stable and why would you ?:
@scottalanmiller said in KVM nested virtualization ? stable and why would you ?:
@msff-amman-Itofficer said in KVM nested virtualization ? stable and why would you ?:
Not sure, just wondered what everybody else uses that tech for.
Nothing at all It's a neat idea, I wish that VirtualBox had it to make testing on my laptop a little easier for playing with different hypervisors, but outside of that, it's effectively a useless technology. I'm not aware of any real use of it in production.
You could just run KVM on your laptop and then you would be able to do that.
Does KVM give you local console/GUI access?
-
@Dashrender said in KVM nested virtualization ? stable and why would you ?:
@stacksofplates said in KVM nested virtualization ? stable and why would you ?:
@scottalanmiller said in KVM nested virtualization ? stable and why would you ?:
@msff-amman-Itofficer said in KVM nested virtualization ? stable and why would you ?:
Not sure, just wondered what everybody else uses that tech for.
Nothing at all It's a neat idea, I wish that VirtualBox had it to make testing on my laptop a little easier for playing with different hypervisors, but outside of that, it's effectively a useless technology. I'm not aware of any real use of it in production.
You could just run KVM on your laptop and then you would be able to do that.
Does KVM give you local console/GUI access?
He is already running Linux, but not sure what flavor. So in theory he could use KVM there and still see desktop. Not what you would ever do on a server, but for his laptop? Sure.
-
@JaredBusch said in KVM nested virtualization ? stable and why would you ?:
@Dashrender said in KVM nested virtualization ? stable and why would you ?:
@stacksofplates said in KVM nested virtualization ? stable and why would you ?:
@scottalanmiller said in KVM nested virtualization ? stable and why would you ?:
@msff-amman-Itofficer said in KVM nested virtualization ? stable and why would you ?:
Not sure, just wondered what everybody else uses that tech for.
Nothing at all It's a neat idea, I wish that VirtualBox had it to make testing on my laptop a little easier for playing with different hypervisors, but outside of that, it's effectively a useless technology. I'm not aware of any real use of it in production.
You could just run KVM on your laptop and then you would be able to do that.
Does KVM give you local console/GUI access?
He is already running Linux, but not sure what flavor. So in theory he could use KVM there and still see desktop. Not what you would ever do on a server, but for his laptop? Sure.
Interesting - OK so installing KVM does what hyper-V does, installs the hypervisor under the installed OS and then gives you full local access to Dom0? nice
-
@Dashrender said in KVM nested virtualization ? stable and why would you ?:
@JaredBusch said in KVM nested virtualization ? stable and why would you ?:
@Dashrender said in KVM nested virtualization ? stable and why would you ?:
@stacksofplates said in KVM nested virtualization ? stable and why would you ?:
@scottalanmiller said in KVM nested virtualization ? stable and why would you ?:
@msff-amman-Itofficer said in KVM nested virtualization ? stable and why would you ?:
Not sure, just wondered what everybody else uses that tech for.
Nothing at all It's a neat idea, I wish that VirtualBox had it to make testing on my laptop a little easier for playing with different hypervisors, but outside of that, it's effectively a useless technology. I'm not aware of any real use of it in production.
You could just run KVM on your laptop and then you would be able to do that.
Does KVM give you local console/GUI access?
He is already running Linux, but not sure what flavor. So in theory he could use KVM there and still see desktop. Not what you would ever do on a server, but for his laptop? Sure.
Interesting - OK so installing KVM does what hyper-V does, installs the hypervisor under the installed OS and then gives you full local access to Dom0? nice
No, KVM has no Dom0. It's more like VMware ESXi. There is no "underneath" like with Xen or Hyper-V.
-
This is where KVM and ESXi have a superior architecture. No need for a Dom0 VM.
-
@scottalanmiller said in KVM nested virtualization ? stable and why would you ?:
This is where KVM and ESXi have a superior architecture. No need for a Dom0 VM.
uhhh.. ok - then can you do what JB suggested? Install KVM into your CentOS that's already on your laptop?
-
@Dashrender said in KVM nested virtualization ? stable and why would you ?:
@scottalanmiller said in KVM nested virtualization ? stable and why would you ?:
This is where KVM and ESXi have a superior architecture. No need for a Dom0 VM.
uhhh.. ok - then can you do what JB suggested? Install KVM into your CentOS that's already on your laptop?
That's what Boxes is.
-
@scottalanmiller said in KVM nested virtualization ? stable and why would you ?:
@Dashrender said in KVM nested virtualization ? stable and why would you ?:
@scottalanmiller said in KVM nested virtualization ? stable and why would you ?:
This is where KVM and ESXi have a superior architecture. No need for a Dom0 VM.
uhhh.. ok - then can you do what JB suggested? Install KVM into your CentOS that's already on your laptop?
That's what Boxes is.
Ya don't use that crap though. I run VirtManager on my laptop. The console full screen through SPICE is awesome. Even over the network, on a LAN you could think you're using that machine instead of a VM.