Moin Svein-Erik, On Thu, Mar 17, 2011 at 12:30:02AM +0000, Svein-Erik Lund wrote: > Is it possible to make lxc-create to ignore the fact that the folder for the > container already exists? > > My problem is that for different reasons want to have each and every > container in its own filesystem. > > If I create a logical volume, and mount it at /var/lib/lxc/<hostname> > "lxc-create -n <hostname>" will say that the container already exists. For me > this is a bit of a problem. any suggestions? >
lxc-create is a Shellscript, so less $(which lxc-create) is going to lead you to if [ -d "$lxc_path/$lxc_name" ]; then echo "'$lxc_name' already exists" exit 1 fi Comment it as a quick-win. But changing it to check if the dir is empty instead could be a nicer approach. Regards Erkan -- über den grenzen muß die freiheit wohl wolkenlos sein ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users