<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Carlos,<br>
    <br>
    Sorry for the delay and thank you for your help.<br>
    <br>
    We've deleted the content of the table vm_pool and then executed
    onedb fsck. This is the output:<br>
    <br>
    <i><small>MySQL dump stored in
        /var/lib/one/mysql_localhost_opennebula.sql<br>
        Use 'onedb restore' or restore the DB using the mysql command:<br>
        mysql -u user -h server -P port db_name < backup_file<br>
        <br>
        Image 4 RUNNING_VMS has 1     is    0<br>
        VM 29 is in Image 4 VM id list, but it should not<br>
        Image 4 has STATE USED_PERS     is    READY<br>
        Image 12 RUNNING_VMS has 1     is    0<br>
        VM 26 is in Image 12 VM id list, but it should not<br>
        Image 12 has STATE USED_PERS     is    READY<br>
        Image 7 RUNNING_VMS has 1     is    0<br>
        VM 25 is in Image 7 VM id list, but it should not<br>
        Image 7 has STATE USED_PERS     is    READY<br>
        Image 18 RUNNING_VMS has 1     is    0<br>
        VM 24 is in Image 18 VM id list, but it should not<br>
        Image 18 has STATE USED_PERS     is    READY<br>
        Image 21 RUNNING_VMS has 1     is    0<br>
        VM 44 is in Image 21 VM id list, but it should not<br>
        Image 21 has STATE USED_PERS     is    READY<br>
        Image 16 RUNNING_VMS has 1     is    0<br>
        VM 27 is in Image 16 VM id list, but it should not<br>
        Image 16 has STATE USED_PERS     is    READY<br>
        Image 15 RUNNING_VMS has 1     is    0<br>
        VM 30 is in Image 15 VM id list, but it should not<br>
        Image 15 has STATE USED_PERS     is    READY<br>
        Image 19 RUNNING_VMS has 1     is    0<br>
        VM 35 is in Image 19 VM id list, but it should not<br>
        Image 19 has STATE USED_PERS     is    READY<br>
        Image 23 RUNNING_VMS has 1     is    0<br>
        VM 47 is in Image 23 VM id list, but it should not<br>
        Image 23 has STATE USED_PERS     is    READY<br>
        VNet 0 has used lease 192.168.15.118 (VM 25)     but it is free<br>
        VNet 0 has used lease 192.168.15.116 (VM 24)     but it is free<br>
        VNet 0 has used lease 192.168.15.124 (VM 44)     but it is free<br>
        VNet 0 has used lease 192.168.15.128 (VM 35)     but it is free<br>
        VNet 0 has used lease 192.168.15.122 (VM 29)     but it is free<br>
        VNet 0 has used lease 192.168.15.123 (VM 30)     but it is free<br>
        VNet 0 has used lease 192.168.15.119 (VM 26)     but it is free<br>
        VNet 0 has used lease 192.168.15.120 (VM 27)     but it is free<br>
        VNet 0 has used lease 192.168.15.129 (VM 35)     but it is free<br>
        VNet 0 has used lease 192.168.15.125 (VM 44)     but it is free<br>
        VNet 0 has used lease 192.168.15.127 (VM 47)     but it is free<br>
        <small>VNet 0 TOTAL_LEASES has 28     is    17</small></small></i><i><small><br>
        <br>
        Total errors found: 39</small></i><br>
    <br>
    <br>
    We've executed the fsck again and this is the new output:<br>
    <br>
    <small><i>File /var/lib/one/mysql_localhost_opennebula.sql exists,
        backup aborted. Use -f to overwrite.</i><i><br>
      </i><i>Error running fsck version 3.8.1</i><i><br>
      </i><i>The database will be restored</i><i><br>
      </i><i>MySQL DB opennebula at localhost restored.</i></small><br>
    <br>
    After that, we've started OpenNebula again and there are no VM
    instances, but Status of most of the (persistent) Images is
    USED_PERS. It seems that images table has not been correctly
    updated, isn't it? What could we do (apart from deleting images
    table data) to correct it?<br>
    <br>
    Is there any way to avoid the "CLEANUP status" bug? I. e. something
    that triggers the bug and we should avoid executing...<br>
    <br>
    <br>
    Thanks in advance,<br>
    <br>
    Carlos.<br>
    <br>
    <br>
    On 12/18/2012 01:41 PM, Carlos Martín Sánchez wrote:<br>
    <blockquote
cite="mid:CAEPYvFKPSOYNSP7usUVG9R167Xh5gSpvOKT7oEzXr25JnGfvFQ@mail.gmail.com"
      type="cite">Hi,
      <div><br>
      </div>
      <div>You can stop opennebula, delete the VM rows from the DB, and
        then execute the onedb fsck [1] command.</div>
      <div><br>
      </div>
      <div>Regards</div>
      <div><br>
      </div>
      <div>[1] <a moz-do-not-send="true"
          href="http://opennebula.org/documentation:rel3.8:onedb">http://opennebula.org/documentation:rel3.8:onedb</a><br
          clear="all">
        <div>--<br>
          Carlos Martín, MSc<br>
          Project Engineer<br>
          OpenNebula - The Open-source Solution for Data Center
          Virtualization
          <div><span
style="border-collapse:collapse;color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px"><a
                moz-do-not-send="true" href="http://www.OpenNebula.org"
                target="_blank">www.OpenNebula.org</a> | <a
                moz-do-not-send="true"
                href="mailto:cmartin@opennebula.org" target="_blank">cmartin@opennebula.org</a>
              | <a moz-do-not-send="true"
                href="http://twitter.com/opennebula" target="_blank">@OpenNebula</a></span><span
style="border-collapse:collapse;color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px"></span></div>
        </div>
        <br>
        <br>
        <br>
        <div class="gmail_quote">On Mon, Dec 17, 2012 at 2:11 PM, Carlos
          Jiménez <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:cjimenez@eneotecnologia.com" target="_blank">cjimenez@eneotecnologia.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            Hi all,<br>
            <br>
            I have one machine with OpenNebula 3.8 and several hosts
            running KVM. Also, I have some VMs created.<br>
            The problem is that after rebooting the OpenNebula server,
            several VMs are in RUNNING state but most of them are in
            CLEANUP state. Once in that state, it is not possible to
            delete or to move them to a different state.<br>
            I've found a bug related to this issue: <a
              moz-do-not-send="true"
              href="http://dev.opennebula.org/issues/1605"
              target="_blank">http://dev.opennebula.org/issues/1605</a>
             but it seems that we will have to wait up to release 4.0 to
            solve it.<br>
            <br>
            I've tried manually deleting a VM with onevm delete ID and
            later manually deleting the VM instance folder/files (logs
            and disk) without success, because the VM appears again in
            the list of VMs with the same CLEANUP state. Would it be
            possible to manually remove the affected entries in the db
            and then reinstantiate the VM/template again? Any other
            idea?<br>
            <br>
            I would need to get those VMs up and running.<br>
            <br>
            <br>
            Thanks in advance.<br>
            <br>
            <br>
            Carlos.<br>
            _______________________________________________<br>
            Users mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:Users@lists.opennebula.org" target="_blank">Users@lists.opennebula.org</a><br>
            <a moz-do-not-send="true"
              href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org"
              target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>