set :trust_guest_rx_filters => true in the network definition to enable
trustGuestRxFilters for the public interface.
Details from http://www.libvirt.org/formatdomain.html#elementsNICSDirect:
"If the model type is set to virtio and interface's trustGuestRxFilters
attribute is set to yes, changes made to the interface mac address,
unicast/multicast receive filters, and vlan settings in the guest will
be monitored and propagated to the associated macvtap device on the host
(Since 1.2.10). If trustGuestRxFilters is not set, or is not supported
for the device model in use, an attempted change to the mac address
originating from the guest side will result in a non-working network
connection."
closes#650
To simulate shared SAN storage an additional libvirt
disk property needs to be set which disables caching.
Also updated the documentation to document this new
property and added an example on how to simulate
shared SAN storage
Closes#648
libvirt has supported specification of a guest NUMA topology since
0.9.8. This functionality can be used for basic validation of some
NUMA-dependent features during development. Add basic configuration
support, by allowing the user to specify how many NUMA nodes the
instance may have.
The following options are added:
* numa_nodes - Defaults to none
For additional information on specifying NUMA nodes with Libvirt, see:
* https://libvirt.org/formatdomain.html#elementsCPU
* Wrap to 80 characters
* Use 'Vagrant', not 'vagrant', where appropriate
* Format code as such
* Mark up code type where possible (shell, ruby, etc.)
* Don't use code fences inline
* Misc other changes
This allows for specific CPU selection and enforcement when cpu_mode =
custom, which is important when emulating CPUs of different architecture
than the host.
i tried to install on a fresh ubuntu 14.04, installation did not work unless adding ruby-dev. it failed with error below:
```bash
# vagrant plugin install vagrant-libvirt
Installing the 'vagrant-libvirt' plugin. This can take a few minutes...
/usr/lib/ruby/1.9.1/rubygems/installer.rb:562:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:4:in `<main>'
Gem files will remain installed in /root/.vagrant.d/gems/gems/nokogiri-1.6.7.2 for inspection.
Results logged to /root/.vagrant.d/gems/gems/nokogiri-1.6.7.2/ext/nokogiri/gem_make.out
from /usr/lib/ruby/1.9.1/rubygems/installer.rb:540:in `block in build_extensions'
from /usr/lib/ruby/1.9.1/rubygems/installer.rb:515:in `each'
from /usr/lib/ruby/1.9.1/rubygems/installer.rb:515:in `build_extensions'
from /usr/lib/ruby/1.9.1/rubygems/installer.rb:180:in `install'
from /usr/lib/ruby/1.9.1/rubygems/dependency_installer.rb:297:in `block in install'
from /usr/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `each'
from /usr/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `each_with_index'
from /usr/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `install'
from /usr/share/vagrant/plugins/commands/plugin/action/install_gem.rb:65:in `block in call'
from /usr/share/vagrant/plugins/commands/plugin/gem_helper.rb:42:in `block in with_environment'
from /usr/lib/ruby/1.9.1/rubygems/user_interaction.rb:40:in `use_ui'
from /usr/share/vagrant/plugins/commands/plugin/gem_helper.rb:41:in `with_environment'
from /usr/share/vagrant/plugins/commands/plugin/action/install_gem.rb:52:in `call'
from /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:34:in `call'
from /usr/share/vagrant/plugins/commands/plugin/action/bundler_check.rb:20:in `call'
from /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:34:in `call'
from /usr/lib/ruby/vendor_ruby/vagrant/action/builder.rb:116:in `call'
from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:69:in `block in run'
from /usr/lib/ruby/vendor_ruby/vagrant/util/busy.rb:19:in `busy'
from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:69:in `run'
from /usr/share/vagrant/plugins/commands/plugin/command/base.rb:17:in `action'
from /usr/share/vagrant/plugins/commands/plugin/command/install.rb:27:in `execute'
from /usr/share/vagrant/plugins/commands/plugin/command/root.rb:56:in `execute'
from /usr/lib/ruby/vendor_ruby/vagrant/cli.rb:38:in `execute'
from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:484:in `cli'
from /usr/bin/vagrant:127:in `<main>'
```
Before this change, vagrant-libvirt assumed that all
port forwards should be done on eth0 adapter. Now
user can provide a custom adapter via "adapter" option
when calling forwarded_port.
Added TPM device support to include switching out the TPM device on
reboot if necessary.
The following options were added:
* tpm_model - Defaults to 'tpm-tis'
* tpm_type - Defaults to 'passthrough'
* tpm_path - Must be specified, other options are ignored if this is
not specified. Most users will set this to /dev/tpm0.
For additional information on using a TPM with Libvirt see the following:
* http://wiki.qemu.org/Features/TPM
* https://libvirt.org/formatdomain.html#elementsTpm
Background
----------
The default private_network template we supply has the following tag:
<network ipv6='yes'>
This enables ipv6 on guest interfaces for guest-to-guest communication.
This causes a problem on hosts that either do not have ipv6 enabled or
configured correctly, resulting in an error on 'vagrant up' as follows:
Error while activating network: Call to virNetworkCreate failed: internal error: Failed to apply firewall rules /usr/sbin/ip6tables --table filter --insert FORWARD --in-interface virbr1 --jump REJECT: ip6tables v1.4.21: can't initialize ip6tables table `filter': Address family not supported by protocol
Perhaps ip6tables or your kernel needs to be upgraded.
Reading here:
http://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=705e67d40b09a905cd6a4b8b418d5cb94eaa95a8
would suggest the above option should really be off by default, however,
I don't want to break existing behaviour or setups. This patch adds two
new config items, one for the default management network, and one for
additional user defined private networks.
Usage
-----
To disable ipv6 for the managment network:
config.vm.provider :libvirt do |libvirt|
libvirt.management_network_guest_ipv6 = "no"
end
To disable for a custom private network:
config.vm.network "private_network", ip: "192.168.33.10", libvirt__guest_ipv6: "no"
Extra Notes:
------------
Also note, if you get hit by the above error and want to apply the above
fix, you will need to clear out the management network manually:
$ sudo virsh net-list --all
Name State Autostart Persistent
----------------------------------------------------------
default active yes yes
vagrant-libvirt inactive no yes
$ sudo virsh net-undefine vagrant-libvirt
Network vagrant-libvirt has been undefined
* Fixed regression when using additional disks. Now disk_bus setting
applies only to main disk.
* Added ability to change additional disk bus on reload. Updated readme.
Task-Url: https://github.com/pradels/vagrant-libvirt/issues/418
Signed-off-by: Max Kutsevol <max@coolvds.com>