diff --git a/tools/virsh.c b/tools/virsh.c index 546e247dd8867e77d9df29a30efac7842db78a2d..d60c27b18b7a08803adf5277f277f9c15f97afa9 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -9464,17 +9464,19 @@ vshCommandOptVolBy(vshControl *ctl, const vshCmd *cmd, if (name) *name = n; - /* try it by PATH */ + /* try it by name */ if (pool && (flag & VSH_BYNAME)) { - vshDebug(ctl, 5, "%s: <%s> trying as vol UUID\n", + vshDebug(ctl, 5, "%s: <%s> trying as vol name\n", cmd->def->name, optname); vol = virStorageVolLookupByName(pool, n); } + /* try it by key */ if (vol == NULL && (flag & VSH_BYUUID)) { vshDebug(ctl, 5, "%s: <%s> trying as vol key\n", cmd->def->name, optname); vol = virStorageVolLookupByKey(ctl->conn, n); } + /* try it by path */ if (vol == NULL && (flag & VSH_BYUUID)) { vshDebug(ctl, 5, "%s: <%s> trying as vol path\n", cmd->def->name, optname);