Commit Graph

5141 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
1a215e47ab
qubes: add 'default_dispvm' property - both Qubes and QubesVM
QubesOS/qubes-issues#2253
2016-08-17 00:46:43 +02:00
Marek Marczykowski-Górecki
ab6f961931
qubes/dispvm: misc fixes, make it actually working
- DispVM is no longer a special case for storage
- Add missing 'rw=True' for volatile volume
- Handle storage initialization (copy&paste from AppVM)
- Clone properties from DispVM template

QubesOS/qubes-issues#2253
2016-08-17 00:42:17 +02:00
Marek Marczykowski-Górecki
2f977ff4f5
backup: open backup collection in offline mode
Otherwise it may try to manipulate live libvirt objects with the same
names (and probably different UUIDs, which would fail).
2016-08-16 00:00:14 +02:00
Marek Marczykowski-Górecki
eb637147fb
core2migration: adjust for recent storage API changes
QubesVM.storage.vmdir uses QubesVM.dir_path, so can't be used directly
as default value for dir_path. Use `super()`.
2016-08-15 23:47:28 +02:00
Marek Marczykowski-Górecki
660c726315
tests: add qvm-check 2016-08-09 05:14:13 +02:00
Marek Marczykowski-Górecki
da6faf83bf
qubes/tools: allow unpause multiple domains at once
There is no reason to not allow it.
2016-08-09 05:14:13 +02:00
Marek Marczykowski-Górecki
a1e2888e96
qubes/tools: fix messages in qvm-check 2016-08-09 05:14:13 +02:00
Marek Marczykowski-Górecki
d4e534bc05
qubes/vm: fix pause handling
1. There is no such thing as libvirt_domain.pause().
2. libvirt_domain.state() returns [state, reason]
2016-08-09 05:14:12 +02:00
Marek Marczykowski-Górecki
d2393f91e8
qubes/tools: adjust qvm-check for core3 API 2016-08-09 05:14:12 +02:00
Marek Marczykowski-Górecki
4d5a314e77
qubes/tools: add hidden --offline-mode options
It is useful on some cases to prevent talking to hypervisor.

Warning - it may have sense only when action do not access any runtime
VM status. For example running the domain will fail, but changing its
properties should work.
2016-08-09 05:14:12 +02:00
Marek Marczykowski-Górecki
96d032919a
tests: minor fix to revert changes tests, mark as expected failure
While the test should be ok now, the functionality itself doesn't work (at
least on file volumes).
2016-08-09 05:14:12 +02:00
Marek Marczykowski-Górecki
ac68ffe39f
tests: correctly compare DeviceManager objects
Usefull for assertEqual(vm1.devices, vm2.devices) - clone tests, backup
tests etc.
2016-08-09 05:14:11 +02:00
Marek Marczykowski-Górecki
d954bb82a3
block-snapshot: set qubes.xml path for test VMs
Since it is running with totally different environment, QUBES_XML_PATH
isn't passed from test runner. Apply heuristic based on VM name.
2016-08-09 05:14:11 +02:00
Marek Marczykowski-Górecki
f17f80ee9d
qubes/tools: add qvm-template-commit
This tool is called from /etc/xen/scripts/block-origin script at VM
shutdown.
2016-08-09 05:14:11 +02:00
Marek Marczykowski-Górecki
6490767278
qubes/storage: update vm.storage.commit
Better name it 'commit', as it isn't only for template. And also fix to
call `pool.commit`
2016-08-09 05:14:11 +02:00
Marek Marczykowski-Górecki
ddf76d39bf
libvirt.xml: fix IP address declaration
There is no longer different one for DispVM savefile preparation - there
is no DispVM savefile anymore.
2016-08-09 05:14:10 +02:00
Marek Marczykowski-Górecki
ec7a84ea9d
minor: formatting
QubesOS/qubes-issues#
2016-08-09 05:14:10 +02:00
Marek Marczykowski-Górecki
af7b4087f0
tests: port few more tests to core3 API 2016-08-09 05:14:10 +02:00
Marek Marczykowski-Górecki
faa341ffa2
tests/backup: adjust for core3 API properties to verify after restore 2016-08-09 05:14:10 +02:00
Marek Marczykowski-Górecki
7d1cbd6934
tests: handle per-template tests in BackupTestsMixin 2016-08-09 05:14:09 +02:00
Marek Marczykowski-Górecki
fba6eac07f
qubes/tests: do not undefine libvirt domain twice
Do not access vm.libvirt_domain after it being already removed - this
will redefine it again in libvirt, just to undefine it in a moment.
On the other hand, few lines below there is fallback libvirt cleanup, in
case of proper one not working.
2016-08-09 05:14:09 +02:00
Marek Marczykowski-Górecki
6d45b97357
tests: workaround 'int' name being shadowed by module name
qubes.tests.int shadows 'int' type in qubes.tests module.

QubesOS/qubes-issues#2241
2016-08-09 05:14:09 +02:00
Marek Marczykowski-Górecki
3f6c96ee39
qubes/vm: fix handling autostart set/reset
1. Service symlink must have ".service" extension
2. Disable service on property reset to default
2016-08-09 05:14:09 +02:00
Marek Marczykowski-Górecki
5b4e30524a
qubes/vm: remove duplicated check for duplicate name on rename 2016-08-09 03:02:04 +02:00
Marek Marczykowski-Górecki
73d61bb378
qubes/events: fix event handlers ordering
Since "qubes: fix event framework", handlers from extensions looks the
same as from the VM class itself, so it isn't possible to order them
correctly. Specification says:

    For each class first are called bound handlers (specified in class
    definition), then handlers from extensions. Aside from above,
    remaining order is undefined.

So, restore this property, which is later correctly used to order
handlers.
2016-08-09 02:58:14 +02:00
Marek Marczykowski-Górecki
5177f5e12b
qubes/core2migration: fix vm.template handling
VM constructor can't be given just template QID, it must be TemplateVM
object.
2016-08-09 02:57:23 +02:00
Marek Marczykowski-Górecki
067cfb7cd6
Send approximate physical screen dimensions to the VM
When properly set, applications will have a chance to automatically
detect HiDPI and act accordingly. This is the case for Fedora 23
template and GNOME apps (maybe even all built on top of GTK).

But for privacy reasons, don't provide real values, only some
approximate one. Give enough information to distinguish DPI above 150,
200 and 300. This is some compromise between privacy and HiDPI support.

QubesOS/qubes-issues#1951

This commit is migrated from gui-daemon repository
(dec462795d14a336bf27cc46948bbd592c307401).
2016-08-08 04:03:00 +02:00
Marek Marczykowski-Górecki
6bd127beb3
qubes/core2migration: fix handling templates 2016-08-08 04:00:37 +02:00
Marek Marczykowski-Górecki
3ff7281e97
systemd: don't setup xenstore dom0 entries
Should be done by xen-init-dom0 upstream service.
2016-08-08 01:18:26 +02:00
Marek Marczykowski-Górecki
5ab860a18c
qubes: don't fail VM removal if already undefined in libvirt
This may happen when it was manually undefined for some reason. Or
during tests cleanup (tearDown).
2016-08-08 00:15:46 +02:00
Marek Marczykowski-Górecki
53562799cd
Fix typo in libvirt auto reconnection 2016-08-08 00:13:26 +02:00
Marek Marczykowski-Górecki
4e022382a5
Merge remote-tracking branch 'origin/master' into core3-devel 2016-08-08 00:11:46 +02:00
Marek Marczykowski-Górecki
10c44e8722
version 3.2.8 2016-08-07 16:11:49 +02:00
Marek Marczykowski-Górecki
2908992741
prepare-volatile-img.sh: create volatile.img group accessible
Otherwise qvm-create-default-dvm may fail to include it in
saved-cows.tar, which will lead to DispVM being not really disposable.

Fixes QubesOS/qubes-issues#2200
2016-08-07 16:07:30 +02:00
Marek Marczykowski-Górecki
d0ddb3d17c
dispvm: error out on saved-cows.tar creation error
If it fails - for example because of too restrictive volatile.img
permissions, subsequent DispVM will not be really disposable.
The original permissions issue should be fixed by previous commit, this
one makes sure that such errors will not be ignored.

Fixes QubesOS/qubes-issues#2200
2016-08-07 00:41:59 +02:00
HW42
09b49feea6
prepare-volatile-img.sh: don't run as root
This is no longer necessary since volatile.img is formated inside the
VM. This also fixes DispVM creation if the user sets a restrictive umask
for root. Maybe related to #2200.
2016-08-07 00:41:59 +02:00
Marek Marczykowski-Górecki
0968c25486
tests: when creating AppVM based on whonix-ws, connect it to tor
Use sys-whonix if exists. This makes network-related tests more
realistic.
2016-08-07 00:41:59 +02:00
Marek Marczykowski-Górecki
5c9157be05
tests: fix newline input in DispVM editor tests
Just '\n' isn't enough for xdotool to enter newline.
2016-08-07 00:41:59 +02:00
Marek Marczykowski-Górecki
72d60788e4
tests: fix Debian repository format
Use SHA256 instead of SHA1 - apt-get in Debian 9 rejects SHA1.
Fix date format (according to apt-get in Debian 9).
2016-08-07 00:41:58 +02:00
Marek Marczykowski-Górecki
07ac6c9ba1
tests: fix handling LibreOffice in DispVM tests
It's first window is a splash screen.
2016-08-07 00:41:58 +02:00
Marek Marczykowski-Górecki
dca30e815b
tests: enable 'use-default-netvm' while restoring old backup
Firewall VM was named 'firewallvm' at that time.
2016-08-07 00:41:58 +02:00
Marek Marczykowski-Górecki
fd1b68166c
tests: add test for GUI memory issues
QubesOS/qubes-issues#1028
2016-08-07 00:41:58 +02:00
Marek Marczykowski-Górecki
fd5b357232
tests: split vm_qrexec_gui 2016-08-07 00:41:57 +02:00
Marek Marczykowski-Górecki
e0484c3695
Revert "Travis add python-lvm2 dependency"
This reverts commit 7c02d991d0.

python-lvm2 isn't available in trusty (used in Travis-CI)
2016-08-04 17:46:41 +02:00
Marek Marczykowski-Górecki
1604aee8d4
Merge remote-tracking branch 'qubesos/pr/42' into core3-devel
* qubesos/pr/42:
  Make pylint happy ♥
2016-08-04 17:46:16 +02:00
Bahtiar `kalkin-` Gadimov
4477ea9678
Make pylint happy ♥ 2016-08-04 17:38:39 +02:00
Wojtek Porczyk
288ff85731 Merge remote-tracking branch 'origin/pull/48/head' into core3-devel 2016-08-03 18:25:02 +02:00
Bahtiar `kalkin-` Gadimov
7c02d991d0
Travis add python-lvm2 dependency 2016-08-03 14:37:47 +02:00
Bahtiar `kalkin-` Gadimov
ea34c0ed56
Fix volume_exists in qubes_lvm 2016-08-03 02:57:46 +02:00
Bahtiar `kalkin-` Gadimov
02c8fc999c
ThinPool.import() skips not saveable volumes 2016-08-03 02:57:46 +02:00