Commit Graph

6043 Commits

Author SHA1 Message Date
Demi Marie Obenour
e53d040051
Re-add dirty check in case qubesd is restarted 2020-11-25 13:33:32 -05:00
Demi Marie Obenour
e4854df42f
File volumes are started NAND exported
So add a lock to ensure this.
2020-11-25 13:25:57 -05:00
Demi Marie Obenour
14e9154e4e
file pool: snapshotting dirty volume not supported
Raise a NotImplementedError rather than risking corruption.
2020-11-24 19:15:25 -05:00
Demi Marie Obenour
cee8201989
Always snapshot in the FILE pool
We must snapshot a VM’s disk before exporting it.  Otherwise, we will
likely corrupt the VM’s filesystem.

Fixes https://github.com/QubesOS/qubes-issues/issues/4324
2020-11-20 16:50:56 -05:00
Marek Marczykowski-Górecki
2c8057c43a
gitlab-ci: add tests job
- run tests in a vm runner to have LVM and loop devices access
- upload coverage data via wrapper to extract PR number
2020-11-18 05:47:50 +01:00
Marek Marczykowski-Górecki
a40344252a
rpm: fix %if syntax
rpm in fedora-33 complains about not quoted strings:

    error: bare words are no longer supported, please use "...":  xxen == xxen
2020-11-17 23:06:46 +01:00
Frédéric Pierret (fepitre)
a21783e5f6
Add .gitlab-ci.yml 2020-11-15 23:31:36 +01:00
Marek Marczykowski-Górecki
8f38753bdb
Re-enable SMAP for VMs
Buggy Linux version is no longer present in any supported template (the
last one was Debian jessie).

QubesOS/qubes-issues#2881
2020-11-05 05:28:39 +01:00
Marek Marczykowski-Górecki
8b4a4a72b4
drop old workaround kernelopts
- nopat - added when PAT in Linux+Xen was buggy, no longer the case for a
long time.
- iommu=soft swiotlb=8192 - necessary to limit required memory on PV with
PCI devices; since we use HVM now (with proper IOMMU translation), this
is no longer needed. Furthermore, it will free some memory in sys-* vms.
2020-11-01 18:10:52 +01:00
Marek Marczykowski-Górecki
e4a8caaaa2
version 4.1.16 2020-10-10 05:09:34 +02:00
Marek Marczykowski-Górecki
7ffa7564cf
Merge remote-tracking branch 'origin/pr/369'
* origin/pr/369:
  ext: support for non-service feature advertisement
2020-10-10 03:33:09 +02:00
Marek Marczykowski-Górecki
bdd1184a3a
Merge remote-tracking branch 'origin/pr/367'
* origin/pr/367:
  gui: add --all and --dom0 to qubes-input-trigger script
  gui: adapt trigger for dom0 input devices
  gui: trigger services start for ps2 devices
2020-09-30 02:10:39 +02:00
Frédéric Pierret (fepitre)
7ee877caa0 gui: add --all and --dom0 to qubes-input-trigger script 2020-09-26 14:36:21 +02:00
Marek Marczykowski-Górecki
bc26e74339
ext: support for non-service feature advertisement
Add an API for VMs to announce support for non-service features. This is
very similar to supported-service.* features, but applies to non-service
features. This may be also used for announcing support for features that
do not use qvm-features framework itself - for example some VM kernel
features, installed drivers, packages etc.

