From dbf419abadda2a7b22bb9bbfb4016712aea56225 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 23 Nov 2015 10:15:01 -0800 Subject: [PATCH] providers/virtualbox: ignore unknown status interfaces [GH-6061] --- CHANGELOG.md | 1 + plugins/providers/virtualbox/action/network.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c677eeef1..9967a3bd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -101,6 +101,7 @@ BUG FIXES: - guests/suse: DHCP network interfaces properly configured [GH-6502] - hosts/slackware: Better detection of NFS [GH-6367] - providers/hyper-v: support generation 2 VMs [GH-6372] + - providers/virtualbox: ignore "Unknown" status bridge interfaces [GH-6061] - provisioners/ansible: use quotes for the `ansible_ssh_private_key_file` value in the generated inventory [GH-6209] - provisioners/ansible: don't show the `ansible-playbook` command when verbose diff --git a/plugins/providers/virtualbox/action/network.rb b/plugins/providers/virtualbox/action/network.rb index a09494219..be15c1c47 100644 --- a/plugins/providers/virtualbox/action/network.rb +++ b/plugins/providers/virtualbox/action/network.rb @@ -148,7 +148,7 @@ module VagrantPlugins def bridged_adapter(config) # Find the bridged interfaces that are available bridgedifs = @env[:machine].provider.driver.read_bridged_interfaces - bridgedifs.delete_if { |interface| interface[:status] == "Down" } + bridgedifs.delete_if { |interface| interface[:status] == "Down" || interface[:status] == "Unknown" } # The name of the chosen bridge interface will be assigned to this # variable.