Skip to content

Commit

Permalink
Merge pull request #2 from mbrodala/patch-1
Browse files Browse the repository at this point in the history
Add support for Windows hosts
  • Loading branch information
rdsubhas committed Mar 14, 2015
2 parents 1937770 + 828271e commit 459a01f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/vagrant/faster/action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ def optimal_settings
elsif host =~ /linux/
cpus = `nproc`.to_i
mem = `grep 'MemTotal' /proc/meminfo | sed -e 's/MemTotal://' -e 's/ kB//'`.to_i / 1024
elsif host =~ /mswin|mingw|cygwin/
cpus = `wmic cpu Get NumberOfCores`.split[1].to_i
mem = `wmic computersystem Get TotalPhysicalMemory`.split[1].to_i / 1024 / 1024
end

# Give VM 1/4 system memory & access to half of cpu cores on the host
Expand Down

0 comments on commit 459a01f

Please sign in to comment.