Commit Graph

3299 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
baffef0ef0
tests: fix qvm-move-to-vm error code checking
Currently error code is 28 (ENOSPC). But generally any non-zero is
expected result here.

Fix test for QubesOS/qubes-issues#1355
2016-01-07 05:48:33 +01:00
Marek Marczykowski-Górecki
24ad20cfe6
tests: add a simple dom0 backup test
Regression test for:
QubesOS/qubes-issues#1515

It assumes existing broken symlink in user dom0 home. Thanks for systemd
it is the case (`~/.local/share/systemd/user`).
2016-01-07 05:48:33 +01:00
Marek Marczykowski-Górecki
ba3b908b73
backup: do not dereference symlinks in dom0 user home backup
Symlinks there should be preserved. Additionally broken symlink would
cause the backup to fail.

Fixes QubesOS/qubes-issues#1515
2016-01-07 05:48:33 +01:00
Marek Marczykowski-Górecki
530a79417f
Add some logging to ease debugging libvirt errors
Temporary add some more logging to ease debugging libvirt errors.
Unfortunatelly stack trace doesn't contain actual error.

QubesOS/qubes-issues#1537
2016-01-07 05:48:33 +01:00
Marek Marczykowski-Górecki
4af5a0503d
tests: qvm-revert-template-changes
Regression test for:
QubesOS/qubes-issues#1573
2016-01-07 05:48:32 +01:00
Marek Marczykowski-Górecki
f977858610
minor: add missing coding declaration 2016-01-07 05:48:32 +01:00
Marek Marczykowski-Górecki
35cb82cd2b
storage: use root-cow.img for HVM template, to support reverting changes
We still can't support running HVM template and its VMs simultaneously
(easily), but still, have root-cow.img handled for HVM template, to
allow qvm-revert-template-changes.

Fixes QubesOS/qubes-issues#1573
2016-01-07 05:48:32 +01:00
Marek Marczykowski-Górecki
fa196f1350
storage: actually use storage.root_img and such properties
Actual VM root disk used hardcoded image names, instead of properties
set for that purpose...
2016-01-07 05:48:32 +01:00
Marek Marczykowski-Górecki
b26f2a73b4
core: mark QubesTemplateHVm.rootcow_img as property
Add missing '@property'.

QubesOS/qubes-issues#1573
2016-01-07 05:48:32 +01:00
Bahtiar `kalkin-` Gadimov
fdd618b420
Move xen storage tests to own file
This allows to run just the general storage tests without all the slow xen
storage based tests.
2016-01-07 05:48:32 +01:00
Marek Marczykowski-Górecki
181eb3e764
qmemman: handle memory assigned to VM but not yet used
When VM got some memory assigned, balloon driver may not pick it up
immediatelly and the memory will still be seen as "free" by Xen, but VM
can use (request) it at any time. Qmemman needs to take care of such
memory (exclude it from "free" pool), otherwise it would redistribute it
to other domains, allowing the original domain to drain Xen memory pool.

Do this by redefining DomainState.memory_actual - it is now amount of
memory available to the VM (currently used, or possibly used). Then
calculate free memory by subtracting memory allocated but not used
(memory_target-memory_current).

Fixes QubesOS/qubes-issues#1389
2016-01-06 00:40:10 +01:00
Marek Marczykowski-Górecki
e30e802903
qmemman: add --debug option 2016-01-06 00:39:00 +01:00
Marek Marczykowski-Górecki
a78ec67071 doc: Change qvm-service name from "cron" to "crond" 2015-12-29 14:19:56 +01:00
Marek Marczykowski-Górecki
70546ac21a tests: add test for VM autostart on qrexec call 2015-12-28 01:07:48 +01:00
Marek Marczykowski-Górecki
ba0d60595e
version 3.1.8 2015-12-26 15:28:51 +01:00
Marek Marczykowski-Górecki
9809e4168e
core: log pci detach error on VM shutdown
Thanks @Rudd-O for pointing this out.
2015-12-26 14:05:21 +01:00
Marek Marczykowski-Górecki
169eac6412
systemd: do not fail qubes-vm@ service when the VM is already running
Fixes QubesOS/qubes-issues#1528
2015-12-26 11:34:40 +01:00
Marek Marczykowski-Górecki
b8e40895b3
Add qvm-start --skip-if-running option
QubesOS/qubes-issues#1528
2015-12-26 11:31:56 +01:00
Marek Marczykowski-Górecki
1b5daea771
qvm-grow-root: add --allow-start option
In some (most) cases VM needs to be started to complete resize
operation. This may be unexpected, so make it clear and do not start the
VM when the user did not explicitly allow that.

