<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
><i> the subsequent rm -rf $rootfs</i>
<br>
<br>
Serge,<br>
Could you elaborate on this? The lxc-destroy is not supposed to
rm -rf the root filesystem, is it?<br>
<br>
What if I had data in there I wanted to copy to a new LXC rootfs
I'm building?<br>
<br>
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.<br>
<br>
--Derek<br>
<br>
On 05/27/2012 08:56 AM, Serge Hallyn wrote:
<blockquote cite="mid:20120527155625.GA3829@sergelap" type="cite">
<pre wrap="">Quoting Daniel Lezcano (<a class="moz-txt-link-abbreviated" href="mailto:daniel.lezcano@free.fr">daniel.lezcano@free.fr</a>):
</pre>
<blockquote type="cite">
<pre wrap="">On 04/26/2012 07:09 AM, Serge Hallyn wrote:
</pre>
<blockquote type="cite">
<pre wrap="">From: Serge Hallyn<a class="moz-txt-link-rfc2396E" href="mailto:serge.hallyn@ubuntu.com"><serge.hallyn@ubuntu.com></a>
Author: Timothy Chen<a class="moz-txt-link-rfc2396E" href="mailto:tnachen@gmail.com"><tnachen@gmail.com></a>
Bug-Ubuntu: <a class="moz-txt-link-freetext" href="https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/980902">https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/980902</a>
Signed-off-by: Serge Hallyn<a class="moz-txt-link-rfc2396E" href="mailto:serge.hallyn@ubuntu.com"><serge.hallyn@ubuntu.com></a>
Cc: Timothy Chen<a class="moz-txt-link-rfc2396E" href="mailto:tnachen@gmail.com"><tnachen@gmail.com></a>
---
src/lxc/lxc-destroy.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/lxc/lxc-destroy.in b/src/lxc/lxc-destroy.in
index b0f2da5..17fa6d6 100644
--- a/src/lxc/lxc-destroy.in
+++ b/src/lxc/lxc-destroy.in
@@ -87,6 +87,7 @@ lxc-info -n $lxc_name 2>/dev/null | grep -q RUNNING
if [ $? -eq 0 ]; then
if [ $force -eq 1 ]; then
lxc-stop -n $lxc_name
+ lxc-wait -n $lxc_name -s STOPPED
else
echo "Container $lxc_name is running, aborting the deletion."
exit 1
</pre>
</blockquote>
<pre wrap="">
I don't get why this is needed, lxc-stop is synchronous. When the
lxc-stop command exits, we have the guarantee the container has
stopped. If it is not the case, that means there is a problem
somewhere else.
</pre>
</blockquote>
<pre wrap="">
Some of the filesystems may not yet have been auto-umounted when the
namespaces were cleaned up, causing the subsequent rm -rf $rootfs to
fail.
-serge
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. <a class="moz-txt-link-freetext" href="http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/">http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/</a>
_______________________________________________
Lxc-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Lxc-users@lists.sourceforge.net">Lxc-users@lists.sourceforge.net</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/lxc-users">https://lists.sourceforge.net/lists/listinfo/lxc-users</a>
</pre>
</blockquote>
<br>
</body>
</html>