I have a desktop with Core i3 + 8GB.
It looks like I need to assign one of my CPU cores to a VM. That means I can only run one VM at a time?
Does VM application actually uses a core for each VM images? Or Do they depend on memory?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
Though the other answers are correct, there are a few things that you want to be aware of.
Do not exceed the number of actual threads that you have available on the server within a single VM. For example, if your Core i3 has 4 threads (i.e. Dual Core with HTT) then do not create a VM with 8 threads. They will more often than not freak out and actually run extremely slow.
Though you can allocate more RAM to your VMs than what your server actually has, beware of actual RAM used and try not to exceed your bare metal max. You'll start using SWAP and that is just hella slow. You're better off lowering the RAM on each VM if the amount used is starting to use SWAP (Virtual Memory).
Just because your CPU idles at 25-50% doesn't mean that you have room for 2-4x the number of VMs. You do not want to run your CPU at idle (or minimal processes) very high. There is always a natural amount of CPU usage and overtime you will see some statistical data on your servers to know peak times and how much more you can realistically put on the server.
Typically with VMs and Clouds, the slowest part of the server is the hard drives. It's best to match the number of VMs that you're planning on running with a SAN/HDDs that can support them. My Raid5 reliably pushes 300MBps.
My private cloud has about 20 VMs running on it at any given time. A few of the VMs include Proxy Server, VPN Server, WHS, Database Server, 5 Ruby on Rails Applications, Astrix Phone Server, 2 WordPress Servers, Virtual Host Web Server (10 websites).
It's a Intel Xeon E3-1270, 32GB RAM, 8x1TB 7200 RPM RAID5, and 50Mbps connection. For the most part, it idles around 5-10% CPU usage. It peaks around 75% CPU usage. I'm using Proxmox as my virtualization solution and love it. I've been using it for a few years now.
I've quite comfortably run 3-4 VMs at once on a c2d. There's a few concepts here. Firstly that while a core can run one thread at a time (not counting hyperthreading and such), it can switch between threads, Two cores is better since they don't need to switch a core between threads as often, but it isn't a showstopper.
Its no different from running multiple copies of a program (Chrome for example runs a process per tab), or a single multithreaded piece of software.
Your ram and processor usage is far more critical than coredness, and even dedicated VM hosts have far less cores than VMs running.
I'd also note that some vm host software lets you run more virtual cores than physical ones, so its quite certain that you don't need a core per vm.