[lxc-users] lxc-snapshot and stopping an lxc container

Serge Hallyn serge.hallyn at ubuntu.com
Mon Jan 13 15:11:24 UTC 2014


Quoting Andy Johnson (johnsonzjo at gmail.com):
> Hello,
> I an newbie to lxc snapshoting.
> 
> I use latest git lxc, built with --disable-python.
> I created the container with btrfs backing store.
> 
> I tried creating a snapshot with lxc-scnapshot, and got
> ...
> lxc_container: error: Original container (fedoraBtrfs) is running
> lxc_container: clone of /container:fedoraBtrfs failed
> ...
> 
> My question is: should I stop the container with lxc-stop before
> running lxc-snapshot ?

Yes.

We might want to consider allowing a clone (and hence snapshot)
when the container is frozen.  Right now the check is explicitly
for c->is_stopped().  Not sure if there would be unsafe cases of
that, but I would think it should be ok.

-serge


More information about the lxc-users mailing list