LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   What are the benefits for running kvm instead of virtualbox (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/what-are-the-benefits-for-running-kvm-instead-of-virtualbox-4175543685/)

EDDY1 05-26-2015 08:58 PM

What are the benefits for running kvm instead of virtualbox
 
What are the benefits for running kvm instead of virtualbox?
Most of the threads that I've read said that using kvm affects performance. So whaat are the benefits

jefro 05-27-2015 02:22 PM

They are always in a close race but I'd still think that KVM is a bit faster. http://www.phoronix.com/scan.php?pag...4_kvmbox&num=1

That assumes fully supported host OS and hardware. As hardware and vm technology improves they get to claim better speeds, more features and ease of use, better admin features too.

You can't go wrong with either choice I'd think. For server farm you may be better off with kvm but that is only a guess.

dyasny 05-27-2015 02:52 PM

try to manage a large number of hosts and a very large number of VMs and you won't be asking this question.

dt64 05-27-2015 04:05 PM

Quote:

Originally Posted by dyasny (Post 5368341)
try to manage a large number of hosts and a very large number of VMs and you won't be asking this question.

you wanted to say that, compared to VMware, Virtualbox is more like VMware Workstation and KVM more like ESXI?

dyasny 05-27-2015 06:31 PM

Quote:

Originally Posted by dt64 (Post 5368373)
you wanted to say that, compared to VMware, Virtualbox is more like VMware Workstation and KVM more like ESXI?

if you want an exact comparison, kvm, the linux kernel, libvirt and virt tools are like ESXi, kvm on it's own is closer to vmkernel only. As for myself, I have said what I wanted to say.

Ihatewindows522 05-28-2015 10:35 AM

Unlike ESXi, you don't need to connect remotely to access the VMs with KVM. VirtualBox is very easy to use, seems to be between VMware Player and Studio in it's functionality. VirtualBox is also a rather high level application compared to KVM. This can mean a great deal in performance.

If you want something easy to use, use VirtualBox.
If you're willing to learn how to use it, KVM can leave VirtualBox in the dust.

VirtualBox also has some interesting features like being able to record the VM's screen, even when the resolution changes. I know first hand how hard it is to record VMs without that. VirtualBox also allows you to resize the guest display by resizing the window itself.
And another cool feature of VirtualBox:
http://www.howtogeek.com/171145/use-...rtual-machine/

dyasny 05-28-2015 03:49 PM

> VirtualBox also allows you to resize the guest display by resizing the window itself.

Also possible with KVM and Spice

Skaperen 05-29-2015 03:54 AM

Quote:

Originally Posted by Ihatewindows522 (Post 5368825)
And another cool feature of VirtualBox:
http://www.howtogeek.com/171145/use-...rtual-machine/

been doing this for years with X-Windows. oh wait ... some people call that "remote" so i guess it doesn't count.

Pearlseattle 05-29-2015 03:15 PM

Let's not forget that VirtualBox is an Oracle product - the Oracle corporation could decide anytime to stop support/development of VirtualBox and at that point you would have to hope that somebody forks it in some intelligent way, or otherwise you would have to re-implement everything.

We had & have a similar situation with MySQL:
MySQL was bought by Oracle and the original MySQL was forked into MariaDB => people are migrating to MariaDB.
I am one of those that is migrating and I do enjoy the additional functionalities of MariaDB and so far I did not have any problems.

Quote:

Most of the threads that I've read said that using kvm affects performance.
Well, independently if you use KVM or VirtualBox, you're adding at least an additional layer between your HW and SW - impossible that this does not affect negatively the performance.

One thing that you should definitely investigate, if you need it, is the area of rendering/graphics/3Dgraphics running within the VM.
I don't have experience with it, but it could be that VirtualBox performs much better than KVM in this area.

dt64 05-29-2015 03:53 PM

Quote:

Originally Posted by Pearlseattle (Post 5369526)
Well, independently if you use KVM or VirtualBox, you're adding at least an additional layer between your HW and SW - impossible that this does not affect negatively the performance.

One thing that you should definitely investigate, if you need it, is the area of rendering/graphics/3Dgraphics running within the VM.
I don't have experience with it, but it could be that VirtualBox performs much better than KVM in this area.

not necessarily, since KVM can use para-virtualized drivers if available, giving the guest direct access to the hardware. If you can set up your guest with these, it is about as quick as on native hardware. I'm not sure if VB can do this.

Pearlseattle 05-29-2015 04:38 PM

@dt64

If you're referring to PCI-passthrough:
you need a GPU allocated uniquely to that specific VM + the PCI-bus of the GPU not being used for anything else (reserved during kernel boot through parameters) + VTx enabled on the CPU and BIOS + VTd enabled on the motherboard and BIOS => I've done it once and it does work but it's a lot of work and ends up being a very specific setup that you cannot just fire up spontaneously for any VM.

Samsonite2010 05-29-2015 05:35 PM

Contrary to popular belief of VirtualBox having some kind of performance impediment - it has far better guest hardware support than anything else so (and I have checked myself) you should find if you configure the extras that VirtualBox has available, it will be hard to beat (I have run benchmarks on the guest OS). That is if you care about the actual performance of the VM itself. There is a lot of acceleration available and I have found nothing that can match it from a "logging into the VM and using it" point of view. That being said, it depends on what you use the VMs for.

One caveat is that this is probably more true if you run Windows operating systems on the VMs (I use Linux as host and run my Windows machines as VMs within).

dyasny 05-29-2015 08:28 PM

Quote:

Originally Posted by dt64 (Post 5369544)
not necessarily, since KVM can use para-virtualized drivers if available, giving the guest direct access to the hardware. If you can set up your guest with these, it is about as quick as on native hardware. I'm not sure if VB can do this.

PV is great, but it also doesn't lack some overhead. The general idea really is that the existing hardware is way too powerful for a single workload, and VMs allow us to safely exploit the hardware to the fullest, even if some of the performance is lost on the way.

dyasny 05-29-2015 08:30 PM

Quote:

Originally Posted by Pearlseattle (Post 5369557)
you need a GPU allocated uniquely to that specific VM + the PCI-bus of the GPU not being used for anything else (reserved during kernel boot through parameters) + VTx enabled on the CPU and BIOS + VTd enabled on the motherboard and BIOS => I've done it once and it does work but it's a lot of work and ends up being a very specific setup that you cannot just fire up spontaneously for any VM.

This isn't PCI passthrough, this is GPU passthrough, and it's quite simple with vfio. Regular PCI passthrough is even simpler, no rocket science there

dyasny 05-29-2015 08:32 PM

Quote:

Originally Posted by Samsonite2010 (Post 5369575)
Contrary to popular belief of VirtualBox having some kind of performance impediment - it has far better guest hardware support than anything else

can you please be more specific? better guest hardware support - what does that mean?

Quote:

so (and I have checked myself) you should find if you configure the extras that VirtualBox has available, it will be hard to beat (I have run benchmarks on the guest OS).
So have I, there is a reason KVM is at the top of specvirt every year since 2009.


Quote:

There is a lot of acceleration available and I have found nothing that can match it from a "logging into the VM and using it" point of view. That being said, it depends on what you use the VMs for.
more specifics please

Quote:

One caveat is that this is probably more true if you run Windows operating systems on the VMs (I use Linux as host and run my Windows machines as VMs within).
This should not matter. KVM was developed with windows in mind


All times are GMT -5. The time now is 01:45 PM.