Fixes QubesOS/qubes-issues#1268
2015-12-26 04:10:20 +01:00
Marek Marczykowski-Górecki
49c1ab2f99
qvm-grow-root: wait for VM to shutdown at the end
Otherwise it could lead to some race conditions, for example when the
user tries to start some application there afterwards.

QubesOS/qubes-issues#1268
2015-12-26 04:08:12 +01:00
Marek Marczykowski-Górecki
e3e8a55c92
core: forbid 'lost+found' as VM name
When /var/lib/qubes/appvms is a mount point of ext4 filesystem, there
will be already 'lost+found' directory. Avoid this conflict.

Fixes QubesOS/qubes-issues#1440
2015-12-26 03:02:23 +01:00
Marek Marczykowski-Górecki
adb282ef8e
Implement qvm-shutdown --wait-time option
Flexible VM shutdown timeout option.

Fixes QubesOS/qubes-issues#1320
2015-12-26 02:14:28 +01:00
Marek Marczykowski-Górecki
d4a42093b1
dispvm: Start required NetVM first (if necessary)
The comment "calling VM have the same netvm" doesn't apply to:
 - DispVM started from dom0 menu
 - DispVM started from a VM with `dispvm_netvm` property modified

Fixes QubesOS/qubes-issues#1334
2015-12-23 19:24:25 +01:00
Marek Marczykowski-Górecki
a30e8d1f33
systemd: fix starting VMs _before_ allowing user login
systemd-user-sessions.service is specicically for that, do not use hack
(plymouth-quit.service), which doesn't work when the service is
disabled.

Fixes QubesOS/qubes-issues#1250
2015-12-23 19:08:01 +01:00
Marek Marczykowski-Górecki
d539bd2be1
core: preserve qrexec-timeout during VM clone
Fixes QubesOS/qubes-issues#1501
2015-12-23 19:07:18 +01:00
Bahtiar `kalkin-` Gadimov
c8d26c253e Storage refactor device config generation
- QubesVmStorage provides now a default get_config_params() method which should
  be enough for all possible Storage implementations.
- When writing a custom Storage implementation, one has just to reimplement the
  following methods:
  * root_dev_config()
  * private_dev_config()
  * volatile_dev_config()
- QubesVmStorage provides a default implementation of other_dev_config(),
  because it can be shared by all storage implementations
2015-12-22 11:24:28 +01:00
Marek Marczykowski-Górecki
ff63c5030d
version 3.1.7 2015-12-22 01:59:20 +01:00
Marek Marczykowski-Górecki
0e30678d2c
Merge remote-tracking branch 'qubesos/pr/13'
* qubesos/pr/13:
  PEP8 qvm-tools/qvm-clone
  Remove unnecessary imports from qvm-clone
  Add pool support to qvm-clone
2015-12-22 01:57:09 +01:00
Marek Marczykowski-Górecki
56e6c01917
dispvm: convert exception object to string - otherwise it will not be visible
tray_notify_error can't handle arbitrary object.

