Vagrantfile with multiple providers (virtualbox, vmware_workstation) only uses virtualbox on "vagrant up"

136 visningar
Hoppa till det första olästa meddelandet

Jeffrey Cocozziello

oläst,
11 aug. 2017 09:20:132017-08-11
till Vagrant
Hello,

I am attempting to utilize a Vagrantfile with two providers (vmware_workstation, virtualbox), but when I issue "vagrant up" it tries to bring up both boxes using virtualbox. If I use "vagrant up <machine_name>" on each box individually, it will use the correct provider for each box. This is my Vagrantfile:

#*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.define "robot_test_engine" do |robot_test_engine_9070|
    robot_test_engine_9070.ssh.username = "administrator"
    robot_test_engine_9070.ssh.password = ******
    robot_test_engine_9070.vm.box = "/TRM_DATA/vagrant/jeff_vmware_test/packer_virtualbox-ovf_virtualbox.box"
    config.vm.provider "virtualbox" do |vb|
        vb.customize ["modifyvm", :id, "--vrdeport", "9077"]
    end
end
config.vm.define "robot_test_engine_2" do |robot_test_engine_9071|
    robot_test_engine_9071.ssh.username = "administrator"
    robot_test_engine_9071.ssh.password = *******
    robot_test_engine_9071.vm.box = "/TRM_DATA/vagrant/jeff_vmware_test/packer_vmware-vmx_vmware.box"
    config.vm.provider "vmware_workstation" do |vw|
    end
end
end

Did I do something incorrectly in the Vagrantfile? Is a simple "vagrant up" usable when trying to configure for multiple providers?

Any help is appreciated!

Thanks,
Jeff
Svara alla
Svara författaren
Vidarebefordra
0 nya meddelanden