Recommendations on multi-guest virtual machine
I have a need to configure 4 virtual machine guestss on a Linux host, all running at the same time. I'm looking for suggestions on allocating CPUs. I normally just split the CPUs (cores) between the host and guest, but I need to do this a bit differently with 4 guests.
I've read that VirtualBox guests really only need two cores. I'm skeptical about this and I've seen no empirical evidence anywhere on this topic. Does anyone have any thoughts on this? |
Most modern VM's can over allocate by design. They manage resources.
If you have a very up to date server that was made to run VM's it presents hardware more closely to the guest. So if you have a program running that normally works much better on 4 processors then allocate that much. On a commercial server the host doesn't really use any resources. The guests are over allocated and the vm software manages to distribute as best as it can. If my server had 8 available I tend to give maybe 6 to each vm. |
Quote:
|
You can not allocate more then half the number of cpus on a single guest or you will get a configuration error. It seems like with version 7 you need to use 2 regardless of guest or it will not start. I've run 3 but never 4 at the same time on an i3
|
It always depends on what you want to run inside the VMs, not on the VM itself. You need to assign at least 1 CPU, and you need to increase it if it is not enough.
Usually at least 2 is recommended, but in some cases 1 can be enough. The host (OS) needs at least 1 CPU to be able to run and again, depending on the load it may need more. But instead of asking questions like this you can test it easily yourself and you will find out the best configuration for yourself. |
Quote:
Thus far, it sounds like a minimum of 12 CPUs/cores would be needed. 2 for each VM gues and 2 for the host. When I put the machine togeher, I'll post back with results. Meanwhile, additional suggestions are appreciated. |
Generally speaking, I would not attempt to tell the VM monitor how to manage its CPUs. "Virtual machines" are "processes," from the point-of-view of the hypervisor, and I think that it's simply best to let the hypervisor make its own, nanosecond-by-nanosecond, dispatching decisions. If a particular CPU is – at this particular instant – available, then let the VM run there. "Don't over-analyze this."
|
I think it is a bit confusing. The VB guest settings is for the number of virtual processors and not a mapping of physical to guest. although a guest can have a max of 32 you can't allocate more then physically exists and in fact you should not select more the half on a single guest. Of course my understanding could be wrong.
As posted I never select more then two but I don't do anything cpu intensive on any of my guests. On of the reasons is that with VB 7 none of my linux 64 bit guests would start when I upgraded with only one... |
Quote:
|
VirtualBox is easy and friendly, but not the right tool for this kind of a project. I would use a more powerful server virtualization tool with lower overhead.
I used to use VMware, but can no longer recommend it. QEMU/KVM works well enough, if you have enough space, memory, and CPU cycles. BONUS, it performs better than VirtualBox. It works well with Virtual Machine Manager and I can recommend it. XEN can do the job, but when I last used it managing it was a royal pain. IF you can use containers, I used to do these projects in OpenVZ v6, but V7 is a total rewrite and I have not used it enough to recommend. V6 allowed multiple kinds of over allocation, and handled saturation and balance elegantly. Go VMware if you have budget for the commercial product, otherwise I recommend QEMU with VM Manager. (QEMU and VMM are in your repo for nearly all distributions of Linux and FreeBSD nicely.) |
Quote:
|
the lightweight solution would be to use some kind of container (like docker), if possible, instead of VMs. That would not require any additional CPU. And yes, I would recommend qemu too, you'll probably have to learn how to use it, but it'll be worth the investment in the end
|
Quote:
OPENVZ6 (now called OpenVZ-Legacy) requires RHEL 6 (and will work with CentOS 6) and does ONLY containers. But the containers can be managed and tuned to a fine degree not possible (yet) with other container systems. OPENVZ7 is a full distribution hypervisor that manages both containers and full virtual guests. Some of the things I could do with OpenVZ6 are not easy (or not possible) using v7. There are advantages and disadvantages to both. I believe v7 uses some of the QEMU lib code for full virtualization. There are options. Possibly too MANY options to make the choice easy. I hope the OP will come back to let us know what was decided, and how it works out for them. |
QEMU seems interesting. I may try that on the new system before doing anything else. I've used VBox for year and it works quite well for our purposes, but lately the user forum has been unresponsive. All of the questions I've asked in the past 6 month have received no responses. Is there a QEMU user forum? Can QEMU import Virual images from other platforms, e.g. .vdi?
Yes - I will post result. It's probably a few weeks out before we do this. I do have hardware specified and presented to the check-signers. |
Quote:
See https://www.qemu.org/docs/master/tools/qemu-img.html for detail related to your question, for one example. |
All times are GMT -5. The time now is 10:06 PM. |