Some customized Vagrantfile's
- TODO: Find a way to automatically adjust the RAM for the VM using the available physical RAM at the host
- Some relevant discussion here: https://stackoverflow.com/questions/33209305/vagrant-how-to-detect-windows-host-ram-and-cpu
- Automatically adjust vCPUs based on physical cores
- A bash snippet that outpus the physical cores # (adapted from here):
- Also limiting the result to a reasonable amount of vCPUs of 4:
max_vcpu=4 physical_cores=$(egrep -e "core id" -e ^physical /proc/cpuinfo|xargs -l2 echo|sort -u|wc -l) vcpu=$(( $physical_cores > $max_vcpu ? $max_vcpu : $physical_cores ))