[lxc-devel] Get rid of lxc-create and lxc-destroy?

Daniel Lezcano daniel.lezcano at free.fr
Thu Jan 7 14:17:56 UTC 2010


Michael Holzt wrote:
> Can we get rid of lxc-create and lxc-destroy? Currently the only thing
> lxc-create does is create /var/lib/lxc/<containername> and copy the config
> file into it. This seems like a unnecessary step.
>
> I propose to remove both binaries. Instead lxc-start (and lxc-execute) will
> search for the config in /etc/lxc/<containername>.conf or could be provided
> with the path to the config file on command line.
>
> It seems that /var/lib/lxc/<containername> currently only holds the config
> and nothing else, so we can probably get rid of that directory as well.
>   

The lxc-create and the lxc-destroy are not mandatory now.
You can launch a container directly with lxc-start -n foo -f myconf

lxc-create and lxc-destroy are scripts to copy the configuration and 
store informations such as a root filesystem when the container is 
created with the "-t" option.
The lxc-destroy is a simple rm -rf /var/lib/lxc/<name>, ensuring 
everything is removed including the rootfs.










More information about the lxc-devel mailing list