Fixes QubesOS/qubes-issues#1457
2015-12-22 01:53:53 +01:00
Bahtiar `kalkin-` Gadimov
8d3616689e PEP8 qvm-tools/qvm-clone 2015-12-07 11:03:51 +01:00
Bahtiar `kalkin-` Gadimov
65f00d8393 Remove unnecessary imports from qvm-clone 2015-12-07 10:59:44 +01:00
Bahtiar `kalkin-` Gadimov
bb754b68c3 Add pool support to qvm-clone 2015-12-07 10:50:01 +01:00
Marek Marczykowski-Górecki
bee84b83a1
version 3.1.6 2015-12-07 00:03:57 +01:00
Marek Marczykowski-Górecki
027ffedec4
core: typo fix in error handling 2015-12-07 00:03:39 +01:00
Marek Marczykowski-Górecki
36134c8c43
version 3.1.5 2015-12-06 14:37:01 +01:00
Marek Marczykowski-Górecki
3fafc5dc67
tests: fix race condition in network test
Wait for network configuration being applied before testing it.
2015-12-06 14:34:52 +01:00
Marek Marczykowski-Górecki
2658c9a6e6
core: detach PCI devices before shutting down VM
When VM is shutting down it doesn't disconnect PCI frontend (?), so when
VM is destroyed it ends up in timeouts in PCI backend shutdown (which
can't communicate with frontend at that stage). Prevent this by
detaching PCI devices while VM is still running.

Fixes QubesOS/qubes-issues#1494
Fixes QubesOS/qubes-issues#1425
2015-12-06 14:31:43 +01:00
qubesuser
9f04743388 qmemman: fix null reference bug 2015-12-05 17:25:33 +01:00
Marek Marczykowski-Górecki
f3b8fe67cc
version 3.1.4 2015-11-29 03:47:08 +01:00
Marek Marczykowski-Górecki
cda6ae8751
qvm-pci: one more fix - save changes 2015-11-28 23:03:08 +01:00
Marek Marczykowski-Górecki
28886390b4
Merge branch 'always-stubdom-guid' 2015-11-28 05:10:54 +01:00
Marek Marczykowski-Górecki
67ca619ee5
qvm-pci: fix PCI device id (BDF) regexp
Actually BDF is in hex...

Fixes QubesOS/qubes-issues#1461
2015-11-27 22:56:55 +01:00
Marek Marczykowski-Górecki
b114d291ca
Merge remote-tracking branch 'qubesos/pr/12'
* qubesos/pr/12:
  Fix circular deps workaround in Pool.vmdir_path()
  Move device names from XenStorage to QubesVmStorage
  Provide method format_disk_dev() to all storages
  Move the vmdir logic from XenPool to Pool
2015-11-27 20:00:37 +01:00
Marek Marczykowski-Górecki
280cb8fdfb
tests: custom backup compression filter
QubesOS/qubes-issues#1459
2015-11-27 20:00:34 +01:00
Marek Marczykowski-Górecki
8725bdefb0
backup: add qvm-backup --compress-filter option
Custom compression program was supported for a long time. But there was
no option to use it...

Fixes QubesOS/qubes-issues#1459
2015-11-27 20:00:34 +01:00
Marek Marczykowski-Górecki
1e48beaf6f
backup: add qvm-backup-restore --rename-conflicting option
QubesOS/qubes-issues#869
2015-11-27 20:00:34 +01:00
Marek Marczykowski-Górecki
99272132a6
tests: test case for on the fly VM rename during backup restore
QubesOS/qubes-issues#869
2015-11-27 20:00:34 +01:00
Marek Marczykowski-Górecki
24d660d61e
backup: add option to on-the-fly renaming conflicting VMs
Fixes QubesOS/qubes-issues#869
2015-11-27 20:00:34 +01:00
Marek Marczykowski-Górecki
3065431058
tests: include NetVM in basic backup tests 2015-11-27 20:00:34 +01:00
Marek Marczykowski-Górecki
377d3ad43a
rpm: do not motify /etc/udev/rules.d/xen-backend.rules anymore
Xen 4.6 no longer uses udev to call hotplug scripts.

QubesOS/qubes-issues#1361
2015-11-27 20:00:34 +01:00