Having trouble creating a Vagrantfile that will automatically select an
available provider / box pair. Here is my Vagrantfile so far:
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.require_version ">= 1.6.2"
Vagrant.configure("2") do |config|
config.vm.box = "windows_81"
config.vm.communicator = "winrm"
config.vm.guest = :windows
config.vm.network :forwarded_port, guest: 3389, host: 3389, id: "rdp",
auto_correct: true
config.vm.network :forwarded_port, guest: 5985, host: 5985, id:
"winrm", auto_correct: true
config.vm.provider "vmware_fusion" do |v, override|
v.vmx["memsize"] = "2048"
v.vmx["numvcpus"] = "2"
v.vmx["ethernet0.virtualDev"] = "vmxnet3"
v.vmx["scsi0.virtualDev"] = "lsisas1068"
end
config.vm.provider "vmware_workstation" do |v, override|
v.vmx["memsize"] = "2048"
v.vmx["numvcpus"] = "2"
v.vmx["ethernet0.virtualDev"] = "vmxnet3"
v.vmx["scsi0.virtualDev"] = "lsisas1068"
end
config.vm.provider "virtualbox" do |v, override|
v.customize ["modifyvm", :id, "--memory", 2048]
v.customize ["modifyvm", :id, "--cpus", 2]
v.customize ["setextradata", "global", "GUI/SuppressMessages",
"all" ]
end
end
I have both Virtualbox and VMWare Fusion (with the VMWare Fusion Vagrant
plugin, of course) installed on this system. If the VMWare Fusion box is
installed, no problem - the Vagrantfile fires up right away - however, if I
only install a Virtualbox box with the name "windows_81" I have to specify
the provider in vagrant up or else I get an error.
This isn't a big deal, but from what I understand Vagrant should be able to
navigate this scenario automatically - which leads me to believe that my
Vagrantfile is written incorrectly. This Vagrantfile is mostly cannibalized
from other projects, I am not super comfortable with writing my own
Vagrantfiles yet.
Any help would be appreciated! The last piece of this is I am running
Vagrant 1.7.2 due to an issue I'm having with 1.7.4 (which I will log an
issue in Github for as soon as I get a moment).
--
This mailing list is governed under the HashiCorp Community Guidelines -
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of
those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vagrant-up/c874fa31-8f64-4666-8106-0999d8e4434a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.