Avoid the need to parse the main version switching menu creation and
handling code by moving the site constants to a separate file.
Additionally move more of the element construction into the JavaScript
code to make it closer to a web component and facilitate more control by
a common script to be loaded by all published versions.
Switch from having all documentation contained within the README to
publishing a jekyll static site of documentation under github pages.
This allows for configuration and installation guides to be handled
separately to make for the relevant pieces to be in smaller chunks and
therefore easier to follow for users. Additionally a table of contents
can now be included in a left navigation section that ensures it should
be possible to quickly jump from the start to any section and back
again.
Include support for publishing previews and releases under separate
directories to allow for them to exist at the same time as the other
latest version of the documents.
The navigation section also includes support for accessing any of the
other versions published so that it easier to see what configuration
options exist for a given release. These will be published automatically
when releases are added.
Previous PR added tests but missed that the disk controller was not
being set correctly in the create domain action by default.
Update config documentation to include option.
For better performance allows enabling the virtio-scsi model on the
scsi controller in VM's.
Additionally supports inferring use of virtio-scsi model from disk
device or bus, and similarly infer the correct values for these
based on device or bus.
Currently one controller per 7 domain volume disks is created, this
follows virt-manager's behaviour, and is assumed a reasonable default.
However note that virtio-scsi should be capable of allowing many more
disks to be assigned per controller than this. It is presumed that the
source of the number 7 is allowing for 8 devices per controller
including the host adapter, which therefore allows for 7. Hardware SCSI
controllers typically supported 16 addressable devices including the
adapter providing for a 15 disk limit. Whether this is necessary is not
yet clear.
Co-authored-by: Darragh Bailey <daragh.bailey@gmail.com>
Move existing tests executed with the help of bats to use rspec directly
combined with tags to filter them out from being executed by default.
This allows for more complex assertions as well as easier debug as the
code supports use of setting 'VAGRANT_SPEC_SKIP_CLEANUP' to prevent the
tests from removing the temporary directory created for home and work
directories.
Extend a number of classes from vagrant-spec to override default
behaviour to allow passing of additional environment variables for
packaging tests, as well as supporting the skip cleanup. Given the use
of after to perform the cleanup, need to vendor the vagrant-spec
acceptance context in order to modify it easily.
If a box is added directly without a version, vagrant will default set
it to 0. When this occurs it is necessary to ensure use of mtime to
distinguish when the disk image in the box was last updated to allow
replacement of the box to trigger a fresh upload.
Fixes: #1382
As a starting point to help those with use of rvm and documentation for
development and contribution, ensure that some basic config to select a
ruby version and gemset to use is in placed.
Ensure that when no box is defined for a pxe install, that the domain
name is only populated for subsequent boots and if it is already
provided by a create action, skip attempting to retrieve from a
non-existing domain XML.
Fixes: #1508
Vagrant newer than 2.2.11 reworked how the after hook definition
functions requiring it to be called in a different way to ensure it is
possible to hook the box remove action to perform the expected local
action.
Add a compatibility function to ensure that the plugin works with both
mechanisms and some simple tests to ensure that with the unit tests
validated against the older vagrant versions that it confirms the action
will be called as expected.
As part of fixing the call of the remove_libvirt_image action, ensure it
only executes when the box removed is a libvirt one and ignores all
others.
Fixes: #1196
Basic tests for synced folder capabilities for 9p and virtiofs should
ensure consistent detection of files for coverage across multiple
versions of ruby as some versions pick up these files and others do not.
Detect when the device provided for connecting the VM to a public
network via the host does not exist and attempt to provide a useful
error message to give end users a hint of how to correct.
Fixes: #1477
Calling undefine on a domain and recreating it can result in some edge
case errors where if the current capabilities of libvirt have been
reduced, it may not be possible to restore the old definition.
Instead switch to calling `domain_define` with the new definition and
check that the resulting libvirt domain definition has been updated in
the expected manner, otherwise report an error to the user.
Fixes: #949
Relates-to: #1329
Relates-to: #1027
Relates-to: #1371
Builds on the work started by @randomvariable in #840 addressing the comments
left there.
Fixes: #529
Signed-off-by: Rodolfo Olivieri rodolfo.olivieri3@gmail.com
With multi volume boxes, need to ensure that disk settings such as the
device assigned are resolved dynamically once it has been established
which devices have already been assigned to the box volumes on either
initial creation or subsequent boots.
Otherwise users are forced to always explicitly define the device for
additional storage instead of having it be automatically assigned the
next available device.
Consequently previous changes have broken the ability for machines
with additional storage to be halted and restarted correctly.
Include an integration test that for additional storage checks that the
machine can be stopped and started again.
Fixes: #1490
When removing networks, skip calling destroy to deactivate the network
if it is not currently active. This avoids errors when the host has been
rebooted and vagrant machines are removed as the networks are typically
not automatically started.
The loader tag is required when nvram is being enabled. Ensure it is
marked as a requirement of validation and also support it's
configuration during the start domain action.
Switch to instance doubles for driver where possible and reduce usage of
allow_any_instance_of.
Additionally replace some incorrect allows with expects to validate
calls are not made.
Handle enabling and disabling of NVRAM during start domain.
This patch contains latent support for upstream PR fog-libvirt#102 to support destroy
with NVRAM enabled once that is merged.
Fixes#1027.
When assigning a pci passthrough device, the domain, bus, slot and
function parameters pertain to the host device address. Add guest_
flavours of these to allow setting the address of the device in the
guest as well.
Fixes: #1475
While trying to use the steps provided in the `Additional Notes for Fedora and
Similar Linux Distributions` I noticed that some of the versions referenced
there were not up-to-date, as well as a missing script call for the krb5.
Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com>
Using `autoload` fairly consistently results in 'constant not defined'
errors for each of HandleBox, SyncedFolders, WaitForCommunicator
when using ruby 3.1. Presumably there's some sort of race condition.
Explicitly using `require` for these three makes the problem go away.
It might be a bit ugly to have those `require` lines right at the
point where those symbols are used, vs. the neat `autoload` section
at the top of the file, but I'm not sure how better to structure this.
Suggestions most welcome :-)
Fixes: #1445
Signed-off-by: Tim Serong <tserong@suse.com>
Provisioning is executed on the out-call action, so it should be added
the call start before the configuration of the network interfaces is
scheduled via a guest capability as it is also executed out the out call
to allow the first part to be performed before the VM is booted and the
latter to be done after it is running.
Fixes: #1479
Avoid crash caused by power management suspension where fog fails to translate domain state pmsuspended.
Changed the driver.state() function so that it does not crash on undefined domain state. Just return nil :unknown instead.
Added unittests and made existing more general.
Closes#1472
Switch to the command as an array format when passing the port
forwarding ssh command to spawn to switch to execution of the ssh
process directly instead of being executed by the default shell.
Fixes: #1467