Commit Graph

318 Commits

Author SHA1 Message Date
Darragh Bailey
82202945ce Migrate documentation to github pages (#1523)
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.
2022-07-19 13:48:02 +00:00
Darragh Bailey
c5ed4bd89c Ensure disk controller passed to create domain (#1520)
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.
2022-06-25 15:48:05 +01:00
Rodolfo Olivieri
7233c85504 Add support for snapshots (#1456)
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
2022-06-03 09:34:35 +00:00
Rodolfo Olivieri
1939528d7b Update steps in the addtional notes (#1486)
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>
2022-05-04 08:30:58 +00:00
Darragh Bailey
0f4a97e1dd From docker only output vagrant to stdout (#1464)
When running the docker container, only output what is returned by
vagrant to stdout, and redirect everything else to stderr to facilitate
anything parsing stdout.

Fixes: #1463
2022-03-12 17:41:27 +00:00
Alex
1b8a70163b Update README.md (#1458) 2022-03-03 16:45:46 +00:00
Andres Romanos
d11f0baca4 Update README.md (#1441)
Fixed USB Device Passthrough example.

It should use libvirt.usb instead of libvirt.usbdev
2022-02-02 10:19:45 +00:00
Ruben Kerkhof
a9e0fefa1d Change the default amount of video ram to 16MB (#1435)
Libvirt did already change the current 9216kb
to 16384kb when starting a domain so in practice this is a no-op.

The libvirt default was changed in 2014 in 81ba2298b2
2022-01-17 14:10:23 +00:00
blame2020
a1f0b74e92 Fix snippets about podman in README.md (#1427) 2022-01-05 04:10:06 +00:00
Stefano Sasso
76544f0412 Add management_network_keep Option (#1425)
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.
2021-12-21 12:45:33 +00:00
andrzej maczuga
2d53c3a850 Support libvirt built-in TFTP server (#1412)
Adds support for libvirt TFTP server, for netboot environments.

(vide: https://libvirt.org/formatnetwork.html#elementsAddress)
2021-11-30 10:11:52 +00:00
Darragh Bailey
cf3b81bfc5 Inject default qemu_agent allowing for explicit disable (#1408)
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
2021-11-26 18:12:21 +00:00
Darragh Bailey
caaf7754c4 Add gem version badge (#1395) 2021-11-04 12:48:37 +00:00
Aleksandr Mezin
dcbfea2f49 Add options for 3d acceleration (#1386)
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: #893
Fixes: #1009
2021-10-26 10:11:30 +01:00
Darragh Bailey
6c9ec5a190 Update podman instructions to mount tmp (#1388)
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
2021-10-22 17:47:16 +01:00
Scott Walkinshaw
b97c548e6d Replace Travis references in README (#1387)
Updates them with the GitHub actions equivalents
2021-10-21 08:28:57 +00:00
Itxaka
b771048f0e Add basic support to control serial console settings (#1385)
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>
2021-10-19 14:37:46 +00:00
Jamie Barber
d5971f894f Add a :libvirt__always_destroy flag to network definitions (#1381)
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.
2021-10-19 14:52:54 +01:00
AverageHumanoid
64c096b040 Document running using Podman (#1359)
Closes: #1357
2021-09-30 12:24:47 +00:00
Darragh Bailey
de4721f62e Ensure sensible default USB controller model used (#1362)
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
2021-09-27 16:49:15 +01:00
ma
6c5ecf09af Retrieve IP Address of management interface using qemu-guest-agent commands #1341 2021-09-22 11:41:19 +02:00
Darragh Bailey
4feb0424cd Bump vagrant version and update README (#1321)
Update to the latest vagrant release and adjust README to align for
latest changes for the docker container.
2021-07-01 10:53:50 +01:00
Darragh Bailey
1f51841678 Use working directory for user/group resolution (#1320)
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: #1191
Closes: #1254
2021-06-30 17:56:09 +01:00
Darragh Bailey
192eefcfbf Default to build and publish extendible image (#1246)
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
2021-06-25 19:28:17 +01:00
s-vx
e6c68358cf Fix minor typo in README.md 2021-06-04 13:10:53 -04:00
Darragh Bailey
31cc8aa91e Add basic vagrant package integration test (#1302)
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.
2021-06-01 17:45:02 +01:00
Rui Lopes
c96364575a add pxe boot public_network example 2021-05-27 07:42:04 +01:00
Darragh Bailey
7ce85f2216 Make disks attribute path required check for name collisions (#1293)
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.
2021-05-22 16:59:11 +01:00
Darragh Bailey
981642afeb Invert forward ssh port behaviour (#1289)
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
2021-05-18 18:30:56 +01:00
Matthias Blümel
07391048af Enable forward ssh-port to host
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: #1011
Closes: #1012
2021-05-16 19:55:54 +01:00
Darragh Bailey
14b57df49d Improve the development instructions (#1282)
Add some details to ensure correct execution of the rspec tests locally.

Closes: #1064
2021-05-15 14:47:05 +01:00
Zdenek Zambersky
3b1b17a5c9 Add support for spinlocks hyperv feature 2021-05-12 20:50:23 +02:00
Wong Hoi Sing Edison
e2766d563e Add virtiofs Support to vagrant-libvirt
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>
2021-04-17 11:20:34 +00:00
Jacek Tomasiak
8f65aec9eb Add option to set management network MTU (#1233)
This adds option to specify non-standard MTU for created management
network.
2021-04-06 14:25:14 +00:00
Darragh Bailey
3d35c52372 Replace obsolete usage of Vagrant.require_plugin (#1234)
Fixes #509
2021-03-22 11:51:41 +00:00
Darragh Bailey
a16c3f7898 Move proxy_command to config and support templating (#1226)
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
2021-03-21 15:19:53 +00:00
Darragh Bailey
4ee40728b3 Make LIBVIRT_DEFAULT_URI a fackball mechanism (#1223)
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.
2021-03-17 14:41:14 +00:00
Nick Maludy
1db7db2410 Added notes on how to download source RPMS for CentOS 8 stream (#1213)
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.
2021-03-13 15:15:52 +00:00
Darragh Bailey
48c1a55153 Use correct shell variable for options pass-thru (#1197)
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.
2021-01-06 10:48:22 +00:00
pgillich
441bcc24bf Improving Docker based Installation (#1194)
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.
2021-01-05 10:35:20 +00:00
David Scaife
5471caabe5 Add disk driver options with minor refactor (#1000)
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
2020-12-17 11:03:47 +00:00
zzambers
d0787c803d Add support for clock setup (#1047)
This adds support for setting clock offset and timers.

See https://libvirt.org/formatdomain.html#elementsTime for more info.
2020-12-16 19:19:24 +00:00
Darragh Bailey
92964823d0 Update TOC with recent additions (#1189)
Trigger a refresh on the TOC to pick up recent additions.
2020-12-16 13:14:22 +00:00
Edmund Rhudy
a11750cc3b Add support for configuring memballoon-related settings (#1083)
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.
2020-12-15 17:40:05 +00:00
Jason Tarasovic
1251189145 Add ability to use emulated tpm (#1166)
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
2020-12-15 12:43:46 +00:00
Darragh Bailey
c12b0de254 Add doc on ssh key replacement if repackaging (#1169)
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
2020-11-17 19:31:19 +00:00
IPv4v6
f91e1784ff Add forward mode 'open' to README (#1118)
Document forward mode 'open' as this is passed to libvirt to handle.
2020-11-16 16:45:09 +00:00
Michael Ablassmeier
027910d236 Support setting ovs interface id (#1156)
Support setting the ovs interfaceid parameter

Fixes: #1155
2020-11-16 15:11:59 +00:00
Brad Smith
b2b40e1149 Additional install notes for Fedora (#1107)
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.
2020-11-16 15:03:30 +00:00
Radix10
8f37a78290 fix typo (#1154) 2020-10-09 09:53:59 +01:00