lib/beaker/hypervisor/vagrant_virtualbox.rb in beaker-3.6.0 vs lib/beaker/hypervisor/vagrant_virtualbox.rb in beaker-3.7.0
- old
+ new
@@ -15,15 +15,12 @@
" vb.customize ['#{command}', :id, #{args.map{|a| "'#{a.to_s}'"}.join(", ")}]\n"
end
def self.provider_vfile_section(host, options)
# Allow memory and CPUs to be set at a per node level or overall, and take the most specific setting
- host_memory = host['vagrant_memsize'] ? host['vagrant_memsize'] : (options['vagrant_memsize'] ? options['vagrant_memsize'] : 1024)
- host_cpus = host['vagrant_cpus'] ? host['vagrant_cpus'] : (options['vagrant_cpus'] ? options['vagrant_cpus'] : 1)
-
provider_section = ""
provider_section << " v.vm.provider :virtualbox do |vb|\n"
- provider_section << " vb.customize ['modifyvm', :id, '--memory', '#{host_memory}', '--cpus', '#{host_cpus}']\n"
+ provider_section << " vb.customize ['modifyvm', :id, '--memory', '#{memsize(host,options)}', '--cpus', '#{cpus(host,options)}']\n"
provider_section << " vb.vbguest.auto_update = false" if options[:vbguest_plugin] == 'disable'
# Guest volume support
# - Creates a new AHCI controller with the requisite number of ports,
# the default controller is limited in its number of supported ports (2).