Add support for a pool setting for additional disks, example:
Vagrant.configure("2") do |config|
config.vm.box = "generic/centos8"
config.vm.provider :libvirt do |domain|
domain.storage :file, :size => '20G', :pool=>'default'
domain.snapshot_pool_name='cache'
end
end
this allows to place the virtual machines snapshot in the "cache" pool,
while additional disks are created in the "default" storage pool.
Provide a simple create domain test that uncovered a bug with an
exception in addition to fixing the tests to avoid unnecessary output
when the code sends messages via the UI.
Ensure the release workflow will work consistently by limiting the
number of issues that are checked in addition to making use of a cache.
This should keep the requests below the API limit and overtime may be
increased should the cache be retained.
Add checks to determine the correct default branch and look to establish
if the tag that was created is reachable from this branch, using it as
the value for `commitish` to the create release action so that it
retains the `x commits since release` text and link.
In the case the workflow is re-run for a release after another release
look to pick up the next tag after this release in order to limit the
release notes from updating with additional fixes.
Tweak workflow to skip attempting to push the docker image without
credentials additionally modify to allow the dockerhub organization to
be managed via a secret so that forked repos may push locally modified
images to their own dockerhub with a minimum of effort.
Additionally given the way github status checks works, this should allow
maintainers of this project to push the same commit to a local branch in
order to build and publish the image to the org dockerhub repository to
allow testing of the image before merging. Based on having first
reviewed and decided it was safe to allow access to any secrets.
Pushing the PR to a local branch will not result in getting a tag with the
pr<num> as the version, however this is a reasonable starting position.
Erubis is dead upstream, therefore it is good idea to avoid its usage.
Also, this allows to drop explicit dependency on Erubis, which is not
specified anywhere and may cause issues when Vagrant changes its
renderer.
Fixes#1142.
Add github actions to automatically populate release notes on tag push.
This should make it easier to show what new functionality/improvements
have been added by populating the release page based on PRs and issues.
Provide a docker image that supports execution of vagrant-libvirt
provided the host system has docker and libvirt installed. This can help
side step many of the library compatibility issues experienced by users
by providing an alternative way to run the latest code should their
distribution not have a natively packaged vagrant.
Users are allowed to set a LIBVIRT_DEFAULT_URI environment variable that
controls tools (i.e. virsh, virt-install, etc) that communicate with
libvirt. Let's allow for that mechanism to be used here.
Users are allowed to set a LIBVIRT_DEFAULT_URI environment variable that
controls tools (i.e. virsh, virt-install, etc) that communicate with
libvirt. Let's allow for that mechanism to be used here.
Test settings modifying the `@uri` and `@qemu_use_session` variables to make
it easier to update and perform an initial minor refactor to reduce some
of the code currently in use to set `@uri`.
According to the docs, for volumes and backingStores: "The mode defaults to
0600 when not provided. https://libvirt.org/formatstorage.html
Removing this setting here allows the pool configuration to set the default
mode.
- Explicitly disable any SSH multiplexing here so PID tracking of
tunnels works correctly.
- Using `exec ssh` in the spawn forces Ruby to use a subshell (as exec
is a shell builtin) instead of spawning the ssh process directly, which
results in getting the wrong (and dead, as the exec replaces the
subshell) PID to track and clean up later.
- Run the ssh tunnel command on its own process group, essentially
daemonizing it and keeping its PID intact even when `vagrant up` command
is run on shell/consoles without an explicit TTY, such as Emacs Eshell.
Make it easier to tweak some qemu options by allowing passthru of
command line environment variables.
- Also cleans up weird variable indirection used for qemu commandline args
variable through `qargs` in various constructors.
- Addresses some functionality discussed in #776.
Bring the TOC in line with recent additions and enable the ability to
use a vim plugin to quickly regenerate in lieu of a better alternative.
Using https://github.com/mzlogin/vim-markdown-toc
Clean up any trailing whitespace so that subsequent file updates
by other PRs will be able to simply regen using appropriate tooling
without pulling in additional changes unrelated.
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.
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>
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.
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.
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.
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.