mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Added defaults for :dev and :mode. Updated documentation to explain these options.
This commit is contained in:
parent
8933842517
commit
151f212d50
@ -216,6 +216,12 @@ starts with 'libvirt__' string. Here is a list of those options:
|
||||
be forwarded (NATed or routed). Used only when creating new network. By
|
||||
default, all physical interfaces are used.
|
||||
|
||||
### Public Network Options
|
||||
* `:dev` - Physical device that the public interface should use. Default is 'eth0'
|
||||
* `:mode` - The mode in which the public interface should operate in. Supported
|
||||
modes are available from the [libvirt documentation](http://www.libvirt.org/formatdomain.html#elementsNICSDirect).
|
||||
Default mode is 'bridge'.
|
||||
|
||||
## Obtaining Domain IP Address
|
||||
|
||||
Libvirt doesn't provide standard way how to find out an IP address of running
|
||||
|
@ -70,8 +70,9 @@ module VagrantPlugins
|
||||
# Configuration for public interfaces which use the macvtap driver
|
||||
if iface_configuration[:iface_type] == :public_network
|
||||
template_name = 'public_interface'
|
||||
@device = iface_configuration[:dev]
|
||||
@mode = iface_configuration[:mode]
|
||||
@device = iface_configuration.fetch(:dev, 'eth0')
|
||||
@mode = iface_configuration.fetch(:mode, 'bridge')
|
||||
@logger.info("Setting up public interface using device #{@device} in mode #{@mode}")
|
||||
end
|
||||
|
||||
message = "Creating network interface eth#{@iface_number}"
|
||||
|
Loading…
Reference in New Issue
Block a user