Re: multiple cores...

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: multiple cores...

Evelyn Killaby
An update to Robert Berger's post to keep the links/resources up to date a year later (as of 4/2013).

The VirtualBox commands overview link is still relevant:
http://www.virtualbox.org/manual/ch08.html#idp13963600

There's now a v1.0 way of configuring a Vagrantfile and a v1.1 way of configuring a Vagrantfile.

v1.0 "customize" command documentation has moved to here:
http://docs-v1.vagrantup.com/v1/docs/config/vm/customize.html

v1.0 example:

Vagrant::Config.run do |config|
    ...
    config.vm.customize [
        'modifyvm', :id,
        '--memory', '128',
        '--cpus', '2',
    ]
    ...
end


v1.1 "customize" command documentation available here (scroll to bottom of page):
http://docs.vagrantup.com/v2/virtualbox/configuration.html

v1.1 example:

Vagrant.configure("2") do |config|
    ...
    config.vm.provider "virtualbox" do |vm|
        vm.customize [
            'modifyvm', :id,
            '--memory', '128',
            '--cpus', '2',
        ]
    end
    ...
end





On Wednesday, March 14, 2012 12:04:37 AM UTC-7, Robert Berger wrote:
The new style for customizing the Virtualbox is described at http://vagrantup.com/docs/config/vm/customize.html. :

  config.vm.customize [
                      "modifyvm", :id,
                      "--memory", "2048,
                       "--name", "my_vagrant0",
                       "--cpus", "2"
                      ]

Basically an array of strings that will be used to form the command line arguments to the call to VirtualBox. So theoretically any of the  VBoxManage modifyvm
  flags as shown in 
http://www.virtualbox.org/manual/ch08.html could be passed in...

--cpus lets you set the number of cores allocated to the VM.

On Thursday, September 15, 2011 4:59:40 PM UTC-7, josanabr wrote:
hi,

I was wondering how I can create a virtual machine with some
particular specs using Vagrant. For instance, I wanna know how to
customize RAM size and number of cores.

Thanks so much,

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.