I've opened a ticket to keep track of this problem.<div><br></div><div><a href="http://dev.opennebula.org/issues/1212">http://dev.opennebula.org/issues/1212</a><br><br><div class="gmail_quote">On Fri, Apr 6, 2012 at 11:08 AM, Nicolas AGIUS <span dir="ltr"><<a href="mailto:nicolas.agius@lps-it.fr">nicolas.agius@lps-it.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font:inherit">Hi,<br><br>Nope, "onevm shutdown" work fine. The problem is with "onevm delete" on a running vm.<br>
<br>Host is configured with vmm_xen and tm_ssh :<br><br>Fri Apr  6 11:05:14 2012 [DiM][D]: Finalizing VM 91<br>Fri Apr  6 11:05:14 2012 [VMM][D]: Message received: LOG I 91 Driver command for 91 cancelled<br>Fri Apr  6 11:05:14 2012 [ReM][D]: VirtualMachineInfo method invoked<br>
Fri Apr  6 11:05:15 2012 [ReM][D]: HostPoolInfo method invoked<br>Fri Apr  6 11:05:15 2012 [ReM][D]: VirtualMachinePoolInfo method invoked<br>Fri Apr  6 11:05:15 2012 [ReM][D]: AclInfo method invoked<br>Fri Apr  6 11:05:15 2012 [TM][D]: Message received: LOG I 91 tm_delete.sh: Deleting /var/lib/one//91/images<br>
Fri Apr  6 11:05:15 2012 [TM][D]: Message received: LOG I 91 tm_delete.sh: Executed "ssh xen0vburo01 rm -rf
 /var/lib/one//91/images".<br>Fri Apr  6 11:05:15 2012 [TM][D]: Message received: LOG I 91 ExitCode: 0<br>Fri Apr  6 11:05:15 2012 [TM][D]: Message received: TRANSFER SUCCESS 91 -<br>Fri Apr  6 11:05:15 2012 [HKM][D]: Message received: LOG I 91 ExitCode: 0<br>
Fri Apr  6 11:05:20 2012 [VMM][D]: Message received: LOG I 91 cancel: Executed "sudo /usr/sbin/xm destroy one-91".<br>Fri Apr  6 11:05:20 2012 [VMM][D]: Message received: LOG I 91 ExitCode: 0<br>Fri Apr  6 11:05:20 2012 [VMM][D]: Message received: LOG I 91 Successfully execute virtualization driver operation: cancel.<br>
Fri Apr  6 11:05:20 2012 [VMM][D]: Message received: LOG I 91 ExitCode: 0<br>Fri Apr  6 11:05:20 2012 [VMM][D]: Message received: LOG I 91 Successfully execute network driver operation: clean.<br>Fri Apr  6 11:05:20 2012 [VMM][D]: Message received: CANCEL SUCCESS 91 -<br>
<br>Nicolas AGIUS<br><br><br>--- En date de : <b>Mer 4.4.12,
 Tino Vazquez <i><<a href="mailto:tinova79@gmail.com" target="_blank">tinova79@gmail.com</a>></i></b> a écrit :<br><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px"><br>De: Tino Vazquez <<a href="mailto:tinova79@gmail.com" target="_blank">tinova79@gmail.com</a>><br>
Objet: Re: [one-users] Wrong actions when deleting vm<br>À: <a href="mailto:nicolas.agius@lps-it.fr" target="_blank">nicolas.agius@lps-it.fr</a><br>Cc: <a href="mailto:users@lists.opennebula.org" target="_blank">users@lists.opennebula.org</a><br>
Date: Mercredi 4 avril 2012, 11h44<div><div class="h5"><br><br><div>Hi,<div><br></div><div>OpenNebula should wait for the VM to be shutdown before it removes the files. Did you use "onevm shutdown"? Can you send the complete log for the VM?</div>
<div><br></div><div>Regards,</div>

<div><br></div><div>-Tino</div><div><br clear="all">--<br>Constantino Vázquez Blanco, MSc | <a rel="nofollow" href="http://dsa-research.org/tinova" target="_blank">dsa-research.org/tinova</a><br>Virtualization Technology Engineer / Researcher<br>


OpenNebula - The Open-Source Solution for Data Center Virtualization<br><a rel="nofollow" href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> | @tinova79 | @OpenNebula<br><br>
<br><br><div>On Tue, Apr 3, 2012 at 10:56 AM, Nicolas AGIUS <span dir="ltr"><<a rel="nofollow" href="http://mc/compose?to=nicolas.agius@lps-it.fr" target="_blank">nicolas.agius@lps-it.fr</a>></span> wrote:<br><blockquote style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">


<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font:inherit" valign="top">Hi, <br><br>I still have a bug when I try to delete a vm.<br><br>With no persistent disk image, OpenNebula is deleting the disks before it shutdown the vm. Using tm_lvm and phy: devices, the delete fail because it can't remove an open file.<br>


