0

We're migrating our internal network and services and we will be installing new servers (Centos 7 and so). And I wonder if we should install the services in different VMs (we use KVM) or group them (some or all) in the same VM.

What are some advantages and disadvantages of using a single VM for all services vs a VM per service?

1
  • As worded this question will be interpreted as asking for opinion (opinion is off topic). Finding the "best" is at least NP or is it NP complete (I am not a computer scientist so don't made the distinction). However I have added an answer to "what is a common practice …." – ctrl-alt-delor Feb 3 at 7:48
2

A common practice is to deploy each service in a different docker container, and run many containers on the same VM.

Containers are a bit like virtual machines. But they share a kernel. There is no VM overhead. They just use features of the kernel to isolate: Many of the management strategies are the same, but the overhead is low.

2
  • But that will add another layer of complexity (docker). So in the case of VMs without docker, will it be better to have one (or two) VM with multiple servers, or one VM almost per service? – joovunir Feb 4 at 5:51
  • It can remove more complexity than it adds. Containers DON'T add indirection or make it slower. As for managing VMs and containers, there are tools for deploying containers: these tools will allow you to deploy to VMs and raw hosts. It will allow you to separate. Deployment other concerns. You may choose to abandon the use of VMs, or just use them as a deployment detail ( because they are cheep to rent, or a dev is running MS-Windows so she needs to run all the containers in Gnu/Linux in a VM in their MS-Windows. – ctrl-alt-delor Feb 4 at 19:46

Not the answer you're looking for? Browse other questions tagged or ask your own question.