Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Windows hosts #2

Merged
merged 1 commit into from
Mar 14, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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