Commit Graph

499 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
70b15c2eae
qvm-volume: refuse to shrink volume unless --force option is used
Right now Admin API backend will refuse to shrink volume anyway, but
we're planning to relax this restriction. Make sure the client side
(qvm-volume tool here, GUI VM settings already have this in place) will
employ appropriate safety check.

QubesOS/qubes-issues#3725
2018-03-20 17:53:36 +01:00
Marek Marczykowski-Górecki
25803fd6af
doc: update qvm-volume parameters
Use *VMNAME:VOLUME* instead of *POOL_NAME:VOLUME_ID*, because this is
the default form.
2018-03-20 16:51:04 +01:00
Marek Marczykowski-Górecki
4638a019e5
storage: make Pool.{size,usage} integers
And return None (instead of raising KeyError) when pool driver
does not provide such information.
2018-03-20 16:50:56 +01:00
Marek Marczykowski-Górecki
96a32bd096
qvm-template-postprocess: do not remove VM on failed reinstall
If root volume import fails on template reinstall, do not remove it -
keep it alone, with old volume content

QubesOS/qubes-issues#3169
2018-03-19 20:47:16 +01:00
Marek Marczykowski-Górecki
562137c36d
qvm-template-postprocess: resize volume only when needed
If needs to be extended - do it before import. If needs to be reduced -
after. This way, if data import fails for any reason, previous data
won't be destroyed (truncated).
Also, convert error on shrinking volume to a warning, as it doesn't break
the template (just leave it with bigger disk than needed). Currently all
storage pool implementations refuse to shrink a volume (but it may
change in the future).

QubesOS/qubes-issues#3169
2018-03-19 20:47:15 +01:00
Marek Marczykowski-Górecki
034e9b3a24
qvm-volume: add 'info' and 'config' actions
This allows to get and set volumes properties.

Fixes QubesOS/qubes-issues#3256
2018-03-18 23:38:10 +01:00
Marek Marczykowski-Górecki
6ca54e18a3
tools: suppress full traceback in console tools
QubesException class is used with meaningful messages and should be ok
to use it directly as error message. For other exceptions, still use
full traceback (most likely a bug somewhere, not user error).

Fixes QubesOS/qubes-issues#3610
2018-03-18 21:38:49 +01:00
Marek Marczykowski-Górecki
c70e440a6c
tools: add SubParsersHelpAction, which include subcommands details in --help 2018-03-18 21:38:31 +01:00
Marek Marczykowski-Górecki
b57b101b04
storage: add 'rw' and 'revision_to_keep' setters
QubesOS/qubes-issues#3256
2018-03-18 17:00:39 +01:00
Marek Marczykowski-Górecki
b9b9eb1f3b
doc: fix module index generation
Result of `sphinx-apidoc qubesadmin`
2018-03-07 01:34:42 +01:00
Marek Marczykowski-Górecki
4904d2a360
doc: typos 2018-03-07 00:34:54 +01:00
Marek Marczykowski-Górecki
7439353031
version 4.0.15 2018-03-04 03:54:39 +01:00
Marek Marczykowski-Górecki
b1237bfe1f
tests: add tests for various 'qvm-prefs vm pref' cases 2018-03-04 03:43:07 +01:00
Marek Marczykowski-Górecki
2459b8108b
tools/qvm-prefs: fix printing None value
Don't print None value as 'None' string, but as empty one (same as at
API level). Otherwise it is indistinguishable from VM named 'None', or
same string property value.
2018-03-04 03:43:06 +01:00
Marek Marczykowski-Górecki
4a9b57f91f
qvm-template-postprocess: call fstrim after removing image file
This is especially important on LVM thin pool, where space after
removing the file needs to be given back to the pool, to be reused for
other volumes (for example this template).
2018-03-04 03:43:06 +01:00
Marek Marczykowski-Górecki
090cccd468
Merge remote-tracking branch 'qubesos/pr/56'
* qubesos/pr/56:
  qvm-backup-restore: also handle absent --ignore-missing
2018-02-27 02:32:37 +01:00
Marek Marczykowski-Górecki
9bf404f7bf
tools: terminate qvm-start-gui when X server is terminated
qvm-start-gui lifecycle should be bound to X server lifecycle. It should
be restarted when user logoff and login again, at least to start
gui-daemons again.
Do that by opening a connection to X server and reacting to breaking
that socket.

Fixes QubesOS/qubes-issues#3147
2018-02-26 22:11:25 +01:00
Rusty Bird
cf063a9638
qvm-backup-restore: also handle absent --ignore-missing
This was forgotten in 2d8bade.
2018-02-26 04:10:05 +00:00
Marek Marczykowski-Górecki
aea2dc0790
Merge remote-tracking branch 'qubesos/pr/54'
* qubesos/pr/54:
  Add support for python34-sphinx: package is provided in Qubes repository
2018-02-26 03:39:51 +01:00
Marek Marczykowski-Górecki
fceb7ff7c0
Merge remote-tracking branch 'qubesos/pr/55'
* qubesos/pr/55:
  restore.py: add template-related debug log messages
  restory.py: restore template_for_dispvms property early
  restore.py: factor out _restore_property() helper
  restore.py: deal with DispVM templates
  restore.py: sort into three tiers in _templates_first()
  restore.py: don't try to restore dispid property
  qvm-backup: let backup core handle default VM selection
  qvm-backup-restore: really pass options
  qvm-backup-restore: remove orphaned --replace-template option
