0

Im trying to understand how virtual machines work with relation to host.

Lets say my host has an 8 core cpu and 16gb ram

I want to create some virtual machines. Does this mean I can create 3x (2 core + 4gb) virtual machines leaving 2 cores and 4gb of ram for the host?

Like does it equate 1=1 or is virtualization different?

If i did 4x (2core + 4gb ram) machines, would this technically be all the resources of the host and unable to run if all were running at the same time?

Thanks for helping my noob brain understand how virtualization works with regards to host and resources

Levi
  • 31
  • 1
  • 1
  • 5
  • 1
    No, the resources are shared. There is a mini operating system below your main operating system, called a "hypervisor". That hypervisor assigns CPUs to your main operating system and the virtual machines, the same way your main system assigns CPUs to your processes. Your main OS communicates with the hypervisor so they don't collide. – Tim Roberts Jan 14 '22 at 06:27
  • 1
    Generally CPUs are oversubscribed, so you can create more virtual CPUs than you have physical CPUs. But memory is often dedicated, so you must have enough physical memory for all the simultaneously running VMs. This is because two independent levels of memory management—in the guest and in the host—can result in poor performance. Also because devices assigned to the guest typically require memory in the guest to be pinned. Some VMMs do have solutions for these issues, and they support oversubscribing memory, too. – prl Jan 14 '22 at 07:28

0 Answers0