Commit Graph

1320 Commits

Author SHA1 Message Date
ryanfitzsimon
a83900f1ae
Download images with libvirt instead of copying (#928)
Packaging an existing vagrant environment relied on copying the backing
image. Users may not have permission to read this file despite being
able to interact with it through libvirt.

Use ruby-libvirt to download the image instead so any user with libvirt
access can run the package command.
2020-05-10 13:13:56 +01:00
Quinten Johnson
7e966febbd
Allow setting of PCI domain (#927) 2020-05-10 11:40:29 +01:00
Quinten Johnson
618c8b251d
Allow specification of domain shares (#925)
Weighted priority of the domain relative to others on the host.
2020-05-10 11:24:06 +01:00
Quinten Johnson
d9c5f63410
Allow specification of numa nodeset (#924)
This specifies the physical numa nodes on which the virtual memory can be
placed.
2020-05-10 10:52:46 +01:00
Quinten Johnson
60ef4b03d1
Allow specification of cpuset (#923)
Allows the pinning of vcpus to physical cpus.
2020-04-29 19:08:01 +01:00
Darragh Bailey
398258e306
Merge pull request #1102 from abbbi/fix_docs
provide working link to documentation about nested virtualization
2020-04-29 17:04:20 +01:00
Darragh Bailey
47ded9f52e
Make sure to require util/nfs for include (#1103) 2020-04-29 17:03:47 +01:00
Michael Ablassmeier
509671c3a3 provide working link to documentation about nested virtualization 2020-04-29 16:46:56 +02:00
Paul Elliott
bde81a15a2
Remove NFS exports on domain destroy (#781)
Uncomment NFS prune action

If the user has not configured NFS for any of the synced folders, then
it is likely they are not expecting to be asked for a sudo password on
destroy. Move the test for using NFS to a common module and include in
both the preparing and pruning actions.

Co-authored-by: Darragh Bailey <daragh.bailey@gmail.com>
2020-04-28 16:22:34 +01:00
Darragh Bailey
9ea4aee83a
Merge pull request #1079 from ccrebolder/use_fog-libvirt_filters
Use fog-libvirt filters when querying libvirt host
2020-04-27 20:35:18 +01:00
Chris Crebolder
34d933deea Check for empty result from fog-libvirt volumes
The fog-libvirt volumes filter behaves differently than the others in
that it returns an empty volume object if nothing is found. This has the
potential to change in the future so guard against an empty result as
well by checking if the assigned first element is nil.
2020-04-24 21:10:29 +01:00
Chris Crebolder
86aac4ce9c Use fog-libvirt filters when querying libvirt host
This commit replaces the pattern where the metadata for all volumes,
servers, or pools was downloaded and then searched. Instead a filter
argument is passed to the connection and only the metadata for the named
resource is returned, if it exists. This results in significant speed
increases for libvirt hosts that are offsite or have many volumes.
2020-04-24 21:10:29 +01:00
Michael Ablassmeier
304a2a055c
call stale_volume_remove only if configured libvirt pool exists (#1095)
Move message about removing stale volume unless there is one to be
removed.
2020-04-24 19:11:19 +01:00
Darragh Bailey
5e1445f7df
Prep for releasing 0.1.0 (#1093)
Start keeping .1 for bugfixes and make it easier for people to pin locally to accept those without picking up major changes
2020-04-23 18:07:09 +01:00
Darragh Bailey
63f34432ad
Allow dev with latest vagrant to use newer vagrant-spec (#1098)
Latest vagrant depends on a vagrant-spec release containing a more
recent dependency on childprocess than is supported for earlier releases
of vagrant.

Adjust dependencies to pin to the specific release of vagrant-spec if
the request version of vagrant is 2.2.7 or older.

Does not attempt to handle the situation where a version is specified
that cannot be parsed.

While it would be useful to test against newer versions of 2.2.x, it
appears this encounters a bug in upstream vagrant when installing in
dev mode see https://github.com/hashicorp/vagrant#11293
Therefore limit latest 2.2.x released version tested against to 2.2.4.
2020-04-23 09:12:04 +01:00
Darragh Bailey
8cea27fd3e
Defer to Warden to call recover (#984)
Warden will call the recover method when env[:interrupted] is set, so
just return instead and let it walk the stack to perform cleanup. This
ensures that during the WaitTillUp action that the user setting to
disable destroy_on_error is respected should the exception occur during
looking for the IP address or SSH connection.
2020-04-22 09:13:18 +01:00
Darragh Bailey
30ccf3a0ba
Merge pull request #1096 from abbbi/handle_box_image
Fixes issue introduced with #1030
2020-04-21 17:58:28 +01:00
Michael Ablassmeier
59ef20812b fix handle_box_image.rb:89: syntax error 2020-04-21 13:49:29 +02:00
Michael Ablassmeier
d39a9a302a
Allow setting of Sysprep options and multiple hyperv features (#1089)
Allow setting of multiple hyperv features and support for virt-sysprep options

Fixes #1039 and #1077
2020-04-21 11:37:03 +01:00
Darragh Bailey
5658a83723
Merge pull request #1094 from vagrant-libvirt/pin-vagrant-spec
Fix CI by pinning version of vagrant-spec for dev
2020-04-20 19:31:58 +01:00
Darragh Bailey
1c830dc4a5 Fix CI by pinning version of vagrant-spec for dev 2020-04-20 15:44:14 +01:00
Darragh Bailey
80cfbd810d
Merge pull request #939 from eighthave/patch-1
remove gemspec use of `git ls-files`
2020-03-27 21:13:16 +00:00
Darragh Bailey
386f7ff4fc
Merge branch 'master' into patch-1 2020-03-27 18:52:02 +00:00
Darragh Bailey
7b7f54ff41
Include license and README with gem 2020-03-27 18:46:22 +00:00
Darragh Bailey
4598cfc280
Merge pull request #974 from electrofelix/match-storage-pool-by-default
Default to storage pool if snapshot pool not defined
2020-03-27 18:34:33 +00:00
Darragh Bailey
2f2262774e
Merge pull request #1030 from voxik/use-fog-libvirt-for-volume-management
Use fog-libvirt facilities to create volumes for QEMU session.
2020-03-27 18:30:33 +00:00
Darragh Bailey
a8e6551332
Merge pull request #1041 from kittydoor/user-session-doc
Added more details on how to use vagrant-libvirt with QEMU user sessions
2019-12-05 19:14:49 +00:00
Darragh Bailey
30abb74440
Merge pull request #1055 from vhaidamaka/update-doc-build-deps
docs: update build dependencies for newer Debian-based distros
2019-10-21 09:40:45 +01:00
Vadym Haidamaka
2947a1d52c docs: update build dependencies for newer Debian-based distros
See https://lists.debian.org/debian-user/2016/11/msg00518.html
2019-10-20 15:36:06 +03:00
Jeff Welling
1739809a12 Update readme doc howto troubleshoot (#1052)
Note common troubleshooting tools/steps in README
2019-10-10 20:39:58 +01:00
Katherine Pata
330b0f83cd Added more details on how to use vagrant-libvirt with QEMU user sessions 2019-08-30 11:02:16 +02:00
Tadej Janež
f8eae9984d Use fetch to obtain environment variable value in package_domain (#1035)
ENV is a Ruby Hash which doesn't have a get method but the fetch method.
2019-08-13 12:06:19 +01:00
Vít Ondruch
608037c15c Use fog-libvirt facilities to create volumes for QEMU session.
This is supported since fog-libvirt 0.6.0 via https://github.com/fog/fog-libvirt/pull/60
2019-07-17 18:27:00 +02:00
Darragh Bailey
c3af181c83
Merge pull request #1022 from MalloZup/MalloZup-patch-2
Update readme with openSUSE installation
2019-07-10 17:19:26 +01:00
Dario Maiocchi
e45f6a5110
Update readme with openSUSE installation
Update readme with openSUSE installation
2019-07-05 13:46:53 +02:00
Darragh Bailey
3f30606021
Update versions tested in README (#1006) 2019-07-01 10:43:21 +01:00
Darragh Bailey
8e85d0fc8c
Merge pull request #985 from martin-schwenke/master
Avoid TOCTOU error in volume creation
2019-05-10 14:18:29 +01:00
Darragh Bailey
5fe845156b
Merge pull request #1005 from vpodzime/master-pigz
Use parallel gzip in box creation if available
2019-05-10 14:17:17 +01:00
Vratislav Podzimek
2f41402c9a Use parallel gzip in box creation if available
This can speed up box creation significantly on modern machines.
2019-05-09 13:27:04 +02:00
Darragh Bailey
0f037bab9b
Merge pull request #983 from electrofelix/detect-port-collision
Fail on port collisions
2019-04-30 15:53:02 +01:00
Martin Schwenke
222b50925d Avoid TOCTOU error in volume creation
Checking if a volume exists before attempting to create it results in
a "time of check to time of use" race.  When the check is done the
volume doesn't exist but then, because it is shared storage, it is
then created by another node before the local attempt to create it.
This results in an unexpected failure.

It is better to simply attempt to create the volume and ignore EEXIST
in cases where this is permissible.

Implementing this properly is complicated by the fact that the
exception appears to contain only an error message and does not appear
to contain a useful error code.  Digging through the layers in, for
example, fog-libvirt provides no evidence why this is so.  However,
the error message seems fairly unique and matching it is easy, so just
do that.  A small hack to vastly improve stability.

Signed-off-by: Martin Schwenke <martin@meltin.net>
2019-03-13 21:50:13 +11:00
Darragh Bailey
8f314cbb0e Fail on port collisions
Partial Fix #321 by enabling option ExitOnForwardFailure=yes to detect
and fail on forward port mappings failing to bind.
2019-03-06 11:34:23 +00:00
Darragh Bailey
191dc8656e
Merge pull request #973 from electrofelix/update-travis-tests
Update travis conf and test multiple combinations
2019-02-27 14:37:48 +00:00
Zak B. Elep
deb36bef8b Allow customizing of virt-sysprep behaviour on package (#955)
Support `vagrant package` of e.g. bento-derived boxes that require SSH
hostkeys already set (as in the case of bento/debian-7 and above,) as
well as leave existing LVM UUIDs untouched (e.g. in bento/ubuntu-18.04.)

Instead of hard-coding sysprep operations, use an environment variable
to set these instead.

Use the Chef bento use case as an example for customizing sysprep
operations.
2019-02-27 12:32:37 +00:00
Darragh Bailey
3d0080b6a4
Merge pull request #970 from pravi/patch-1
Update fog-core to latest version
2019-02-18 19:05:40 +00:00
Pirate Praveen Arimbrathodiyil
44a760f668 Update fog-core to latest version
fog-core 2.x is released and we'd like to use it in debian
2019-02-18 18:30:44 +01:00
Darragh Bailey
4d2c26a926
Merge pull request #895 from mattandersen/default-forward-all-nics
Default Port Forwarding to All Host Addresses
2019-02-18 12:19:28 +00:00
Darragh Bailey
e40f1c67b4 Default to storage pool if snapshot pool not defined
Default to using the same storage pool in case the user defines
storage_pool_name without defining snapshot_pool_name and only use a
separate pool when snapshot_pool_name is explicitly set.

This will ensure that setting storage_pool_name to a different pool does
not also require setting snapshot_pool_name to match previous behaviour.

Additionally it is reasonable for a user to assume that if a Vagrantfile
sets storage_pool_name to something other than 'default', then there
should be no need for a default pool.
2019-02-13 16:52:20 +00:00
Darragh Bailey
c02905be14
Merge pull request #885 from brianjmurrell/patch-1
Don't add _ after user defined default_prefix
2019-02-13 15:24:42 +00:00
Darragh Bailey
49410aaf0e
Merge pull request #941 from evgeni/management-domain
add domain name for the management network
2019-02-13 15:20:10 +00:00