Ensure the acceptance tests are actually executed and resolve any issues
that have crept in since they were not running as expected.
Call the ResolveDiskSettings on reload to ensure that the start domain
action will have all of the necessary configuration for any additional
storage disks added.
Tidy up create domain output when disks are attached.
Fixes: #1678
Ensure forwarded ports are cleared on suspend and recreated on resume.
Included tests to exercise the entire up/start behaviour to ensure the
expected actions are called in various scenarios, moving config validate
to only occur at the entrypoints and dropping it from being called
during start. Also eliminate a duplicate SetupComplete call.
Fixes: #1115
This adds websocket functionality for VNC. The websocket attribute may
be used to specify the port to listen on (with -1 meaning
auto-allocation and autoport having no effect due to security reasons).
This patch allows to specify the virtio-mmio address type, which is
needed for debian guests on virt machines that don't support the PCI
address type.
See also
https://translatedcode.wordpress.com/2016/11/03/installing-debian-on-qemus-32-bit-arm-virt-board/
where it is explicitly said to use `virtio-blk-device` and
`virtio-net-device` instead of `virtio-blk-pci` and `virtio-net-pci`, for
that reason.
Apparently, libvirt will use the `virtio-blk-pci` and `virtio-net-pci`
by default. By setting address type to `virtio-mmio`, it uses
`virtio-blk-device` instead. It seems not necessary to do the same for
the network controller, since libvirt will also use `virtio-net-device`
if the disk address type is set to `virtio-mmio`.
While this should help with ARM machines, it won't solve all issues
as some machines will boot perfectly with the existing defaults
provided the correct loader binary is used.
Relates-to: #1608
During validation ensure that the default value for public network
devices is selected and shown on error if it's not one of the host
devices that are currently discovered.
Secure Encryption Virtualization is supported by libvirt and this
change adds support for vagrant-libvirt to enable it.
It requires a UEFI base box and needs a combination of options to be
configured for it to work.
Co-authored-by: PELLET Norman <norman.pellet@csem.ch>
Co-authored-by: MUNTANÉ CALVO Enric <emc@csem.ch>
Co-authored-by: Darragh Bailey <daragh.bailey@gmail.com>
Closes: #1372
To ensure dependencies are installed from fedora install
of directly from rubygems, restore retrieval of the
dependencies from repositories, with adjustments now
that vagrant-libvirt is marked as disabled.
Rely on whether docker username/token is available to publish the image
to docker hub only and discard use of the secret for the org name.
Ensure org name is normalized for dockerhub.
Passing the image names directly to an input variable appears to result
in encoding the newline intended to provide a second name to be built
and have tags appended.
Use ruby 3.1 vagrant main and latest release, dropping the current
patching as these should now work with more recent rubies.
Retain the current ruby-libvirt patch.
Change driver list of networks returned to only be read-only when using
qemu session, to allow for VMs using the system context to be able to
restart any networks needed.
Include CentOS 9 Stream and CentOS 8 Stream, in addition to updating the
openSUSE instructions to cover upstream vagrant package installation.
Closes: #1429Closes: #1537
The CPU element to manage the mode, model, features (including nested),
is only available on some architectures. To allow this plugin to
generate XML valid for other architectures such as RISC-V, the CPU
element needs to be optional and only enabled when the architecture
specified supports it.
Include checks in the validation section to help prevent the setting of
an unsupported architecture with any of the CPU features that require
the CPU element to be available.
Fixes: #1538
Reject any 9p synced folders that the user does not have read access to
the host path where using qemu sessions. This is because the VM will
launched with the user permissions instead of system permissions and
will fail to come up if trying to add a path that is not readable to be
mounted into the guest.
Additionally flag that virtiofs may not be supported with qemu sessions,
but do not reject in case support is added in the future.
Fixes: #1430
To allow for a different ssh port to be used when connecting to a
machine for NFS setup, use the port provided in the ssh_info hash
with a fallback to the default ssh port.
This may allow NFS mounting into Windows guests once support is added to
vagrant itself to handle NFS installation.
Fixes: #1640
Move the unit context to a name matching the other contexts. Remove some
unnecessary entries from it that are unused, and remove references to
the old name relying on spec helper to load all contexts.
If the graphics type is set to spice, then skip setting the autoport as
the attribute will be discarded by libvirt causing it to appear as
though not all of the XML sent to start the domain was accepted.
Ensure the same filtering for networks supported by vagrant-libvirt is
done for both driver and util by moving to call the same function with
filtering.
This avoids calls for the list of host devices from failing to parse
some networks that are not supported.
Fixes: #599
Save the triggering PR as an artifact when building the gem as it will
be required by the triggered workflow to determine the PR that triggered
it since Github does not populate the event data if the PR is a forked
PR.
Adds workflow to publish a link to the gem artifact built for the
current PR. Allows for contributors or those impacted by issues to have
an easier test mechanism.
If the network does not have a bridge name, ignore it and move onto the
next one. This allows for hostdev networks to exist without breaking.
Includes some rudimentary testing to exercise the lookup code along with
a small bit of refactoring based on the realisation that there is no
need to lookup the network information twice as it is available if the
list_all_networks API is used.
Fixes: #599
On some distros the libvirt does not appear to always return all of the
host interfaces. Switch to using 'ip -j link show' to read them directly
from the system in order to ensure all devices are read.
Refactor the driver tests to better isolate between test setup for the
different sets of functions and avoid accidental setting of
configuration details that may not be obvious.
Fixes: #1624
Depending on the installed packages present on the host system, vagrant
may select either nfs or rsync as the default synced_folder
implementation.
Fixes: #419
Reduce the number of other graphics settings that need to be adjusted
once the type has been set to spice by defaulting the remaining options
to ones better suited for spice, in addition to adding the required
channel automatically.
Fixes: #1482
Ensure the development steps can be successfully executed with system
ruby on Fedora 36 to try and help new contributors have an easier
on-ramp.
Support running acceptance tests locally, though note that it may
require rvm if vagrant doesn't support the ruby version used by the
distro.
Allow libvirt to start the domain before reading back the XML to
retrieve the port assigned automatically for subsequent graphics access
when autoport is enabled.
Fixes: #992
Ensure the bootmenu is disabled by default. When not specified it will
default to the hypervisor default behaviour, however this is not
necessarily defined consistently across different distros. Therefore for
a consistent behaviour, simply ensure it is always configured to be off,
unless explicitly required to be enabled when the boot order is
configured.
Fixes: #947
Provide a simple working example of how to set the kernel, initrd,
cmdline options and where to retrieve the required files when working
with disk images.
Fixes: #920