[Lxc-users] [PATCH 9/9] lxc-destroy: wait until the container is stopped
Papp Tamas
tompos at martos.bme.hu
Sun May 27 21:03:34 UTC 2012
On 05/27/2012 10:37 PM, Derek Simkowiak wrote:
> >/the subsequent rm -rf $rootfs/
>
> Serge,
> Could you elaborate on this? The lxc-destroy is not supposed to
> rm -rf the root filesystem, is it?
>
> What if I had data in there I wanted to copy to a new LXC rootfs
> I'm building?
>
> Unless I have misunderstood something, doing an rm -rf is a
> horrible idea. Virt-Manager and VirtualBox do not remove your .vmdk
> disk image when you "destroy" a virtual machine.
It does:
if out=$(btrfs subvolume list "$lxc_path/$lxc_name/rootfs" 2>&1); then
out=$(btrfs subvolume delete "$lxc_path/$lxc_name/rootfs" 2>&1) ||
echo "WARN: failed btrfs subvolume delete: $out"
fi
# recursively remove the container to remove old container configuration
rm -rf --preserve-root $lxc_path/$lxc_name
lxc_path=/var/lib/lxc is hardcoded (at least in Ubuntu).
If custom path is in use, then the container is not touched.
tamas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20120527/faad846f/attachment.html>
More information about the lxc-users
mailing list