Skip to content

Instantly share code, notes, and snippets.

@omribahumi
Last active December 17, 2015 02:29
Show Gist options
  • Save omribahumi/5536197 to your computer and use it in GitHub Desktop.
Save omribahumi/5536197 to your computer and use it in GitHub Desktop.
Ubuntu cloud image for vagrant doesn't work with SMP
Vagrant::Config.run do |config|
%w{20130425 20130429 20130502 20130506}.each do |date|
config.vm.define "ubuntu-#{date}" do |vm|
vm.vm.box = "ubuntu-#{date}"
vm.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/precise/#{date}/precise-server-cloudimg-amd64-vagrant-disk1.box"
vm.vm.customize ["modifyvm", :id, "--cpus", 4]
vm.vm.host_name = "ubuntu-#{date}"
end
end
config.vm.define "ubuntu-vagrant" do |vm|
vm.vm.box = "ubuntu-vagrant"
vm.vm.box_url = "http://files.vagrantup.com/precise64.box"
vm.vm.customize ["modifyvm", :id, "--cpus", 4]
vm.vm.host_name = "ubuntu-vagrant"
end
end
@omribahumi
Copy link
Author

Fire this baby up with

vagrant up

And watch the output of

vagrant status | awk '$2 == "running" { print $1 }' | while read machine; do echo $machine `vagrant ssh $machine -c "grep processor /proc/cpuinfo | wc -l"`; done

It'll look something like:

ubuntu-20130425 1
ubuntu-20130429 1
ubuntu-20130502 1
ubuntu-20130506 1
ubuntu-vagrant 4

Funky, huh?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment