diff --git a/CHANGELOG.md b/CHANGELOG.md index b3bb827d5..baf0e8998 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,8 @@ FEATURES: IMPROVEMENTS: - commands/ssh-config: Works without a target in multi-machine envs [GH-2844] + - guests/freebsd: Added `config.freebsd.device` setting to set the network + device prefix, defaults to "em". [GH-2956] PLUGIN AUTHOR CHANGES: diff --git a/plugins/guests/freebsd/config.rb b/plugins/guests/freebsd/config.rb index a1bf9b09e..7830fa0e7 100644 --- a/plugins/guests/freebsd/config.rb +++ b/plugins/guests/freebsd/config.rb @@ -1,11 +1,20 @@ module VagrantPlugins module GuestFreeBSD class Config < Vagrant.plugin("2", :config) + # The device prefix for network devices created by Vagrant. + # This defaults to "em" but can be set for example to "vtnet" + # for virtio devices and so on. + # + # @return [String] attr_accessor :device def initialize - @device = "em" + @device = UNSET_VALUE + end + + def finalize! + @device = "em" if @device == UNSET_VALUE end end end -end \ No newline at end of file +end