QubesOS/qubes-issues#6030
2020-09-23 01:16:38 +02:00
Frédéric Pierret (fepitre)
f744d89803
gui: adapt trigger for dom0 input devices 2020-09-21 14:10:14 +02:00
herypt
67faa7c1f9
Add apparmor=1 security=apparmor to kernelopts if apparmor feature is set 2020-09-02 15:09:13 +02:00
herypt
80ecee51db
Set apparmor feature when template advertises support for it 2020-09-02 15:07:30 +02:00
Frédéric Pierret (fepitre)
480aeee9de
gui: trigger services start for ps2 devices 2020-08-30 23:27:17 +02:00
Marek Marczykowski-Górecki
1500ed8fcb
Make pylint happy
- ignore raise-missing-from
- fix super-with-arguments
2020-08-23 02:55:40 +02:00
Marta Marczykowska-Górecka
6b9528316f
Replaced error on nonexisting label name with a more descriptive one
Instead of unintuitive Value Error now we have dedicated QubesLabelNotFoundError.
Goal: to make qvm-prefs be less strange when one mixes up gray and grey again.
2020-08-23 01:58:43 +02:00
Marta Marczykowska-Górecka
b506586089
Fixed grey label color value causing accidental green icons
fixes QubesOS/qubes-issues#3471
2020-08-23 01:58:43 +02:00
Marek Marczykowski-Górecki
66d8a78481
version 4.1.15 2020-08-12 02:43:42 +02:00
Marek Marczykowski-Górecki
ed5b908371
tests: fix duplicated entries in TestVMsCollection
Deduplicate entries when iterating over TestVMsCollection values. Some
tests add given VM multiple times, to have it available under different
kind of keys (name, uuid etc) - similar to the real VMsCollection.
2020-08-12 02:01:31 +02:00
Marek Marczykowski-Górecki
24e0ddd7ab
Merge remote-tracking branch 'origin/pr/365'
* origin/pr/365:
  Added icon property to AdminVM
2020-08-12 01:26:29 +02:00
Marek Marczykowski-Górecki
f2b047c47e
Merge remote-tracking branch 'origin/pr/254'
* origin/pr/254:
  vm: allow StandaloneVM to be a DVM template
  vm: do not allow setting template_for_dispvms=False if there are any DispVMs
  vm: move DVM template specific code into separate mixin
2020-08-12 01:25:57 +02:00
Marek Marczykowski-Górecki
74725b584a
Merge branch 'test-fixes20200806'
* test-fixes20200806:
  tests/extra: add vm.run(..., gui=) argument
  tests: collect detailed diagnostics on failure
  tests: workaround a race in qrexec test
  tests: fix audio recording test
  tests: make qvm-sync-clock test more reliable
2020-08-12 01:25:27 +02:00
Marek Marczykowski-Górecki
c425df6c57
tests/extra: add vm.run(..., gui=) argument
A convenient (and compatible) option to wait for user session before
starting the command.
2020-08-11 02:04:32 +02:00
Marek Marczykowski-Górecki
46cc4ca910
tests: collect detailed diagnostics on failure
Help debugging test failures by collecting detailed information on
failure. It will be logger to the standard logger, which will end up
either on stderr or in journalctl.
2020-08-08 20:36:42 +02:00
Marek Marczykowski-Górecki
8b076dfe5f
tests: workaround a race in qrexec test
qrexec-client-vm may return earlier than it's child process (it exits
right away, without waiting for its child). Add a small wait before
reading exit code from a file.
2020-08-08 19:22:26 +02:00
Marek Marczykowski-Górecki
6d50546bd0
Merge branch 'paranoid-restore'
* paranoid-restore:
  tests: paranoid backup restore
  Add policy for paranoid mode backup restore
  Add an extension preventing starting a VM while it's being restored
  Add support for 'tag-created-vm-with' feature
2020-08-07 02:02:32 +02:00
Marek Marczykowski-Górecki
1abf949faf
tests: fix audio recording test
To calculate frequency it needs to use samples per second (44100), not
samples pre recording lenght. This caused shorter recordings to not fit
into the margin.
2020-08-07 01:55:10 +02:00
Marta Marczykowska-Górecka
ebb1cf6e78
Added icon property to AdminVM
To provide greater visual distinctiveness to AdminVMs, now they will
have their own icons.

requires https://github.com/QubesOS/qubes-artwork/pull/20
fixes QubesOS/qubes-issues#3853
2020-08-06 21:40:07 +02:00
Marek Marczykowski-Górecki
2a1e5a2af9
Merge remote-tracking branch 'origin/pr/363'
* origin/pr/363:
  vm/adminvm: adjust exception raised by AdminVM.start()
2020-08-06 05:42:07 +02:00
Marek Marczykowski-Górecki
512ff8e8b8
Merge remote-tracking branch 'origin/pr/362'
* origin/pr/362:
  Fixed property-reset event not firing for default_dispvm global property
2020-08-06 05:41:30 +02:00
Marek Marczykowski-Górecki
117724a772
tests: paranoid backup restore
QubesOS/qubes-issues#5310
2020-08-06 04:23:04 +02:00
Marek Marczykowski-Górecki
e73320533f
Add policy for paranoid mode backup restore
Policy allows a VM with 'backup-restore-mgmt' tag to create VMs, and
then manage VMs with 'backup-restore-in-progress' tag (which is added by
AdminExtension, based on 'tag-created-vm-with' feature).

