I have two machines (linux, Mac) and need to use vagrant to manage the vm. VirtualBox is used in the Liux while parallels is used in Mac. so I configured these two providers in the vagrant config file as below:
Vagrant.configure('2') do |config|
config.ssh.forward_agent = true
config.ssh.password = 'crunch'
config.vm.box = 'ubuntu/xenial64'
config.vm.provider 'virtualbox' do |vb|
vb.gui = true
vb.memory = '8192'
vb.name = 'ubuntu'
end
config.vm.provider 'parallels' do |vb|
vb.gui = true
vb.memory = '8192'
vb.name = 'ubuntu'
config.vm.box = 'parallels/ubuntu-14.04'
end
on my mac system, when I run below command but got an error:
$ vagrant up --provider parallels
An active machine was found with a different provider. Vagrant
currently allows each machine to be brought up with only a single
provider at a time. A future version will remove this limitation.
Until then, please destroy the existing machine to up with a new
provider.
Machine name: default
Active provider: virtualbox
Requested provider: parallels
I have installed the required providers:
$ vagrant plugin list
docker (0.4.0)
vagrant-parallels (1.7.8)
vagrant-share (1.1.9, system)
vagrant-vbguest (0.15.0)
so why vagrant
doesn't pick up the --provider
parameter?