KVM and VMware
I have successfully enjoyed KVM for para-virtualized Linux guests :))
Unfortunately I have to maintain some SW for a customer which is running on a specialized HW,
so I only have the chance to maintain that in customer-supplied VMware virtual machines.
Trying to emerge (Gentoo on amd64) VMware Workstation in addition, I ran into
==> "You cannot install on a system with KVM enabled."
Digging, I found
--> http://communities.vmware.com/thread/188359 :
ksc:
"VMware switches in and out of root mode each time so as to not conflict with other virtualization software.
KVM likes to hang onto the virtualization root mode aggressively for a minor performance gain. (*)
For comparison, Parallels hangs on to the root mode but detects other virtualization software and lets go when it detects a conflict. Until KVM becomes more compatible with other software, our installer will detect KVM and actively try to prevent you from getting into this situtation."
CharlieM:
"IIRC, there was an issue where unloading the KVM module was not enough, as it forgot to 'let go' of root mode when it was unloaded. I don't think that bug lasted long, but it's something to watch for; just be sure your distro is up to date."
A) Is (*) correct?
B) Any chance to solve this problem?
Thanks for your esteemed answers in advance!
Kind regards
Manfred
P.S.: Please reply via above PM -
because I'm not subscribed to the KVM BUG tracker yet.
Quoted 36 lines · Manfred_Knick
I have successfully enjoyed KVM for para-virtualized Linux guests :))
Unfortunately I have to maintain some SW for a customer which is running on a specialized HW,
so I only have the chance to maintain that in customer-supplied VMware virtual machines.Trying to emerge (Gentoo on amd64) VMware Workstation in addition, I ran into
==> "You cannot install on a system with KVM enabled."
Digging, I found
--> http://communities.vmware.com/thread/188359 :
ksc:
"VMware switches in and out of root mode each time so as to not conflict with other virtualization software.
KVM likes to hang onto the virtualization root mode aggressively for a minor performance gain. (*)
For comparison, Parallels hangs on to the root mode but detects other virtualization software and lets go when it detects a conflict. Until KVM becomes more compatible with other software, our installer will detect KVM and actively try to prevent you from getting into this situtation."CharlieM:
"IIRC, there was an issue where unloading the KVM module was not enough, as it forgot to 'let go' of root mode when it was unloaded. I don't think that bug lasted long, but it's something to watch for; just be sure your distro is up to date."
Quoted 2 lines
A) Is (*) correct?
Yes.
Quoted 1 line
B) Any chance to solve this problem?
'rmmod kvm-intel; rmmod kvm' should work.
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 9 lines · Avi Kivity
Quoted 8 lines · Manfred_Knick
I have successfully enjoyed KVM for para-virtualized Linux guests :))
...
==> "You cannot install on a system with KVM enabled."
...
KVM likes to hang onto the virtualization root mode aggressively for a minor performance gain. (*)
...
A) Is (*) correct?
Quoted 3 lines
Yes.
Quoted 1 line
B) Any chance to solve this problem?
'rmmod kvm-intel; rmmod kvm' should work.
Avi,
thanks a lot for your _very_ speedy response!!
So I take it that
--> "You can't have them both at once, at the same time" which turns out to be really unfortunate for my tasks.
ERGO: what I'm going to try is:
o) delete all static kvm stuff in the kernel .config / rebuild / reboot
o) un-merge app-emulation/kvm-84 "without modules"
o) emerge vmware-workstation
o) emerge app-emulation/kvm-84 "with modules"
o) don't auto-load kvm and kvm-[intel|amd]
o) !! EITHER start vmware
o) !! OR load / start KVM,
o) !! thus manually avoiding those threatening kernel lockups.
Are there any plans @ KVM to change the (*) behavior in the future, e.g. switching in and out of root mode each time
so as to not conflict with other virtualization software?
Quoted 14 lines · Manfred_Knick
Quoted 4 lines
Quoted 2 lines
B) Any chance to solve this problem?
'rmmod kvm-intel; rmmod kvm' should work.
Avi,
thanks a lot for your _very_ speedy response!!So I take it that
--> "You can't have them both at once, at the same time" which turns out to be really unfortunate for my tasks.ERGO: what I'm going to try is:
Quoted 11 lines
o) delete all static kvm stuff in the kernel .config / rebuild / reboot
o) un-merge app-emulation/kvm-84 "without modules"
o) emerge vmware-workstation
o) emerge app-emulation/kvm-84 "with modules"
o) don't auto-load kvm and kvm-[intel|amd]
o) !! EITHER start vmware
o) !! OR load / start KVM,
o) !! thus manually avoiding those threatening kernel lockups.
Looks right -- does "without modules" mean kvm is built-in into the kernel?
Quoted 4 lines
Are there any plans @ KVM to change the (*) behavior in the future, e.g. switching in and out of root mode each time
so as to not conflict with other virtualization software?
No, running multiple virtual machine monitors is a very esoteric use case and is therefore not worth the performance hit.
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 27 lines · Avi Kivity
Quoted 14 lines · Manfred_Knick
Quoted 4 lines
Quoted 2 lines
B) Any chance to solve this problem?
'rmmod kvm-intel; rmmod kvm' should work.
Avi,
thanks a lot for your _very_ speedy response!!So I take it that
--> "You can't have them both at once, at the same time" which turns out to be really unfortunate for my tasks.ERGO: what I'm going to try is:
Quoted 11 lines
o) delete all static kvm stuff in the kernel .config / rebuild / reboot
o) un-merge app-emulation/kvm-84 "without modules"
o) emerge vmware-workstation
o) emerge app-emulation/kvm-84 "with modules"
o) don't auto-load kvm and kvm-[intel|amd]
o) !! EITHER start vmware
o) !! OR load / start KVM,
o) !! thus manually avoiding those threatening kernel lockups.
Quoted 8 lines
Looks right -- does "without modules" mean kvm is built-in into the kernel?
Quoted 4 lines
Are there any plans @ KVM to change the (*) behavior in the future, e.g. switching in and out of root mode each time
so as to not conflict with other virtualization software?No, running multiple virtual machine monitors is a very esoteric use case and is therefore not worth the performance hit.
I have a patch lying around that activates hardware virtualization features on first VM creation and deactivates them on last destruction, so you can insmod kvm without blocking other VMMs from working. Of course you still can't run kvm and vmware virtual machines in parallel. But you can have both loaded without running into trouble.
I just need to rediff that for current git. It's on my TODO list, just not top priority for now.
Alex
Quoted 6 lines · Alexander Graf
I have a patch lying around that activates hardware virtualization features on first VM creation and deactivates them on last destruction, so you can insmod kvm without blocking other VMMs from working.
Of course you still can't run kvm and vmware virtual machines in parallel. But you can have both loaded without running into trouble.
That would help and ease work quite a bit, indeed!
Because:
A) There _are_ clients in the wild
which use different Virtualizations on different servers for different applications -
especially during times of migration :)) !
B) Even if one client exclusively uses KVM,
another client exclusively uses Parallels,
another client exclusively uses VMware, ...,
the guy who has to work on those projects
is 'a bit unfortunate' to-day ;)
The procedure described in my former mail will work -
but I fear that every time e.g. a new kernel version has to be compiled, you have to be very aware to take the right steps in the right order again and again.
Of couse, having this patch applied,
VMware would need to be convinced
to take off their protective charm ;) at installation time.
Quoted 1 line
Of course you still can't run ... in parallel.
Thus, if one would like to protect any ignorant user from harming himself, the check for exclusiveness would have to be applied dynamically at each try to start-up a VM instead, not at installation time.
Manfred
Quoted 3 lines · On Thursday 26 February 2009 11:34:43 Manfred_Knick wrote:
Thus, if one would like to protect any ignorant user from harming himself, the check for exclusiveness would have to be applied dynamically at each try to start-up a VM instead, not at installation time.
Not necessarly the ignorant. If you, to prepare a migration install on a Ubuntu/Debian machine their KVM package, it will automatically load the adquate module. IF VMware is still running ... you get a stuck server :(
Regards
Signature · 2 lines
ServiSMART Ricardo Sousa servimos o seu negócio tel: +351 96 298 0989
Quoted 8 lines · Ricardo Botelho de Sousa
Quoted 3 lines · On Thursday 26 February 2009 11:34:43 Manfred_Knick wrote:
Thus, if one would like to protect any ignorant user from harming himself, the check for exclusiveness would have to be applied dynamically at each try to start-up a VM instead, not at installation time.
Not necessarly the ignorant. If you, to prepare a migration install on a Ubuntu/Debian machine their KVM package, it will automatically load the adquate module. IF VMware is still running ... you get a stuck server :(
Sorry for the wording ...
Please, note what I'm looking for, as it seems to be the "easy" case:
IFF - as supposed in this intellectual game - the patch *is* already applied, the module may well load, indeed; but it will *not* change the KVM 'hypervisor' to 'root mode' instantaneously;
thus: no stuck server yet.
IFF - as proposed - the other 'hypervisor' rejects to start any VM (and thus continues to reject switching into 'root mode') as long as *any* other 'hypervisor' keeps any VM running, thre still will be no stuck server.
It's the user's responsibility then to react upon the corresponding error message, shutdown the other VM's, and re-start over again.
Manfred
P.S.:
If one wants to take advantage of VMware's even more comfortable approach with switching in and out of 'root mode',
that desires a more detailed consideration, defenitely more work and perhaps some decrease in performance.
Avi pointed out to me that on a 'bare metal' server installation, KVM might not be prepared to pay this latter sacrifice.
Quoted 8 lines · Avi Kivity
Quoted 7 lines · Manfred_Knick
I have successfully enjoyed KVM for para-virtualized Linux guests :))
...
==> "You cannot install on a system with KVM enabled."
...
KVM likes to hang onto the virtualization root mode aggressively for a minor performance gain. (*)
...
ADDENDUM:
I just came across