VM with 'backup-restore-mgmt' tag can also call qubes.RestoreById
service to a VM with 'backup-restore-storage' tag. This service allows
to retrieve backup archive.

QubesOS/qubes-issues#5310
2020-08-06 04:23:03 +02:00
Marek Marczykowski-Górecki
3815e0b5cf
tests: make qvm-sync-clock test more reliable
Compare the time with the "current" time retrieved from ClockVM just
before comparing, not with the test start time. This should work even if
the test machine is quite slow (test taking more than 30s).
2020-08-06 03:27:40 +02:00
Marek Marczykowski-Górecki
0eb458109c
vm/adminvm: adjust exception raised by AdminVM.start()
Behave like any other running domain - raise
qubes.exc.QubesVMNotHaltedError instead of generic
qubes.exc.QubesVMError.
2020-08-05 04:38:59 +02:00
Marta Marczykowska-Górecka
f35a7a78b3
Fixed property-reset event not firing for default_dispvm global property
fixes QubesOS/qubes-issues#5977
2020-08-03 22:12:02 +02:00
Marek Marczykowski-Górecki
2cdba05c99
Add an extension preventing starting a VM while it's being restored
Do not allow starting a VM while the restoring management VM has still
control over it. Specifically, that restoring VM will not be able to
start just restored VM.

QubesOS/qubes-issues#5310
2020-08-03 04:38:11 +02:00
Marek Marczykowski-Górecki
6f87f310db
Add support for 'tag-created-vm-with' feature
When a VM with 'tag-created-vm-with' feature set creates a VM (using
Admin API), that VM will get all the tags listed in the feature.
Multiple tags can be separated with spaces.

This will be useful to tag VMs created during paranoid mode backup
restore.

QubesOS/qubes-issues#5310
2020-08-03 04:38:11 +02:00
Paweł Marczewski
4acf69e8ec
Add power state to get_system_info
For qrexec policy, to implement 'autostart'
(see QubesOS/qubes-issues#5952).
2020-07-23 13:32:16 +02:00
Marek Marczykowski-Górecki
784878f1f7
Merge remote-tracking branch 'origin/pr/359'
* origin/pr/359:
  Add tests for vm.volume.Clear.
  Use self.dest.storage.import* wrappers instead.
  Add admin.vm.volume.Clear call (QubesOS/qubes-issues#5946)
2020-07-16 03:44:46 +02:00
WillyPillow
be69d8ddb7
Add tests for vm.volume.Clear. 2020-07-16 00:39:16 +08:00
WillyPillow
56fbf108f8
Use self.dest.storage.import* wrappers instead. 2020-07-16 00:38:02 +08:00
Marek Marczykowski-Górecki
1d3df07de6
version 4.1.14 2020-07-15 16:46:51 +02:00
Marek Marczykowski-Górecki
f30eebc40e
Merge branch 'devel20200705'
* devel20200705:
  tests: skip gnome-terminal on xfce template flavor
  tests: fix FD leak in qrexec test
  tests: switch default LVM pool to qubes_dom0/vm-pool
  backup: fix error handler for scrypt errors
  Adjust code for possibly coroutine Volume.export() and Volume.export_end()
  storage: add Volume.export_end() function
  backup: add support for calling a function after backing up a file/volume
  backup: call volume.export() just before actually extracting it
  vm/dispvm: place all volumes in the same pool as DispVM's template
  tests: extend TestPool storage driver to make create_on_disk working
  storage: pass a copy of volume_config to pool.init_volume
  tests: cleanup properly in wait_on_fail decorator
2020-07-15 16:22:08 +02:00
Marek Marczykowski-Górecki
01b33e58d7
Merge remote-tracking branch 'origin/pr/350'
* origin/pr/350:
  Changed feature keyboard_layout to a property
2020-07-15 16:21:38 +02:00
Marek Marczykowski-Górecki
6adf56f4ba
Merge remote-tracking branch 'origin/pr/355'
* origin/pr/355:
  Removed unused vm.icon_path property
2020-07-15 16:19:53 +02:00
Marek Marczykowski-Górecki
4c0f8bc24c
tests: skip gnome-terminal on xfce template flavor
It isn't installed there.
2020-07-14 20:17:41 +02:00