Skip to content

Commit

Permalink
qubesvm: improve error message about same-pool requirement
Browse files Browse the repository at this point in the history
Make it clear that volume creation fails because it needs to be in the
same pool as its parent. This message is shown in context of `qvm-create
-p root=MyPool` for example and the previous message didn't make sense
at all.

Fixes QubesOS/qubes-issues#3438
  • Loading branch information
marmarek committed Oct 17, 2018
1 parent ba210c4 commit 58bcec2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion qubes/vm/qubesvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1990,7 +1990,9 @@ def _patch_pool_config(config, pool=None, pools=None):
if not is_snapshot:
config['pool'] = str(pools[name])
else:
msg = "Can't clone a snapshot volume {!s} to pool {!s} " \
msg = "Snapshot volume {0!s} must be in the same pool as its " \
"origin ({0!s} volume of template)," \
"cannot move to pool {1!s} " \
.format(name, pools[name])
raise qubes.exc.QubesException(msg)
return config
Expand Down

0 comments on commit 58bcec2

Please sign in to comment.