Commit Graph

816 Commits

Author SHA1 Message Date
Dmitry Vasilets
6a4563b807 Merge pull request #542 from nihilifer/port_forwarding_custom_adapter
Allow to forward ports from a custom adapter
2016-01-12 10:41:12 +01:00
Michal Rostecki
b4a66bb43f Allow to forward ports from a custom adapter
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.
2016-01-12 10:37:48 +01:00
Dmitry Vasilets
e7b15038a4 Merge pull request #537 from trevor-vaughan/tpm-device-support
Added TPM Device support
2016-01-06 18:53:18 +01:00
Trevor Vaughan
ecb1339312 Added TPM Device support
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
2016-01-06 09:48:20 -05:00
Dmitry Vasilets
9d331d2ed6 Merge pull request #531 from Flowm/winmac
Fix network interface configuration for windows guests
2015-12-30 00:48:01 +01:00
Florian Mauracher
ca6c012f57 Fix network interface configuration for windows guests
Change the return format of the nic_mac_addresses capability to comply
with the format expected by Vagrant:
    # Vagrant expects a hash with an index starting at 1 as key
    # and the mac as uppercase string without colons as value

This fixes the configuration of additional network interfaces for
Windows guests. Other guests don't require the mac address of a
interface to configure it, thus this only affected windows guests.
2015-12-29 23:32:11 +01:00
Dmitry Vasilets
bc81274f6e Merge pull request #528 from darkengine-io/kvm-hidden
Allow KVM hiding with the kvm_hidden attr
2015-12-17 14:01:09 +01:00
Simon McFarlane
f37616b6fe Add kvm_hidden option to README 2015-12-16 14:22:44 -08:00
Simon McFarlane
a478c3a81d Allow KVM hiding with the kvm_hidden attr 2015-12-16 14:22:37 -08:00
Dmitry Vasilets
3e0c3ae4d8 Merge pull request #526 from lwh/525-fix
Added machine memory string to integer conversion
2015-12-14 13:04:20 +01:00
Luke Hollins
96ebe9662f Added machine memory string to integer conversion 2015-12-14 07:02:01 -05:00
Dmitry Vasilets
4c98ab6ec4 Merge pull request #521 from skamithi/add_doc_for_specif_iface_name
add doc for libvirt__iface_name feature
2015-12-07 19:00:09 +01:00
stanley karunditu
66753d7a61 add doc for libvirt__iface_name feature 2015-12-07 12:50:33 -05:00
Dmitry Vasilets
504c867273 Merge pull request #515 from fxkr/usb-support
Add support for USB passthrough
2015-11-25 08:46:10 +01:00
Dmitry Vasilets
5982af3cb0 Merge pull request #516 from pradels/revert-514-fix-set-pcis-if-unset
Revert "Bugfix: Config.finalize!: set @pcis if UNSET_VALUE"
2015-11-25 08:46:04 +01:00
Dmitry Vasilets
0ada9cadc0 Revert "Bugfix: Config.finalize!: set @pcis if UNSET_VALUE" 2015-11-25 08:45:54 +01:00
Dmitry Vasilets
db1f035061 Merge pull request #513 from fxkr/readme-pci-passthrough
README: Fix example on PCI passthrough
2015-11-25 08:45:11 +01:00
Dmitry Vasilets
1c372ddaf9 Merge pull request #514 from fxkr/fix-set-pcis-if-unset
Bugfix: Config.finalize!: set @pcis if UNSET_VALUE
2015-11-25 08:43:27 +01:00
Felix Kaiser
c3652c9057 Bugfix: Config.finalize!: set @pcis if UNSET_VALUE 2015-11-25 00:50:24 +01:00
Felix Kaiser
bfea80d789 Add support for USB passthrough 2015-11-25 00:46:55 +01:00
Felix Kaiser
d5e340e9db README: Fix example on PCI passthrough
Was apparently copy/pasted from Input section.
2015-11-25 00:03:11 +01:00
Dmitry Vasilets
21f6ddd5ca Merge pull request #507 from mattiaslundberg/typo
Fix typo in readme.
2015-11-14 11:11:32 +01:00
Mattias Lundberg
11441f8a1d
Fix typo in readme. 2015-11-14 10:49:27 +01:00
Dmitry Vasilets
1bb8fff485 Merge pull request #505 from brk3/master
Allow disabling guest-to-guest ipv6 comms in libvirt networks
2015-11-09 20:53:37 +01:00
Paul Bourke
9869213a4f Allow disabling guest-to-guest ipv6 comms in libvirt networks
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
2015-11-09 17:45:10 +00:00
Dmitry Vasilets
e9ce3096f3 Merge pull request #502 from svigneux/patch-1
Allow dots in domain_name
2015-11-08 09:32:48 +01:00
Simon Vigneux
70e0f4e6c7 Allow dots in domain_name
As we are sometimes using FQDNs as box names, it would be nice to keep the dots. 
I tested this minor change on version 0.0.32 and it creates domain/disk correctly. 

If you need me to do anything else, just let me know. Thanks
2015-11-06 12:23:16 -05:00
Dmitry Vasilets
883db81df5 Merge pull request #498 from jtoppins/named-interfaces
interfaces: allow user to specify an interface name
2015-11-03 09:49:20 +01:00
Dmitry Vasilets
f62a199998 Merge pull request #501 from mandre/fix-wrong-interpolation-argument
Fix wrong interpolation argument
2015-11-03 09:43:41 +01:00
Martin André
30600f4ac3 Fix wrong interpolation argument
This caused an ugly stacktrace when the requested virtual size is
smaller than the actual image size.
2015-11-01 21:53:06 +09:00
Dmitry Vasilets
2bc60c5196 Merge pull request #500 from bcambl/readme_updates
network interface definition example indentation
2015-11-01 00:26:02 +01:00
bcambl
b48d0b3e5b network interface definition example indentation
Match indentation for consistency with all other code examples
2015-10-31 17:14:14 -06:00
Jonathan Toppins
c197d0f11c interfaces: allow user to specify an interface name
Allow the user to specify what the domif name will be for an interface
by defining a name in the Vagrantfile. This allows one to later build link
toggling from within vagrant or easily toggle the link using virsh. An
example using virsh.

By default the name of tunnel interfaces will be "tnet" + interface
number.

Given a Vagrantfile snippet:
    node.vm.network :private_network,
          :libvirt__tunnel_type => 'udp',
          :libvirt__tunnel_port => 8001,
          :libvirt__tunnel_local_port =>  8002,
          :libvirt__iface_name => 'test1'

Generates named domain interface called 'test1':
    $ virsh -c qemu:///system  domiflist vagrant_default
    Interface  Type       Source     Model       MAC
    -------------------------------------------------------
    vnet0      network    vagrant-libvirt virtio      52:54:00:2f:c1:82
    vnet1      network    switch_mgmt virtio      12:11:22:33:44:11
    test1      udp        -          virtio      52:54:00:7d:8a:2a
    tnet3      udp        -          virtio      52:54:00:ec:39:12

To toggle the interface link status one can do the following, toggle
the link up:
    $ virsh -c qemu:///system domif-setlink vagrant_default test1 up
    $ vagrant ssh -- sudo ip link set eth2 up
    $ vagrant ssh -- ip link show eth2
    4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
    state UP mode DEFAULT group default qlen 1000
        link/ether 52:54:00:7d:8a:2a brd ff:ff:ff:ff:ff:ff

Toggle the link down:
    $ virsh -c qemu:///system domif-setlink vagrant_default test1 down
    $ vagrant ssh -- sudo ip link set eth2 up
    $ vagrant ssh -- ip link show eth2
    4: eth2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast
    state DOWN mode DEFAULT group default qlen 1000
        link/ether 52:54:00:7d:8a:2a brd ff:ff:ff:ff:ff:ff

Signed-off-by: Jonathan Toppins <jtoppins@cumulusnetworks.com>
2015-10-30 14:45:52 -04:00
Dmitry Vasilets
5ed8a2a4f2 Merge pull request #491 from giacomolozito/9p_nomount
Option to disable p9 automounting at boot
2015-10-26 14:06:18 +01:00
Giacomo Lozito
bd112300c5 Add info for 9p mount: option in README 2015-10-25 19:20:30 +00:00
Dmitry Vasilets
3bac45efb6 Merge pull request #490 from petRUShka/add_pcis
Add PCI device passthrough functionality
2015-10-25 19:58:24 +01:00
Giacomo Lozito
b3fd0c36f0 Provide a mount: option to disable automount for p9 synced folders 2015-10-25 18:22:59 +00:00
Giacomo Lozito
79e08cf2d9 Do not mount folders with an empty guest path 2015-10-25 18:21:28 +00:00
Dmitry Vasilets
d1a0d80cd7 Merge pull request #489 from petRUShka/readme_development
README: Rakefile no longer provide test run. Switch to rspec
2015-10-23 10:46:18 +02:00
Maxim Petrunin
be30311e5f Fix README.md, PCI section 2015-10-23 11:19:13 +03:00
Maxim Petrunin
b2684d310f Add PCI device passthrough functionality 2015-10-23 11:12:57 +03:00
Maxim Petrunin
f9827479c6 README: Rakefile no longer provide test run. Switch to rspec 2015-10-22 08:43:06 +03:00
Dmitry Vasilets
71e82ca8e5 Merge pull request #488 from raghavendra-talur/empty-default-prefix
Allow empty prefix for domain names
2015-10-19 09:17:26 +02:00
raghavendra talur
97dd1f20f2 Allow empty prefix for domain names
Allows one to set a empty prefix for domain names
and it would create domain with the same name as set by define
method in the Vagrantfile.

Signed-off-by: raghavendra talur <raghavendra.talur@gmail.com>
2015-10-19 12:28:32 +05:30
Dmitry Vasilets
1ad103181e Merge pull request #487 from devopsjedi/master
Update forward_ports.rb to fix spaces in private key path
2015-10-18 23:36:44 +02:00
devopsjedi
9b7f5b2cc1 Update forward_ports.rb to fix spaces in private key path
When the path to the Vagrant environment contains spaces, the IdentityFile argument to SSH does not get parsed correctly.  The result is that the command fails and no ports are forwarded to the host.  Log Output: command-line line 0: garbage at end of line;

This update places a double quote around the private key path with another pair of single quotes outside of it.  With single or double quotes alone, the command fails.  Combining the double quotes embedded in single quotes results in SSH parsing the argument correctly and the ports are forwarded properly.
2015-10-18 15:34:30 -04:00
Dmitry Vasilets
686a42446d typo 2015-10-10 09:45:43 +02:00
Dmitry Vasilets
0d1c572218 Merge pull request #482 from bcambl/fix_indent
Fix indentation from commit 2525be90
2015-10-10 09:43:00 +02:00
bcambl
e75ea34b93 Fix indentation from commit 2525be90 2015-10-09 18:32:47 -06:00
Dmitry Vasilets
5d2e3099ab Merge pull request #481 from jcsmith/master
Add 1GB to the size of virtual disk as defined in metadata.json.
2015-10-09 22:15:18 +02:00