Commit Graph

707 Commits

Author SHA1 Message Date
Gerben Meijer
0016f34851 Support graphics_type = none
Devices which do not support any default vga device (e.g. ARM boards)
can't be started when a video device is present. Libvirt automatically
adds a <video> device whenever a <graphics> element is defined.

Using 'none' was already documented as supported but did not work.
2016-03-17 03:19:50 +01:00
Gerben Meijer
dc1a8d421f Add device tree binary image support
This is required for correct emulation of ARM devices
2016-03-14 16:03:32 +01:00
Gerben Meijer
98f2eaed5e Add cpu_model and cpu_fallback.
This allows for specific CPU selection and enforcement when cpu_mode =
custom, which is important when emulating CPUs of different architecture
than the host.
2016-03-14 16:03:27 +01:00
Dmitry Vasilets
a963ff4c70 Merge pull request #573 from alirizakeles/patch-1
ruby-dev package into missing libraries
2016-03-10 08:26:06 +01:00
Dmitry Vasilets
c458a5fc90 Merge pull request #558 from fred-a-kemp/feature/emulator_path
Make it possible to set the path to the device model emulator.
2016-03-10 08:25:43 +01:00
anonym
59ab65523a Fixup on emulator_path configuration.
Thanks to Gerben Meijer for the fix!
2016-03-10 03:19:24 +01:00
Ali Riza Keles
98461f4655 ruby-dev package into missing libraries
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>'
```
2016-03-09 17:50:40 +02:00
Dmitry Vasilets
a4427a0d31 Merge pull request #571 from jim-minter/uniq-ip-addresses-patch
don't barf if VM has multiple identical IP addresses
2016-03-07 17:11:45 +01:00
Jim Minter
b6fa93e643 simplify as preferred 2016-03-07 14:19:03 +00:00
Jim Minter
2fc38f6067 don't barf if VM has multiple identical IP addresses 2016-03-07 13:57:50 +00:00
Dmitry Vasilets
0c79eaf6d5 Merge pull request #570 from Fodoj/master
Fix handling missing boxes
2016-03-06 19:30:31 +01:00
Kirill Shirinkin
9ca19cbf29 Fix handling missing box.img 2016-03-06 19:14:14 +01:00
Dmitry Vasilets
eda79bfe45 Merge pull request #569 from Fodoj/master
Fix fog-libvirt version
2016-03-06 17:04:14 +01:00
Kirill Shirinkin
7f3f61f215 Fix fog-libvirt version 2016-03-06 16:57:28 +01:00
Dmitry Vasilets
2187b004c1 Merge pull request #566 from electrofelix/more-spec-tests
Add success tests for WaitTillUp and rename as unit tests
2016-03-01 07:46:39 +01:00
Gerben Meijer
76d58027c6 Merge pull request #567 from lpenz/machine_type
Fix "machine_type" documentation - was "machine" in README.md
2016-03-01 00:42:49 +00:00
Leandro Lisboa Penz
404f53db95 Fix "machine_type" documentation - was "machine" in README.md 2016-02-29 21:34:19 -03:00
Darragh Bailey
e21465771d Add additional debug info for mac searching
Reporting the MAC address being looked for in the ARP table should help
determine why some machines pick up an address belonging to another
when starting multiple VM's in parallel.
2016-02-26 11:33:05 +00:00
Darragh Bailey
c5266a4a25 Use domain double instead of machine 2016-02-26 11:33:05 +00:00
Darragh Bailey
c5c15361da Use unit name instead of library to describe tests
To distinguish between future addition of acceptance tests, rename the
existing to tests to match their type as 'unit' tests in line with
other uses of vagrant-spec.
2016-02-26 11:33:05 +00:00
Darragh Bailey
e71203a078 Add test to cover success 2016-02-26 11:33:05 +00:00
Dmitry Vasilets
7e8dcb241b Merge pull request #564 from LalatenduMohanty/using-upstream-boxs
Adding community supported versions of CentOS and Fedora boxes
2016-02-23 18:19:02 +01:00
Lalatendu Mohanty
931a5e6be4 Adding community supported versions of CentOS and Fedora boxes
https://atlas.hashicorp.com/fedora
https://atlas.hashicorp.com/centos

Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
2016-02-23 20:12:52 +05:30
anonym
586881aedd Document the emulator_path option. 2016-02-17 23:24:07 +01:00
anonym
19eb62a93b Make it possible to set the path to the device model emulator.
On some systems (e.g. Debian) omitting this setting results in the
following error:

    Error while creating domain: Error saving the server: Call to
    virDomainDefineXML failed: invalid argument: could not find
    capabilities for domaintype=kvm

Which has been reported as:

    https://github.com/pradels/vagrant-libvirt/issues/539
2016-02-17 22:34:01 +01:00
Dmitry Vasilets
ea3491b3d1 Merge pull request #555 from infernix/autostart
Support libvirt autostart functionality
2016-02-12 20:53:23 +01:00
Gerben Meijer
73f5b7aba4 Support libvirt autostart functionality 2016-02-12 20:28:39 +01:00
Dmitry Vasilets
c6d5c1a3a6 Merge pull request #554 from infernix/cpu-features
Enable CPU features support
2016-02-11 15:12:31 +01:00
Gerben Meijer
4554ceb6f0 Update README on CPU features 2016-02-11 14:56:08 +01:00
Gerben Meijer
c3f1e88066 Fix typo in policy option check 2016-02-11 14:40:28 +01:00
Guto Andreollo
0be1fc017a Added basic support for CPU features
The following option was added:

* cpu_feature - Defaults to unset, needs two options: "name" and "policy", as interpreted by libvirt

This only adds support for creating a VM with specific CPU features defined, not for changing them after the VM was created
2016-02-11 14:35:01 +01:00
Dmitry Vasilets
3fcc960bd8 Merge pull request #552 from petRUShka/fix_pci_readme
Fix [REAMDE] missing `:` in PCI device passthrough examples
2016-02-07 15:05:06 +01:00
petRUShka
7b156cc34d Fix [REAMDE] missing in PCI device passthrough examples 2016-02-05 12:36:40 +03:00
Dmitry Vasilets
6652f25af3 Merge pull request #551 from electrofelix/respect-destroy-on-error
Respect destroy on error
2016-01-30 13:51:36 +01:00
Dmitry Vasilets
c914abcb3b Merge pull request #550 from electrofelix/add-travis-ci-badge
Add Travis CI badge
2016-01-30 13:40:03 +01:00
Darragh Bailey
026c6a7395 Add Travis CI badge 2016-01-28 10:51:26 +00:00
Darragh Bailey
1ecab7a9e9 Support --no-destroy-on-error option
Vagrant supports a --no-destroy-on-error option to up to skip destroying
of the machine if there was an error on bringing it up. This can be
useful where an environment can trigger a bug which would normally
result in the domain being torn down preventing additional analysis.

Make sure to simply exit the loops by returning terminate, instead of
looking to execute the remaining retries.

Add spec tests to check that terminate does not call the runner to
remove the domain if the user has disabled destroy on error.

Define a missing constant for vagrant < 1.6 exposed by the added tests.
2016-01-27 18:21:25 +00:00
Darragh Bailey
dde1b9bd43 Raise correct exception on domain not found
Update spec to check the actually exception raised and fix the code to
raise the correct one instead of throwing constant not defined.
2016-01-27 18:21:25 +00:00
Darragh Bailey
afb53addb1 Add rudimentary spec test to WaitTillUp using vagrant-spec
Add some basic spec tests for the WaitTillUp action class to lay some
foundations. Utilize vagrant-spec pinned to a known working commit for
tests to pass consistently until they provide releases.

Requires updating some of the rspec libraries and includes
sharedcontext.rb from the jantman/vagrant-r10k project on github.
2016-01-27 18:21:25 +00:00
Dmitry Vasilets
3a6acf4288 Merge pull request #546 from electrofelix/fix-tests
Pin rubygems version for travis builds
2016-01-27 14:09:17 +01:00
Darragh Bailey
c8f6c49a3a Pin rubygems version for travis builds 2016-01-26 12:13:51 +00:00
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