Use of tee requires the argument '-a' to append, as current behaviour
will result in replacing the contents which is not intended. The config
settings should be in addition to the configured values.
Switch to standard workflow for building the documentation from pull
requests and use a workflow call to trigger the deployment for write
access. This should limit the ability to compromise documentation site
from forked PRs while allow validation of dependency changes as well as
more of the actions that impact the deploy.
Switch around the groups defined in the Gemfile to allow execution
without installing additional tools that are useful for development but
not needed for testing or packaging.
Four links on the doc-site's homepage are 404'ing because their
href/URI's fragment identifier is preceded with a /.
Removal of the extra slash fixes.
Closes: #1759
Start domain added some support to update the nic model type if it
changed to avoid needing to completely destroy and recreate the domain.
Additionally support for setting the management network nic model type
was added, however the default value did not correctly reflect expected.
This updates `management_network_model_type` to default to
`nic_model_type`, which in turn defaults to `virtio`. This has now been
moved from the create network interfaces action into the config object
to allow chained resolving. This should ensure that setting
`nic_model_type` will correctly cause all networks to use the model
unless explicitly specified to use a different model.
Additionally the start domain action for updating the interfaces has
been modified to loop over all interfaces and all configured adapters in
the order they should have been added. This allows for checking whether
the model type needs to be updated based on the
`management_network_model_type` config option for the first network,
assuming the management network has been attached, and otherwise to fall
back to the default from `nic_model_type` for all other interfaces.
Finally ensure the iommu attribute is removed from the nic driver if
the model type is switched to anything other virtio to avoid issues with
attempting to enable invalid settings.
Fixes: #1743
Allow setting the interface name that appears on the host for the
management network interface in the guest. This allows for more complex
networking layouts by allowiing matching against devices for vlan
configurations.
Fixes: #1701
Github will drop a required check if the job is skipped. This can happen
if a job is placed after a matrix execution with the intent to act as
the
required status check as well as complete a coverage report for this
repo.
Libvirt creates qcow2 volumes with very old `compat` version `0.10` if
no `compat` version is specified in the xml (see
[here](https://libvirt.org/formatstorage.html#id11)). It seems libvirt
has backwards compatibility reasons to still use `0.10` if nothing is
specified in the xml.
Unfortunately this has the effect that VMs created by vagrant-libvirt
are using the 10 year old `0.10` qcow2 version, instead of the `1.1`
version that has **better performance and stability fixes**.
This is even happening when the backing file of the vagrant box is in
compat `1.1` format.
This is the `qemu-img info` of the backing file provided by the vagrant
box:
```
# qemu-img info /var/lib/libvirt/images/vagrant_box_image_0_box.img
[...]
Format specific information:
compat: 1.1
[...]
```
Although the backing file provided by the box is using compat `1.1`, the
created volume by vagrant-libvirt has only compat `0.1` as shown here:
```
# qemu-img info /var/lib/libvirt/images/vagrant-01-test_default.img
[...]
backing file: /var/lib/libvirt/images/vagrant_box_image_0_box.img
Format specific information:
compat: 0.10
[...]
```
With this MR, the volume of the VM will use the same `compat` version as
provided by the backing image of the vagrant box.
If `qemu-img info` does not return a `compat` flag, it falls back to the
very old `0.10` version.
Remove duplicate inclusion of Provision middleware when up is called
on an running machine resulting in a double provision.
Includes a unit test update to ensure expected actions are only called
once as well as a regression for calling up on a running machine.
Fixes#1710.
This was found while updating the vagrant-libvirt package to 0.11.2 in
Fedora, where we use qemu:///session by default and run the tests with
that instead of qemu:///system from config files.
When using qemu session, the config is checked
if there are 9p synced folders.
We do not care about synced folders when we want to check
if the MAC address is defined correctly.
The result is a failure from the mock object:
`#<Double "vm"> received unexpected message :synced_folders with (no args)`
This is a second layer of protection, to make the behavior minimally
surprising for the user. The implementation of clock_* handlers follows
a precedence decision order in case of conflict, but that shouldn't be
relied on as the only layer of defense against bad configs.
Change the default behaviour when logging output from the console to a
file to ensure the file is pre-created and unless append is explicitly
set to true in the source config, truncate the file. Combined with
having the domain template default to enabling append, this causes
libvirt/qemu to not attempt to create the file and thus retains the
owner/group and permissions of the original file.
Relates-to: #1385
This change adds a configuration option for setting the NIC model type for
the management interface, which defaults to `virtio` (the current value)
The context for this change is that I was having severe speed issues
with `virtio` (which have now disappeared, probably after a QEMU update)
and the `e1000e` NIC was doing much better.
When setting the `model_type` of a network to something else than
`virtio`, the `iommu` parameter was still set for the device which isn't
allowed.
The if-statement for setting the parameter was looking at the default NIC
model type (in `@nic_model_type`) instead of final, configured value in `@model_type`.
With ruby3.2, URI.parse now sets empty host instead of nil via:
dd5118f852
Adjust test case so, also with ruby <= 3.1, forcely set empty string for host
when nil to make finalize_from_uri behavior consistent between different
host ruby versions.
Allow for iface_name to be set on public_network configurations to
control the name of the interface created by libvirt. This overrides the
default that would be created automatically, but cannot use a reserved
name as it will be ignored.
Closes: #799
Switch to configured networks helper in validate to ensure that that the
validation checks the final list of networks that will be used, not just
those initial configured.
This will help ensure the management network is validated in addition to
the user specified networks.
Better handle setting the autoport value when the port is explicitly set
to ensure that the XML sent to update the VM is correct and will be the
XML that is reflected in the defined machine.
By prioritizing checking if the port is provided, graphics_autoport =
"yes" is ignored.
Fixes: #1687