public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* KVM and VMware
@ 2009-02-25 13:10 Manfred_Knick
  2009-02-25 13:36 ` Avi Kivity
  0 siblings, 1 reply; 9+ messages in thread
From: Manfred_Knick @ 2009-02-25 13:10 UTC (permalink / raw)
  To: kvm


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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: KVM and VMware
  2009-02-25 13:10 KVM and VMware Manfred_Knick
@ 2009-02-25 13:36 ` Avi Kivity
  2009-02-25 14:37   ` Manfred_Knick
  2009-02-25 14:50   ` Manfred_Knick
  0 siblings, 2 replies; 9+ messages in thread
From: Avi Kivity @ 2009-02-25 13:36 UTC (permalink / raw)
  To: Manfred_Knick; +Cc: kvm

Manfred_Knick wrote:
> 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?
>   

Yes.

> B) Any chance to solve this problem?

'rmmod kvm-intel; rmmod kvm' should work.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: KVM and VMware
  2009-02-25 13:36 ` Avi Kivity
@ 2009-02-25 14:37   ` Manfred_Knick
  2009-02-25 16:03     ` Avi Kivity
  2009-02-25 14:50   ` Manfred_Knick
  1 sibling, 1 reply; 9+ messages in thread
From: Manfred_Knick @ 2009-02-25 14:37 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm

Avi Kivity schrieb:
> Manfred_Knick wrote:
>> 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?
> Yes.
>> 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?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: KVM and VMware
  2009-02-25 13:36 ` Avi Kivity
  2009-02-25 14:37   ` Manfred_Knick
@ 2009-02-25 14:50   ` Manfred_Knick
  1 sibling, 0 replies; 9+ messages in thread
From: Manfred_Knick @ 2009-02-25 14:50 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm

Avi Kivity schrieb:
> Manfred_Knick wrote:
>> 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

-->   http://lkml.org/lkml/2007/5/2/151

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: KVM and VMware
  2009-02-25 14:37   ` Manfred_Knick
@ 2009-02-25 16:03     ` Avi Kivity
  2009-02-26  9:25       ` Alexander Graf
  0 siblings, 1 reply; 9+ messages in thread
From: Avi Kivity @ 2009-02-25 16:03 UTC (permalink / raw)
  To: Manfred_Knick; +Cc: kvm

Manfred_Knick wrote:
>>> 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.
>
>
>   

Looks right -- does "without modules" mean kvm is built-in into the kernel?

> 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.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: KVM and VMware
  2009-02-25 16:03     ` Avi Kivity
@ 2009-02-26  9:25       ` Alexander Graf
  2009-02-26 11:34         ` Manfred_Knick
  0 siblings, 1 reply; 9+ messages in thread
From: Alexander Graf @ 2009-02-26  9:25 UTC (permalink / raw)
  To: Avi Kivity; +Cc: Manfred_Knick, kvm


On 25.02.2009, at 17:03, Avi Kivity wrote:

> Manfred_Knick wrote:
>>>> 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.
>>
>>
>>
>
> Looks right -- does "without modules" mean kvm is built-in into the  
> kernel?
>
>> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: KVM and VMware
  2009-02-26  9:25       ` Alexander Graf
@ 2009-02-26 11:34         ` Manfred_Knick
  2009-02-26 12:03           ` Ricardo Botelho de Sousa
  0 siblings, 1 reply; 9+ messages in thread
From: Manfred_Knick @ 2009-02-26 11:34 UTC (permalink / raw)
  To: Alexander Graf; +Cc: Avi Kivity, kvm

Alexander Graf schrieb:

> 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.

> 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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: KVM and VMware
  2009-02-26 11:34         ` Manfred_Knick
@ 2009-02-26 12:03           ` Ricardo Botelho de Sousa
  2009-02-26 13:43             ` Manfred_Knick
  0 siblings, 1 reply; 9+ messages in thread
From: Ricardo Botelho de Sousa @ 2009-02-26 12:03 UTC (permalink / raw)
  To: Manfred_Knick; +Cc: kvm

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
-- 
ServiSMART                                             Ricardo Sousa
servimos o seu negócio                          tel: +351 96 298 0989


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: KVM and VMware
  2009-02-26 12:03           ` Ricardo Botelho de Sousa
@ 2009-02-26 13:43             ` Manfred_Knick
  0 siblings, 0 replies; 9+ messages in thread
From: Manfred_Knick @ 2009-02-26 13:43 UTC (permalink / raw)
  To: Ricardo Botelho de Sousa; +Cc: kvm

Ricardo Botelho de Sousa schrieb:
> 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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-02-26 13:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-25 13:10 KVM and VMware Manfred_Knick
2009-02-25 13:36 ` Avi Kivity
2009-02-25 14:37   ` Manfred_Knick
2009-02-25 16:03     ` Avi Kivity
2009-02-26  9:25       ` Alexander Graf
2009-02-26 11:34         ` Manfred_Knick
2009-02-26 12:03           ` Ricardo Botelho de Sousa
2009-02-26 13:43             ` Manfred_Knick
2009-02-25 14:50   ` Manfred_Knick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox