Commit Graph

15 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
23ae0ed990 dispvm: clean the VM in case of failed savefile creation
Otherwise further tries to regenerate savefile would fail.
2015-05-15 03:22:06 +02:00
Marek Marczykowski-Górecki
dadcfc334d dispvm: set 'memory' to the size reported on savefile generation
That parameter will be used later to request memory from qmemman just
before loading savefile to memory, so it should match the real need.

Do not allow values smaller than 400, to prevent storing some erroneous
values.

Fixes qubesos/qubes-issues#973
2015-05-15 03:22:06 +02:00
Marek Marczykowski-Górecki
d5b67a67a2 Fix "dispvm: sanitize used memory info received from VM"
There should be no -q option - we actually want the result.

Fixes qubesos/qubes-issues#994
2015-05-13 04:12:20 +02:00
Marek Marczykowski-Górecki
cd163b81be dispvm: sanitize used memory info received from VM
Luckily it is used as argument to commands with does not allow any
harmful arguments (virsh set(max)mem). Also usage in arithmetic
expression does not allow any harmful usage in this place.
2015-04-28 03:24:38 +02:00
Marek Marczykowski-Górecki
d02aa70e93 dispvm: speedup sparse files handling by using bsdtar
Apparently it is much faster. Especially during savefile preparation -
tar reads the whole file, while bsdtar gets file map and reads only used
regions.
2015-03-30 05:29:14 +02:00
Marek Marczykowski-Górecki
7265cb9d0f Merge branch 'dispvm-speedup' into dispvm-speedup3
Conflicts:
	dispvm/qubes-prepare-saved-domain.sh
2015-03-02 03:35:15 +01:00
Marek Marczykowski-Górecki
ef1bf9b33b dispvm: fix setting up DispVM based on non-default template
Replace 'vmdir' symlink instead of creating new one inside of 'vmdir'
directory.
2015-02-11 15:02:33 +01:00
Marek Marczykowski
c8fb5cfd99 dispvm: minor fixes 2014-11-19 12:50:24 +01:00
Marek Marczykowski
ff2c925e18 dispvm: use qubesdb instead of xenstore 2014-11-19 12:50:24 +01:00
Marek Marczykowski
107ebad9d5 Migration to libvirt - DispVM
Move DispVM creation to qfile-daemon-dvm/QubesDisposableVm from
qubes-restore. As actual restore is handled by libvirt, we don't get
much from separate qubes-restore process.
This code still needs some improvements, especially on performance.
2014-11-19 12:48:26 +01:00
Marek Marczykowski-Górecki
7fbbcd58bf dispvm: print diagnostics to stderr 2014-11-10 11:42:47 +01:00
Marek Marczykowski-Górecki
e2f3446f22 dispvm: do not limit DispVM memory to reported allocated size
Apparently it doesn't work with some kernels - saved domain still needs
original memory amount to restore successfully. This happens at least on
3.12.14 kernel.
Because qfile-daemon-dvm always requests 400MB from qmemman, this change
should harm anyone - in any case DispVM needs 400MB free memory to
start.

Note that "xl mem-set" line is still there, which makes savefile somehow
smaller (so faster restore).
2014-04-16 16:44:42 +02:00
Marek Marczykowski-Górecki
68ad6d0760 dispvm: start guid during savefile preparation
Now gui-agent supports reconnect to guid, so start it early to have Xorg
running in the VM.

This is still not done - for example it tries to run some commands via
(not running yet) qrexec.
2014-01-24 06:42:20 +01:00
Marek Marczykowski-Górecki
7a639911f8 dispvm: simplify DispVM preparation script 2014-01-21 04:41:18 +01:00
Marek Marczykowski
a84886db07 Move all files one level up 2013-03-16 19:56:51 +01:00