Commit Graph

175 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
005db6a5ab backups: fix race condition in "tape" change event during backup
Ensure that outer tar/encryptor gets all the data *and EOF* before
signalling inner tar to continue. Previously it could happen that inner
tar begins to write next data chunk, while qvm-backup still holds
previous data chunk open.
2013-11-24 03:28:21 +01:00
Marek Marczykowski-Górecki
3d1b40f25c backups: keep file without path in inner tar archive
It is senseless to have full file path in multiple locations:
 - external archive
 - qubes.xml
 - internal archive
Also it is more logical to have only "private.img" file in archive
placed in "appvms/untrusted/private.img.000". Although this is rather
cosmetic change for VMs data, it is required to backup arbitrary
directory, like dom0 user home.

Also use os.path.* instead of manual string operations (split,
partition). It is more foolproof.
2013-11-24 03:23:27 +01:00
Marek Marczykowski-Górecki
61b3a81e82 backup: remove unused argument from backup_prepare 2013-11-24 03:17:15 +01:00
Marek Marczykowski-Górecki
e7701d9c5d backup: check for disk space if target is local directory 2013-11-24 03:15:44 +01:00
Olivier MEDOC
51f119326b backup: improved error handling during restore 2013-11-23 02:44:05 +01:00
Olivier MEDOC
e875ae9d06 backups: use tar2qfile filtering to enable partial backup restore 2013-11-23 02:44:05 +01:00
Marek Marczykowski-Górecki
2005207462 Template support for HVM (#719)
Any HVM (which isn't already template-based) can be a template for
another HVM. For now do not allow simultaneous run of template and its
VM (this assumption simplify the implementation, as no root-cow.img is
needed).
2013-11-19 18:42:59 +01:00
Marek Marczykowski-Górecki
dfa9e7c0df Add device-mapper devices to name->(major,minor) mapping
qvm-block will still not list device-mapper devices, but it would be
much easier to modify it.
2013-11-16 01:29:50 +01:00
Marek Marczykowski-Górecki
3666d6ced9 backup: wait for process termination in restore header phase
One more race condition, which could cause qvm-backup-restore hang.
2013-11-09 18:56:08 +01:00
Marek Marczykowski-Górecki
319158d5b1 backup: restore: Ignore qubes.xml in the second restore pass
Already processed in backup prepare phase). This is only because
qfile-dom0-unpacker doesn't support selective unpack (like tar do).
This should be extended to skip also VMs not selected for restore.
2013-11-09 18:54:52 +01:00
Marek Marczykowski-Górecki
1880f61c2d backup: restore: process files until EOF received
Not only until unpacker process is running. This is another race
condition, which would cause some data left in the pipe buffer not
processed.
2013-11-09 18:53:57 +01:00
Marek Marczykowski-Górecki
3c993c619c backup: restore: handle VM data with qfile format instead of simple tar
This was already partially implemented, but only for backup header
(qubes.xml).
Fix handling of vmproc object (available only when backup in another
VM).
Also fix some race conditions - wait for process termination, not only
check its exit code (which would be None if process still running).
2013-11-09 17:20:18 +01:00
Marek Marczykowski-Górecki
c61a4570e8 backup: use 'dom0' as source domain for RPC calls 2013-11-09 17:12:41 +01:00
Marek Marczykowski-Górecki
661a1ba4af backup: comment update 2013-11-09 17:12:14 +01:00
Marek Marczykowski-Górecki
54f08e00b9 backup: fix race condition with inner tar process
Do not assume that tar will finish quickly - explicitly wait for either
process termination or request for the next archive part.
2013-11-09 17:09:44 +01:00
Marek Marczykowski-Górecki
89b6069bda backup: whitespace fixes 2013-11-09 17:06:29 +01:00
Marek Marczykowski-Górecki
b84ba998a3 backup: fix misused variables - most likely copy&paste error 2013-11-09 16:56:59 +01:00
Marek Marczykowski-Górecki
5cebff34bd backup: include qubes.xml
It was commented out by mistake.
2013-11-09 16:51:25 +01:00
Marek Marczykowski-Górecki
34b03fe2b3 backup: fix setting backup qubes.xml attributes
Cannot compare QubesVm objects, because we have different instances of
QubesVmCollection. So compare QID instead.
2013-11-09 16:46:06 +01:00
Marek Marczykowski-Górecki
a56ceb92c5 backup: update for new API - use system_path hash
Instead of a bunch of global variables
2013-11-09 15:55:17 +01:00
Marek Marczykowski-Górecki
a9a8335403 Merge remote-tracking branch 'oliv/master' into new-backups
Conflicts:
	core/qubesutils.py
	dom0/qvm-core/qubes.py
2013-11-07 22:41:16 +01:00
Marek Marczykowski-Górecki
e6012a8fd2 Fix qubes.xml unlock code (#748)
Do not call explicit lockf(lOCK_UN) to not unlock the file
buffers are flushed. This is simpler than adding flush() call.
2013-10-02 04:54:10 +02:00
Marek Marczykowski-Górecki
76144df2e7 qvm-backup: respect "include in backups by default" setting (#746) 2013-10-01 03:31:12 +02:00
Marek Marczykowski
28b8eb0445 Send monitor layout at VM startup.
Gui daemon isn't aware of multihead parameters, also gui protocol
doesn't support such information - currently by design it is configured
via Qubes RPC service.
At GUI startup send monitor layout to the VM.
2013-08-11 04:11:34 +02:00
Marek Marczykowski
a84886db07 Move all files one level up 2013-03-16 19:56:51 +01:00