From 5e4831ede4909c74e74f3881d0f1d3efeb6652c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sat, 23 Feb 2019 15:49:18 +0100 Subject: [PATCH] backup: Do not try to attach devices during backup verification The "restored" VM object will be discarded anyway, and it doesn't have real 'attach' method. Fixes QubesOS/qubes-issues#4830 --- qubesadmin/backup/restore.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qubesadmin/backup/restore.py b/qubesadmin/backup/restore.py index 1dedff1..0ec7bb0 100644 --- a/qubesadmin/backup/restore.py +++ b/qubesadmin/backup/restore.py @@ -1968,7 +1968,8 @@ class BackupRestore(object): options=options, persistent=True) try: - new_vm.devices[bus].attach(assignment) + if not self.options.verify_only: + new_vm.devices[bus].attach(assignment) except Exception as err: # pylint: disable=broad-except self.log.error('Error attaching device %s:%s to %s: %s', bus, ident, vm.name, err)