<br>Where is this action sequence in the source code ?<br><br>Thanks,<br>Nicolas AGIUS<br><br><br><br>--- En date de : <b>Ven 23.3.12, Nicolas AGIUS <i><<a rel="nofollow" href="http://mc/compose?to=nicolas.agius@lps-it.fr" target="_blank">nicolas.agius@lps-it.fr</a>></i></b> a écrit :<br>


<blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px"><br>De: Nicolas AGIUS <<a rel="nofollow" href="http://mc/compose?to=nicolas.agius@lps-it.fr" target="_blank">nicolas.agius@lps-it.fr</a>><br>
Objet: [one-users] Bug with delete action and persistent storage<br>

À: <a rel="nofollow" href="http://mc/compose?to=users@lists.opennebula.org" target="_blank">users@lists.opennebula.org</a><br>Date: Vendredi 23 mars 2012, 18h26<br><br><div><table border="0" cellpadding="0" cellspacing="0">
<tbody><tr><td style="font:inherit" valign="top">

Hi,<br>I found a small bug in OpenNebula v3.2.1.<br><br>When I try to delete a VM with a persistent image, the image switch in the ERROR state and the following trace appear in the log :<br><br>------<br>[ImM][I]: Moving disk /var/lib/one/64/disk.0 to repository image 15<br>


[VMM][D]: Message received: LOG I 64 Driver command for 64 cancelled<br>[ImG][D]: Message received: LOG I 15 Command execution fail: /var/lib/one/remotes/image/fs/mv /var/lib/one/64/disk.0 /var/lib/one/images/5f4cc7519564396f02e99a59e5bd45c0 15 15<br>


[ImM][I]: Command execution fail: /var/lib/one/remotes/image/fs/mv /var/lib/one/64/disk.0 /var/lib/one/images/5f4cc7519564396f02e99a59e5bd45c0 15 15<br>[ImG][D]: Message received: LOG I 15 mv: Moving local image /var/lib/one/64/disk.0 to the image repository<br>


[ImM][I]: mv: Moving local image /var/lib/one/64/disk.0 to the image
 repository<br>[ImG][D]: Message received: LOG E 15 mv: Command "mv -f /var/lib/one/64/disk.0 /var/lib/one/images/5f4cc7519564396f02e99a59e5bd45c0" failed.<br>[ImM][E]: mv: Command "mv -f /var/lib/one/64/disk.0 /var/lib/one/images/5f4cc7519564396f02e99a59e5bd45c0" failed.<br>


[ImG][D]: Message received: LOG E 15 mv: mv: cannot stat `/var/lib/one/64/disk.0': No such file or directory<br>[ImM][E]: mv: mv: cannot stat `/var/lib/one/64/disk.0': No such file or directory<br>[ImG][D]: Message received: LOG E 15 Could not move /var/lib/one/64/disk.0 to /var/lib/one/images/5f4cc7519564396f02e99a59e5bd45c0<br>


[ImM][E]: Could not move /var/lib/one/64/disk.0 to /var/lib/one/images/5f4cc7519564396f02e99a59e5bd45c0<br>[ImG][D]: Message received: LOG I 15 ExitCode: 1<br>[ImM][I]: ExitCode: 1<br>[ImG][D]: Message received: MV FAILURE 15 Could not move /var/lib/one/64/disk.0 to /var/lib/one/images/5f4cc7519564396f02e99a59e5bd45c0<br>


[ImM][E]: Error saving image to the
 repository: Could not move /var/lib/one/64/disk.0 to /var/lib/one/images/5f4cc7519564396f02e99a59e5bd45c0<br>--------<br><br>It seems that the delete action is doing the following steps :<br> - Move image to the repo<br>


 - Delete image on the host<br> - Destroy the vm<br><br>But the image is not transferred and cause the error. I thinks steps should be :<br> - Destroy the vm<br> - Copy back the image from the host<br> - Move image to the repo<br>



 - Delete image on the host<br><br>I've tried to fix it,  but I got lost somewhere between C++ and Ruby...<br><br>Subsidiary question, why is the core written in C++ and not in Ruby ?<br><br>Thanks,<br>Nicolas AGIUS<br>


<br></td></tr></tbody></table></div><br>-----La pièce jointe associée suit-----<br><br><div>_______________________________________________<br>Users mailing list<br><a rel="nofollow" href="http://mc/compose?to=Users@lists.opennebula.org" target="_blank">Users@lists.opennebula.org</a><br>


<a rel="nofollow" href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br></div></blockquote></td></tr></tbody></table><br>
_______________________________________________<br>


Users mailing list<br>
<a rel="nofollow" href="http://mc/compose?to=Users@lists.opennebula.org" target="_blank">Users@lists.opennebula.org</a><br>
<a rel="nofollow" href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
<br></blockquote></div><br></div>
</div></div></div></blockquote></td></tr></tbody></table><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org">Users@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Javier Fontán Muiños<br>Project Engineer<br>OpenNebula - The Open Source Toolkit for Data Center Virtualization<br><a href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> | <a href="mailto:jfontan@opennebula.org" target="_blank">jfontan@opennebula.org</a> | @OpenNebula<br>

</div>