]> git.proxmox.com Git - mirror_lxc.git/blobdiff - src/lxc/lxccontainer.c
Merge pull request #1943 from bhelm/master
[mirror_lxc.git] / src / lxc / lxccontainer.c
index 83ff24253b2704a60d1c5973b104ceaad11524e7..a7f29838aaaea34acd87c1512b51c0317d674a17 100644 (file)
@@ -3798,9 +3798,8 @@ static struct lxc_container *do_lxcapi_clone(struct lxc_container *c, const char
 
        if (container_mem_lock(c))
                return NULL;
-
-       if (!is_stopped(c)) {
-               ERROR("error: Original container (%s) is running", c->name);
+       if (!is_stopped(c) && !(flags & LXC_CLONE_ALLOW_RUNNING)) {
+               ERROR("error: Original container (%s) is running. Use --allowrunning if you want to force a snapshot of the running container.", c->name);
                goto out;
        }