From 9428c70d3149997966cb86c20ccce9ea2dfcacec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 10 Feb 2016 17:52:45 +0100 Subject: [PATCH] core: fix vm.create_on_disk QubesOS/qubes-issues# --- qubes/vm/qubesvm.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/qubes/vm/qubesvm.py b/qubes/vm/qubesvm.py index b7727585..499af82e 100644 --- a/qubes/vm/qubesvm.py +++ b/qubes/vm/qubesvm.py @@ -1052,10 +1052,9 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM): (if :py:obj:`None`, use domain's own template ''' - if source_template is None: + if source_template is None and hasattr(self, 'template'): # pylint: disable=no-member source_template = self.template - assert source_template is not None self.storage.create_on_disk(source_template) @@ -1163,7 +1162,7 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM): raise qubes.exc.QubesVMNotHaltedError( self, 'Cannot clone a running domain {!r}'.format(self.name)) - self.storage.clone_disk_files(src, verbose=False) + self.storage.clone_disk_files(src) if src.icon_path is not None \ and os.path.exists(src.dir_path) \