[Lxc-users] lxc-destroy erase rootfs

Serge Hallyn serge.hallyn at canonical.com
Fri Feb 8 23:41:20 UTC 2013


Quoting Papp Tamas (tompos at martos.bme.hu):
> On 02/08/2013 02:46 PM, Serge Hallyn wrote:
> >
> > Quoting John (lxc at jelmail.com):
> >> I raised this issue back on 6th/7th December. It was a side-issue in
> >> a discussion entitled "unable to run systemd in an LXC container". I
> >> have always performed a destroy/create cycle to apply changes
> >> written to /etc/lxc/mycontainer.conf. I was asked why I didn't edit
> >> in /var directly and I replied that I treated the files created by
> >> LXC in /var to be internal and have always used the destroy/create
> >> cycle for config updates. There was talk of adding a -k (keep)
> >> option to lxc-destroy.
> >>
> >> I have been working on other commitments and need to come back and
> >> revisit this but it's good to see others have experienced the same
> >> difficulty when this change in behaviour.
> >>
> >> I would be interested in current thoughts.
> >
> > First, note that if you're doing lxc-destroy thinking it is
> > 'virsh destroy', then that means the container is running right?
> > And lxc-destroy will then print a warning and do nothing.
> >
> > I'm happy to ack a patch to add [-k|--keep] to lxc-destroy.
> 
> Please do it in reverse way (aka [-r|--remove]).
> It would be much-much more 'polite' (IMHO:D).

Not to users who are already scripting around lxc-destroy and would
now have to change all the callers.

Seriously, 'lxc-destroy' is a vicious enough sounding name, and I
don't like they idea of saying "well other suites use their terms
differently so we have to follow suit."

> Or just suggest a way to modify containers configuration.

Sorry, can you elaborate?  You can modify configuration using the
API (in C, python, or, iiuc, lua).  You can edit the configuration
file by hand...  If there is more you'd like, please do propose it,
sounds interesting.

-serge




More information about the lxc-users mailing list