Starting from version 0.7.0 (https://newreleases.io/project/github/vagrant-libvirt/vagrant-libvirt/release/0.7.0), always_destroy is set to true by default for any network.
However, in certain cases, it would be useful to keep the management network, especially when it has been already configured (externally) with Static IP leases.
This option allows to change the always_destroy behaviour for the management network.
Facilitate the injection of a default channel when qemu_agent is set to
true to make enabling it's use a simple `qemu_agent = true` for most
cases.
Where custom values are needed, they can be provided and the code will
skip adding a corresponding entry, or if necessary the user can add an
entry and mark it disabled similar to how synced folders work.
Closes: #1341
When enabling video_accel3d, as graphics_gl is typically required, will
by default set it to true unless explicitly set to false.
Enabling these should result in a significant performance improvement
for any VM where the desktop is being used.
Fixes: #893Fixes: #1009
Since the podman instructions by-pass use of the entrypoint, it is
necessary to ensure the directories being mounted are pre-created before
running the container.
Fixes: #1373
Support limited user defined serial console settings to redirect boot
time messages to a log file.
Authored-by: Darragh Bailey <daragh.bailey@gmail.com>
Signed-off-by: Itxaka <igarcia@suse.com>
This ensures that a network is always appended to the created_networks
file, to avoid the case where a domain that created the network gets
destroyed first during cleanup, therefore skipping the network destroy
because some other domain is still using it. Since the second domain did
not create the network, the existing behaviour is that it gets left
behind.
Seting :libvirt__always_destroy to true will ensure that the domain will
destroy the network even if it did not create it, if there are no other
users of the network remaining.
When users adding devices either via the pass through or USB redirector
approach, ensure a default controller is added using the xhci stack.
This should work for all versions of USB, where as the previous default
of piix3-uhci appears to only work for some USB 1 controllers.
Fixes: #1346
To handle where the ~/.vagrant.d global state directory for a user
doesn't exist, and thus specifying it as part of the docker run command
will result in the docker daemon creating it with root ownership.
Switch to using the working directory for user/group resolution,
searching for the Vagrantfile in the starting path and then working
up the tree. If it's not found default to the original starting path.
Combined with checking if the mounted vdir is empty, use the resolved
user/group based on the Vagrantfile and working directory to modify the
newly created directory to belong to the running user. Subsequently
ensure that the directories referenced via symlinks are created if they
don't exist.
Fixes: #1191Closes: #1254
Switch to publishing the image containing all of the libraries and build
dependencies needed to support the plugin being reinstalled as that is
the default behaviour when vagrant installs a new plugin.
This should allow the default image to be extended with additional
plugins and if needed, the authors of the new image may follow and use
the slim version as a base to provide a reduced size docker image.
Fixes: #1198
Simple integration test for vagrant package to ensure the execution
completes successfully to allow for some refactoring to be performed.
Ensure libguestfs-tools installed to provide virt-sysprep for tests and
update docs to reflect.
Ensure the path attribute for disks in the new format is required to
ensure there is always one parameter required for the hash element in
the array of disks. This avoids a certain amount of magical behaviour.
Identify that the name attribute is optional, however add checks for
collisions in volume names generated, as well as ensuring the volumes
are still prefixed in a way to prevent accidental collisions between
boxes utilizing the same names.
Add notes to the README identifying the format as experimental, with
notes on how the format should appear.
Multi machines environments will result in collisions until auto
correction is implemented. Therefore invert to keep the forwarding of
the default ssh port disabled by default initially until can handle the
port collisions detection and resolving.
Relates: #1012
Provides an option to disable the forwarding in case it causes issues.
However based on original PRs adding the forwarded behaviour, it does
not appear to be intentional to exclude it permanently.
Closes: #1011Closes: #1012
From <https://virtio-fs.gitlab.io/index.html#overview>:
> Virtio-fs is a shared file system that lets virtual machines access a directory tree on the host. Unlike existing approaches, it is designed to offer local file system semantics and performance.
From <https://virtio-fs.gitlab.io/index.html#faq>:
> Existing solutions to this problem, such as virtio-9p, are based on existing network protocols that are not optimized for virtualization use cases. As a result they do not perform as well as local file systems and do not provide the semantics that some applications rely on.
This PR add `virtiofs` support to vagrant-libvirt, which simply clone-and-hack from our existing 9p implementation. It also tidy up and synchronize naming for 9p implementation.
Tested with:
- Host: Ubuntu 20.10 + Linux 5.10.30 + QEMU 5.0.0 + Libvirt 6.6.0 + Vagrant 2.2.15
- Guest: Ubuntu 20.04 + Linux 5.4.0
Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
Migrate the proxy_command specification to the config and add support
for user override template to be used for edge cases. Moving it to the
config allows mistakes in the interpolation to be caught before the
machine is brought up.
Note this uses a more restrictive replacement to avoid requiring
escaping of '%' or '$'.
Issue #921 already partially resolved thanks to @ElArtista, this
completes the fix by allowing users to override as needed.
Fixes: #921
Switch to only picking up LIBVIRT_DEFAULT_URI if no settings that could
affect the uri have been explicitly set. Some of these may not actually
appear in the URI depending on what is actually set or not set, however
it is important that should only use the env variable if the user has
not explicitly configured options relevant and instead allow them to
configure as needed.
Adds notes on how to download the SRPMS for CentOS 8 stream to
facilitate rebuilding.
Inspiration came from the following email chain
https://www.spinics.net/lists/centos-devel/msg19439.html, which only
provides part of the solution.
Switch using "$@" to ensure that options provided on the command line to
be interpreted by vagrant are correctly passed on with appropriate
quoting. This fixes the issue where running the docker container with
`vagrant ssh -c 'ls -la'` would fail as the `-la` option was interpreted
by vagrant instead of being passed as part of the value for the `-c`
option.
To be able to use 'vagrant ssh' from within the docker container, it is
necessary to run within the host network context.
Include a helper alias suggestion and a note about a current issue in
passing arguments to vagrant options which impacts the 'vagrant ssh -c
...' syntax with an alternative.
Adds disk driver options: io, copy_on_read, discard and detect_zeroes
for both the primary vm disk and additional disks.
Minor refactor of existing volume_cache to deprecate and replace with a
single call to disk_driver that contains all of the options. Usage of
the volume_cache option will now result in a message to ui that it has
been replaced, as well as a warning that it is ignored if disk_driveris
set.
The old option volume_cache is only used if disk_driver is not present
(even if :cache is not set - in that case, the hypervisor default is
always used).
Resolves#998
Allow configuration of various memballoon-related settings. It was
discovered that it may be needed to be able to control the memballoon's
PCI slot/bus location in order to prevent it from conflicting with
other explicit PCI location assignments. For example when configuring
the management network NIC to go to slot 0x05, libvirt would try to put
the memballoon there as well and resulting in a fatal error.
Qemu has supported tpm 2 and the ability to start swtpm. Additionally
it expands the tests for the tpm configuration to ensure that only when
the options cause a change to the domain XML will the domain be updated
on a subsequent start. This change just allows passing through the
necessary config.
Vagrant.configure("2") do |config|
config.vm.provider :libvirt do |libvirt|
libvirt.tpm_model = "tpm-crb"
libvirt.tpm_type = "emulator"
libvirt.tpm_version = "2.0"
end
end
closes#965
If planning to repackage a machine that is brought up with vagrant and
modified, it is necessary to avoid the default ssh replacement that
normally takes place to ensure the subsequent box that is halted and
packaged can be accessed by vagrant using the default ssh key
subsequently.
Add some small documentation notes to help users be aware to this so
that they know to set `config.ssh.insert_key = false` when using vagrant
to build a box.
Fixes: #1116
Provides steps for how to build and copy across the required libraries
to avoid a number of runtime failures on Fedora when using upstream
releases of vagrant.
These steps also remove the need to provide `CONFIGURE_ARGS=..`
as part of the install process.
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.
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.