Commit Graph

3500 Commits

Author SHA1 Message Date
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
Wojtek Porczyk
689dd64b0d qubes: misc pylint fixes 2015-12-29 22:04:00 +01:00
Wojtek Porczyk
bf4dbe07d5 qubes/tests/vm/qubesvm: add basic tests for QubesVM
And already one fix to instantiation.
2015-12-29 20:35:04 +01:00
Wojtek Porczyk
66475e5ca7 qubes/tests/run: Fix running foregin TestCases
This is needed, because when tests fail to load, unittest module
generates artificial „LoadTestsFailure” class -- not based on our
QubesTestCase, so it does not have .log attribute.
2015-12-29 20:08:47 +01:00
Wojtek Porczyk
13b1a7201a qubes/tests: fix tearing down QubesTestCase 2015-12-29 16:49:17 +01:00
Wojtek Porczyk
8d55bf9016 qubes/tools/qvm_run: do not colour autostart log messages 2015-12-29 14:47:37 +01:00
Marek Marczykowski-Górecki
a78ec67071 doc: Change qvm-service name from "cron" to "crond" 2015-12-29 14:19:56 +01:00
Wojtek Porczyk
69e0b94c74 Fix for UUID management
This fixes up 75c3f355db "qubes/vm/qubesvm: fix domain's UUID management".

Previously 'domain-init' was never really fired.

fixes QubesOS/qubes-issues#1557
2015-12-29 03:50:35 +01:00
Wojtek Porczyk
ce0b927a98 qubes/tests/int/tools/qvm_run: add tests for qvm-run
Missing is test for --gui/--no-gui.

part of QubesOS/qubes-issues#1226
2015-12-29 03:50:35 +01:00
Wojtek Porczyk
f1a0b1af39 qubes/tools: add qvm-run, qvm-{,un}pause
Also change convention of calling main(): now command returns its
numeric value instead of bool.

Also fixed QSB#13

fixes QubesOS/qubes-issues#1226
2015-12-29 03:43:08 +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
Wojtek Porczyk
7b30361fa6 qubes/tools: add qubes-prefs
fixes QubesOS/qubes-issues#1209
2015-12-24 00:48:17 +01:00
Wojtek Porczyk
87f74a5ba8 qubes/storage: Fix template instantiation
rootcow image was somehow dropped
2015-12-24 00: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
Wojtek Porczyk
ec50a411fe qubes/tests/int/tools/qubes_create: fix wrong assert 2015-12-23 14:34:54 +01:00
Wojtek Porczyk
5c57b4cda7 qubes/tests: fix regression in test setup
Regression was caused by 648fe213 "core3: test fixing"
2015-12-23 14:34:54 +01:00
Wojtek Porczyk
e4a0cfc8c8 qubes: fix instantiating with no or empty qubes.xml
There is always dom0 (domid=0) added, but it has None as self.xml.
2015-12-23 14:34:54 +01:00
Wojtek Porczyk
b54305bff1 qubes: fix qubes-create regression
Previous commit, which changed the handling of qubes.xml again, broke
bootstrapping.
2015-12-23 14:34:54 +01:00
Wojtek Porczyk
729c28281b spec: disable AutoReq
This fixes compilation under Fedora. Depending on $PATH order, automagic
dependencies put /usr/bin/python or /bin/python (because we have
anything, becase /bin is just symlink to /usr/bin.
2015-12-23 14:34:54 +01:00
Wojtek Porczyk
91bde9b80f spec: add missing BuildRequires 2015-12-23 14:34:54 +01:00
Wojtek Porczyk
58608864c1 qubes: fix saving qubes.xml 2015-12-23 14:34:54 +01:00
Wojtek Porczyk
d693964ab9 qubes: fix deleting domain 2015-12-23 14:34:53 +01:00
Wojtek Porczyk
0dc0fd306f core3: test fixing
part of QubesOS/qubes-issues#1248
2015-12-23 14:34:53 +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