Setup vagrant with 2 or more CPU cores on 64bits systems

Have you ever had this issue, asking vagrant to more than one CPU core but seeing only one ?

You will find here how to fix it.

Here is how i had setup my VagrantFile:

vb.customize ["modifyvm", :id, "--memory", "8192", "--cpus", "2"]

Seems good, but it does not work on 64bits systems.

~ sudo cat /proc/cpuinfo | grep 'processor'
processor : 0 # CPU1

You need another option to be enabled, called ioapic

vb.customize ["modifyvm", :id, "--memory", "8192", "--cpus", "2", "--ioapic", "on"]

Now, with this option, start you VM and...

~ sudo cat /proc/cpuinfo | grep 'processor'
processor : 0 # CPU1
processor : 1 # CPU2

Cheers!