2018-02-25 01:35:09 +01:00
Marek Marczykowski-Górecki
70ac72b579
doc: add 'pci-e820-host' feature description 2018-02-25 00:13:27 +01:00
Rusty Bird
0171269138
restore.py: add template-related debug log messages 2018-02-24 12:43:42 +00:00
Rusty Bird
ab65338cfb
restory.py: restore template_for_dispvms property early 2018-02-24 12:43:42 +00:00
Rusty Bird
c86b731d3e
restore.py: factor out _restore_property() helper 2018-02-24 12:43:42 +00:00
Rusty Bird
2ace32bb73
restore.py: deal with DispVM templates 2018-02-24 12:43:42 +00:00
Rusty Bird
68c8b7fafc
restore.py: sort into three tiers in _templates_first() 2018-02-24 12:43:42 +00:00
Rusty Bird
01ce5387d3
restore.py: don't try to restore dispid property 2018-02-23 17:15:20 +00:00
Rusty Bird
78571898da
qvm-backup: let backup core handle default VM selection
This takes the include_in_backups property into account, and does not
omit dom0.
2018-02-23 02:09:06 +00:00
Rusty Bird
2d8bade8b2
qvm-backup-restore: really pass options 2018-02-23 02:09:04 +00:00
Rusty Bird
a0d6327532
qvm-backup-restore: remove orphaned --replace-template option 2018-02-23 02:09:03 +00:00
Frédéric Pierret
3b8fec933a
Add support for python34-sphinx: package is provided in Qubes repository 2018-02-21 21:58:39 +01:00
Marek Marczykowski-Górecki
26a96fd034
version 4.0.14 2018-02-14 04:46:52 +01:00
Marek Marczykowski-Górecki
5a4577417f
Merge remote-tracking branch 'qubesos/pr/53'
* qubesos/pr/53:
  template-postprocess: fast path for file-reflink, like file
2018-02-14 04:45:59 +01:00
Marek Marczykowski-Górecki
d07475427f
Merge remote-tracking branch 'qubesos/pr/52'
* qubesos/pr/52:
  backup: don't crash when no 'qubes' group is present
  tests: dom0 backup restore, both v3 and v4
  backup: add support for openssl 1.1.0 options
  backup: skip dom0's properties while restoring core2 backup
  unused variable
  style issues
  Fix dom0 restore
  Fix dom0 handling
  Fix AdminVm class name
2018-02-14 04:45:12 +01:00
Marek Marczykowski-Górecki
56dc984507
backup: don't crash when no 'qubes' group is present
This is specifically the case on Travis-CI. But since dom0 backup is
restored into separate directory now, instead of directly overriding
user home, this check is much less relevant now.
2018-02-14 04:28:23 +01:00
Marek Marczykowski-Górecki
060171f19f
tests: dom0 backup restore, both v3 and v4
QubesOS/qubes-issues#3467
2018-02-14 04:28:23 +01:00
Marek Marczykowski-Górecki
a821034653
backup: add support for openssl 1.1.0 options
The command for listing available algorithms have changed:
old: openssl list-message-digest-algorithms
new: openssl list -digest-algorithms
2018-02-14 04:28:23 +01:00
Marek Marczykowski-Górecki
04635e7e80
backup: skip dom0's properties while restoring core2 backup
Fixes QubesOS/qubes-issues#3467
2018-02-14 04:28:22 +01:00
Marek Marczykowski-Górecki
24cfb4a581
vm: restore force_shutdown->kill deprecated alias
Apparently there are still users of this function - qubes manager.
2018-02-13 19:01:29 +01:00
Rusty Bird
e6466c3783
template-postprocess: fast path for file-reflink, like file
I don't know if any template currently hits this code path, even the
fedora-26-minimal root.img is large enough to be split into multiple
parts. Maybe Arch Linux?

Related to https://github.com/QubesOS/qubes-core-admin/pull/188
2018-02-12 21:51:01 +00:00
Christopher Laprise
e81c2f3cf6
unused variable 2018-02-01 23:20:31 -05:00
Christopher Laprise
e3d12fb96d
style issues 2018-02-01 23:00:06 -05:00
Christopher Laprise
30dd7acaa9
Fix dom0 restore 2018-02-01 22:21:24 -05:00
Christopher Laprise
60bfd63a25
Fix dom0 handling 2018-02-01 19:40:42 -05:00
Christopher Laprise
4b46d59179
Fix AdminVm class name 2018-01-24 20:42:15 -05:00
Marek Marczykowski-Górecki
7f286766d0
version 4.0.13 2018-01-18 21:06:36 +01:00
Marek Marczykowski-Górecki
2861d46dfa
backup/restore: do not shrink volumes on restore
This operation is blocked in current storage pool implementations.
2018-01-18 19:09:38 +01:00
Marek Marczykowski-Górecki
7211c7daff
storage: add size and usage properties
It's already available in config dict, but lets provide uniform API. And
also it's a bit weird to look for usage data in configuration...

QubesOS/qubes-issues#3240
2018-01-17 16:21:11 +01:00
Marek Marczykowski-Górecki
3d4f626515
Merge remote-tracking branch 'qubesos/pr/51'
* qubesos/pr/51:
  qvm-run: wait for X11 in --dispvm --gui case
  vm/DispVM: use 'qrexec_timeout' also for call connection timeout
2018-01-15 03:23:54 +01:00
Marek Marczykowski-Górecki
4a28c560d9
Merge remote-tracking branch 'qubesos/pr/50'
* qubesos/pr/50:
  Add property_get_default method
2018-01-15 03:23:00 +01:00