Commit Graph

699 Commits

Author SHA1 Message Date
Hugo Stijns
6d0468d3e4 Check for box updates when starting 2018-01-12 12:18:53 +01:00
Dmitry Vasilets
6fdbf4b818 Merge pull request #827 from petracvv/memoryBacking
Add memory backing configuration
2017-12-11 17:04:47 +01:00
Christian
9deac08775 Convert mtu to integer
This will obviously raise an exception if the data is not
convertable. Seems to be the best option, since to_i converts
'non-integer' strings to zero, which would lead to unpredicable
behaviour.
2017-12-09 11:36:52 +01:00
Christian
a97a6d2347 Add mtu option for private networks and interfaces
In order to create virtual networks with different MTU sizes
than the libvirt default of 1500, this patch adds a
libvirt__mtu option. This will add an mtu option to the libvirt
network definition and to the domain interface definition as well.
2017-12-08 12:42:06 +01:00
Gerben Meijer
0af2568475 Merge pull request #838 from ableischwitz/master
Fix for #831
2017-11-29 11:44:32 +01:00
Andreas Bleischwitz
a64c538f7f made <source>...</source> and it's sub-elements conditional 2017-11-28 18:22:40 +01:00
Gerben Meijer
57db358a58 Merge pull request #833 from hugoboos/domain-name
Add network domain name feature
2017-11-28 10:51:38 +01:00
Gerben Meijer
5efc0b2b38 Merge pull request #824 from skamithi/vagrant_guest_halt_capability
add Vagrant Guest Halt capability to vagrant-libvirt
2017-11-26 07:37:50 +01:00
Hugo Stijns
f59a99c684 Possible to define domain name for networks 2017-11-24 15:52:49 +01:00
Gerben Meijer
05771432df Merge pull request #794 from heil/master
Use dynamic vnc port allocation
2017-11-23 12:45:59 +01:00
Gerben Meijer
e55c927728 Merge pull request #814 from ntff/20170914_issue796
update to the recent changes of default behavior in netcat.openbsd (fixes #796)
2017-11-23 12:43:16 +01:00
Gerben Meijer
0c46bcd182 Merge pull request #815 from dmeloni-radarservices/ssh-terminate
Use exec to avoid leaving ssh lingering around
2017-11-23 12:42:38 +01:00
Gerben Meijer
0254c18153 Merge pull request #822 from Flowm/ask-before-destroy
Ask for confirmation before destroying vms
2017-11-23 12:38:21 +01:00
Hugo Stijns
b00816680a Add option to configure the network address when using DHCP 2017-11-23 10:21:25 +01:00
Mihai Petracovici
77358b63ea Add memory backing configuration 2017-11-12 16:25:13 -06:00
stanley karunditu
d3af858425 add Vagrant Guest Halt capability to vagrant-libvirt. Reference
[Builtin Guest Halt
capability](https://github.com/hashicorp/vagrant/blob/master/lib/vagrant/action/builtin/graceful_halt.rb#L50)
2017-11-03 11:23:06 -04:00
Florian Mauracher
89d2f0250f Ask for confirmation before destroying vms
Unify behavior across providers by asking for confirmation before
deleting virtual machines with potentially valuable data.

Before destroying a vm the following message is presented:
`demo: Are you sure you want to destroy the 'demo' VM? [y/N]`
An additional --force flag provided by upstream vagrant allows skipping
the `vagrant destroy demo -f`

Practically all other providers available ask the user for confirmation
before deleting the vm.

Vagrant official providers:
https://github.com/hashicorp/vagrant/blob/master/plugins/providers/docker/action.rb#L156
https://github.com/hashicorp/vagrant/blob/master/plugins/providers/hyperv/action.rb#L34
https://github.com/hashicorp/vagrant/blob/master/plugins/providers/virtualbox/action.rb#L100

Third party providers:
https://github.com/mitchellh/vagrant-aws/blob/master/lib/vagrant-aws/action.rb#L45
https://github.com/Azure/vagrant-azure/blob/v2.0/lib/vagrant-azure/action.rb#L34
https://github.com/jesa7955/vagrant-bhyve/blob/master/lib/vagrant-bhyve/action.rb#L156
https://github.com/NeilW/vagrant-brightbox/blob/master/lib/vagrant-brightbox/action.rb#L44
https://github.com/devopsgroup-io/vagrant-digitalocean/blob/master/lib/vagrant-digitalocean/actions.rb#L27
https://github.com/fgrehm/vagrant-lxc/blob/master/lib/vagrant-lxc/action.rb#L148
https://github.com/Parallels/vagrant-parallels/blob/master/lib/vagrant-parallels/action.rb#L48
2017-10-29 00:20:28 +02:00
Dario Meloni
2b37f931b5 Use exec to avoid leaving ssh lingering around 2017-09-15 09:47:47 +02:00
ntff@github
c902b2da7c update to the recent changes of default behavior in netcat.openbsd
netcat.openbsd, mostly used on libvirt servers (libvirt debian daemon
depends on netcat.openbsd) has changed (revision 1.111)
it's default behavior - it no more closes connection when stdin closes
by default. They suggest using "-N" flag for turning on former
behavior, but looks like "-q0", which is common with earlier versions
and netcat.traditional, will also work.
2017-09-14 14:19:26 +00:00
Darragh Bailey
c8a2ed8f34 Merge pull request #800 from homeski/feature/numa_nodes
Feature/numa nodes
2017-08-17 21:24:20 +01:00
Homero Pawlowski
ebd2cb48d0 refactored to only iterate numa_nodes array once 2017-08-17 15:43:46 -04:00
Homero Pawlowski
26b3e3c8fe automatically insert numa_cpus[:id] based on array index, and remove user's ability to edit 2017-08-16 11:50:29 -04:00
Homero Pawlowski
8bf16ba34f added some validation around @numa_nodes[:cpus] values 2017-08-15 17:02:06 -04:00
Homero Pawlowski
10ed9fbc7e added back block to remove nested cpu elements if host-passthrough is set, UNLESS numa_nodes is set 2017-08-11 16:27:28 -04:00
Gerben Meijer
4a69c58e3c Merge pull request #787 from mkhon/fix-start
Do not destroy domain when starting existing domain
2017-08-03 16:56:21 +02:00
Homero Pawlowski
f11abb8b74 refactored and fixed numa_nodes domain specific option 2017-08-02 01:07:23 -04:00
Thomas Heil
5d3da34dc8 vagrant-libvrt:
FIX hard coded vnc port
 - better use graphics_port = -1 so libvirt auto assign it
   and its possible to use more that one vm

Signed-off-by: Thomas Heil <heil@terminal-consulting.de>
2017-07-03 20:15:51 +02:00
Max Khon
8c753a93b6 WaitTillUp is re-used in action_start but failures (and interruptions)
during action_start are not expected to cause domain destruction:
do halt instead of destroy in WaitTillUp if called from action_start
2017-06-13 15:36:24 +06:00
Alec Istomin
9b591ec4e8 netwrok -> network 2017-06-07 22:43:40 -07:00
Darragh Bailey
6929c7a9b6 Merge pull request #779 from ericpulvino/int-exhaustion-error
Reverts PR#777 and adds a new error message for a different case
2017-05-29 14:19:59 +01:00
Dominic Cleal
404c428036 Accept network interface MAC addresses without colon delimiters
Commonly found in other Vagrant providers, a MAC address format without
colon delimiters is now accepted for better cross-compatibility of
Vagrantfiles.
2017-05-16 14:20:44 +01:00
Eric Pulvino
92e3e88d7c Reverts PR#777 and adds a new error message for a discretely different case. 2017-05-13 22:57:28 -04:00
dima
dc77250e33 0.0.40 2017-04-29 15:08:54 +02:00
dima
5696ac8da6 fix for qemuargs which broke standart behaviour 2017-04-29 15:08:26 +02:00
dima
b222da780d 0.0.39 2017-04-29 12:46:16 +02:00
Darragh Bailey
ba9d228b9d Merge pull request #741 from azat-archive/qemu-commandline
Introduce qemu:commandline (for osx quirks)
2017-04-28 19:17:07 +01:00
dima
5530d0f233 0.0.38 2017-04-28 13:12:53 +02:00
Azat Khuzhin
9e7e76b509 Introduce qemuargs (for osx quirks)
v2:
- s/commandline/qemuargs/ (as suggested by @mxl)
- update xmls for testing
- fix merging
2017-04-25 15:06:21 +03:00
Juan J. Martinez
9c9169ad94 Support for --include and --vagrantfile in package action
This provides the same behaviour seen in other providers (e.g.
virtualbox).

Files are placed into a "_include" subdirectory and the user provided
Vagrantfile (if any) will be loaded from the main Vagranfile in the box.

Also fixed a typo in the `assemble_box` method.
2017-04-21 16:58:38 +01:00
Ihar Hrachyshka
b56b97fd92 Bring up management network if it's not started yet
If I suspend using managedsave suspend_mode, then reboot the hypervisor,
and try to resume the box, then it fails because the management network
is not started (of course unless it's configured to autostart, which is
not the default behaviour).

This patch makes vagrant to start (and even recreate) the management
network if it's down.

Fixes vagrant-libvirt/vagrant-libvirt#761
2017-04-13 13:32:38 -07:00
Gerben Meijer
ea8e48bc5f Support configurable hypervisor features 2017-03-23 15:20:15 +01:00
dima
43bd92670d Merge branch 'master' of github.com:vagrant-libvirt/vagrant-libvirt 2017-03-21 10:41:31 +01:00
dima
bd9333dff3 temp fix 2017-03-21 10:41:16 +01:00
Dmitry Vasilets
17b6c763e4 Merge pull request #750 from electrofelix/fix-box-package
Use json format when calling qemu-img
2017-03-20 21:18:27 +01:00
Darragh Bailey
1633ec25f1 Use json format when calling qemu-img
Switch from using the default human readable format to request the json
format from qemu-img as this will provide disk sizes in bytes.

This avoids assuming that the returned size is in GigaBytes.

Fixes #743
2017-03-20 13:27:02 +00:00
Dmitry Vasilets
29cb626506 Merge pull request #742 from electrofelix/fix-up-with-provision
Always call provisioners logic for booted machines
2017-03-20 13:25:27 +01:00
dima
a6d6fb58f3 fix arguments order for nokogiri 2017-03-20 00:41:39 +01:00
dima
1b8e96251f fix for new ruby parser restrictions 2017-03-19 22:14:21 +01:00
Quinten Johnson
59edda8623 Allow additional disk serial specification
libvirt uses <serial></serial> to expose a disk serial to the VM.
2017-03-16 10:44:07 -05:00
Darragh Bailey
e3354245f6 Always call provisioners logic for booted machines
Allows `vagrant up` command to handle whether or not to run the
provisioners should the machine already be up. This allows re-running
certain provisioners in parallel using:

  vagrant up --provision --provision-with puppet_server

Which in turn allows for certain scripts that are bootstrap related
only to be skipped.

In general however it is better to let the middleware from vagrant
decided whether provisioners should run or not, as enhancements to that
functionality will then be automatically picked up.

With this change if a user runs `vagrant up` on already running
machines, without the `--provision` option they will be greeted with a
message from vagrant stating "Machine already provisioned. Run ...",
basically letting them know what to do next.

Without this change you simply see a message about "Bringing machine
'<name>' up with 'libvirt' provider..." and then nothing further.

Change-Id: I73ca4262abaa6431a838e4cf6468c06223643dea
2017-03-01 13:54:38 +00:00