diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/files/box/Vagrantfile b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/files/box/Vagrantfile index 50fe4487d9..055355aefa 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/files/box/Vagrantfile +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/files/box/Vagrantfile @@ -1,11 +1,25 @@ -if Vagrant::VERSION < "1.2.3" - raise "Need at least vagrant version 1.2.3, please update" +# -*- mode: ruby -*- +# # vi: set ft=ruby : + +if Vagrant::VERSION < "1.5.0" + raise "Need at least vagrant version 1.5.0, please update" end +require_relative 'override-plugin.rb' + Vagrant.configure("2") do |config| # SSH in as the default 'core' user, it has the vagrant ssh key. config.ssh.username = "core" # Disable the base shared folder, guest additions are unavailable. config.vm.synced_folder ".", "/vagrant", disabled: true + + config.vm.provider :virtualbox do |vb| + # Guest Additions are unavailable. + vb.check_guest_additions = false + + # Fix docker not being able to resolve private registry in VirtualBox + vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] + vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"] + end end diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/files/box/override-plugin.rb b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/files/box/override-plugin.rb new file mode 100644 index 0000000000..eb0bc99589 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/files/box/override-plugin.rb @@ -0,0 +1,117 @@ +# -*- mode: ruby -*- +# # vi: set ft=ruby : + +# NOTE: This monkey-patching of the coreos guest plugin is a terrible +# hack that needs to be removed once the upstream plugin works with +# alpha CoreOS images. + +require 'tempfile' +require 'ipaddr' +require Vagrant.source_root.join("plugins/guests/coreos/cap/configure_networks.rb") + +BASE_CLOUD_CONFIG = <