Commit Graph

13 Commits

Author SHA1 Message Date
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
Darragh Bailey
37597e22f9
Add action to resolve disk settings (#1502)
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
2022-06-02 19:09:18 +01:00
Guillaume Penaud
9c18a32952 Allow usage of public/private networks as management networks
This requires that the qemu_use_agent is enabled and at least one
network is defined in the Vagrantfile that is either private or public.

The restriction that qemu_use_agent need be enabled may be removed
subsequently for networks using a static IP address. That should be
considered a subsequent problem.

Fixes: #1204
Fixes: #1124
Fixes: #1057
2021-11-29 17:32:25 +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
ma
6c5ecf09af Retrieve IP Address of management interface using qemu-guest-agent commands #1341 2021-09-22 11:41:19 +02:00
Darragh Bailey
18ebb9d9ed
Enable frozen string across project (#1319)
Turn on frozen string support in all files by using a comment to avoid
enabling across dependencies where it may not work.

Fixes: #1177
2021-06-30 13:27:03 +01:00
Darragh Bailey
1174685e7b
Basic packaging tests and restructure action (#1307)
Restructure action to remove custom handling around packaging of the
box and instead use more of the built-in provided actions instead.

Includes some packaging tests to cover both simple where the public
key is retained (can't modify the tinycore VM without more complex
provisioning steps), and a more complex one that utilizes a script
and supports triggering regenerating the hosts on subsequent boots.

The use of the upstream packaging helpers means that when the
default insecure ssh key has been replaced, the packaging process
will automatically include the generated key.

Fixes: #759
Fixes: #765
Fixes: #1013
Fixes: #994
2021-06-25 20:01:02 +01:00
Richard Turc
00cd79aa35 Use qemu-img json output and compute virtual size #1308 2021-06-11 16:38:35 +02: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
Darragh Bailey
dbbfad2503
Generate test matrix dynamically from bats (#1303)
Extract the tests to be run and generate the matrix dynamically to avoid
needing to update the list within the workflow for each test added.
2021-06-01 17:21:15 +01:00
Darragh Bailey
9d70d261b4
Corrections to two test testing tool (#1276)
Ensure the two disk test tool is used to ensure any tweaks to the format
made to the script are exercised.
2021-05-14 19:11:33 +01:00
Richard Turc
225237b125 Allow to use many disks in vagrant box for libvirt provider
Adds support for a new multi disk box format and handling to upload the
multiple disks to the storage pool.

New format is:
{
  'disks': [
    {
      'name': 'disk1.img',
      'virtual_size': 10,
      'format': 'qcow2'
    },
    {
      'name': 'disk2.img',
      'virtual_size': 15,
      'format': 'qcow2'
    },
    {
      'name': 'disk3.img',
    }
  ],
  'provider': 'libvirt',
  'format': 'qcow2'
}

It is expected to remove format from being set at the top level when
using the new format, with the assuming that qcow2 should be the default
format, and other formats should be permitted to be specified as needed.

Includes tests for handling the box images and creation of domain
volumes. Additionally includes an integration test to ensure a box with
2 disks will work as expected.

Partially fixes: #602
2021-05-08 17:04:10 +01:00
Michael Ablassmeier
97ea81d2be
Use Github actions for integration tests against Vagrant-libvirt (#1091)
Allows to spin up vagrant boxes via vagrant-libvirt in CI replacing the 
need for vagrant-libvirt-qa to be executed separately before/after 
releases.

* Adds a github integration tests workflow
* Installs the needed toolset in separate groups for easier tracking
* Add Vagrantfile definitions for the first simple test cases in tests/ 
  using tinycore linux, using the installed master version these boxes 
  are spun up and destroyed via a test matrix.

Should help reduce effort for new maintainers to help with #1069
2021-03-21 12:06:52 +00:00