<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=GB2312" http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    On 05/07/2012 11:12 AM, david_zhu wrote:
    <blockquote cite="mid:4FA73DB6.8030202@usish.com" type="cite">
      <meta http-equiv="content-type" content="text/html;
        charset=GB2312">
      Hi,<br>
      <br>
          When I destroy a VM, sometimes virsh will report failed.<br>
          So I tried the following shell script:<br>
      <br>
      <br>
      -bash-4.1# for ((i=0; i<1000; i++)); do virsh start david_mac;
      virsh destroy david_mac; if [ $? != 0 ] ; then echo $i; break; fi;
      done<br>
    </blockquote>
    It always works well for me based on the following version:<br>
    # virsh version<br>
    Compiled against library: libvir 0.9.10<br>
    Using library: libvir 0.9.10<br>
    Using API: QEMU 0.9.10<br>
    Running hypervisor: QEMU 0.12.1<br>
    <blockquote cite="mid:4FA73DB6.8030202@usish.com" type="cite"> <br>
      Domain david_mac started<br>
      <br>
      Domain david_mac destroyed<br>
      <br>
      ......<br>
      <br>
      Domain david_mac started<br>
      <br>
      error: Failed to destroy domain david_mac<br>
      error: Requested operation is not valid: domain is not running<br>
      <br>
      35<br>
      <br>
      <br>
          It always fail, and the VM state become "shut off":<br>
      <br>
      -bash-4.1# virsh list --all<br>
       Id Name                 State<br>
      ----------------------------------<br>
        - david_mac            shut off<br>
      <br>
      <br>
          My libvirt/KVM version is:<br>
      <br>
      -bash-4.1# virsh version<br>
      Compiled against library: libvir 0.9.8<br>
      Using library: libvir 0.9.8<br>
      Using API: QEMU 0.9.8<br>
      Running hypervisor: QEMU 0.14.1<br>
      <br>
      <br>
          Is this a libvirt bug, or KVM problem ?<br>
    </blockquote>
    I'm not sure it's a bug of libvirt 0.9.8, maybe, you may upgrade
    your<br>
    libvirt then check it again. thanks. <br>
    <blockquote cite="mid:4FA73DB6.8030202@usish.com" type="cite"> <br>
      <br>
      <div class="moz-signature">-- <br>
        <p class="MsoNormal" style="background: none repeat scroll 0% 0%
          rgb(255, 255, 253); line-height: 12pt;"> <b> <font
              color="black" face="Arial" size="1"> <span
                style="font-weight: bold; font-size: 9pt; color: black;
                font-family: Arial;" lang="FR"> Best Regards </span> </font>
          </b> </p>
        <p class="MsoNormal" style="background: none repeat scroll 0% 0%
          rgb(255, 255, 253); line-height: 12pt;"> <b> <font
              color="black" face="Arial" size="1"> <span
                style="font-weight: bold; font-size: 9pt; color: black;
                font-family: Arial;" lang="FR">
                *************************************************************************

                <o:p></o:p> </span> </font> </b> </p>
        <p class="MsoNormal" style="background: none repeat scroll 0% 0%
          rgb(255, 255, 253); line-height: 12pt;"> <b> <font
              color="black" face="Arial" size="1"> <span
                style="font-weight: bold; font-size: 9pt; color: black;
                font-family: Arial;" lang="FR"> David Zhu </span> </font>
          </b> <st1:personname w:st="on"> <b> <font color="black"
                face="宋体" size="1"> <span style="font-weight: bold;
                  font-size: 9pt; color: black; font-family: 宋体;"> 朱慧 </span>
              </font> </b> </st1:personname> <font color="black"
            face="Arial" size="1"> <span style="font-size: 9pt; color:
              black; font-family: Arial;" lang="FR"> Firmware Engineer </span>
          </font> </p>
        <p class="MsoNormal" style="line-height: 12pt;"> <font
            color="black" face="Arial" size="1"> <span
              style="font-size: 9pt; color: black; font-family: Arial;"
              lang="FR"> Enterprise Storage / R&D Dept. </span> </font>
        </p>
        <p class="MsoNormal" style="background: none repeat scroll 0% 0%
          rgb(255, 255, 253); line-height: 12pt;"> <font color="black"
            face="Arial" size="1"> <span style="font-size: 9pt; color:
              black; font-family: Arial;" lang="FR"> Universal
              Scientific Industrial (Shanghai) Co., Ltd </span> </font>
        </p>
        <p class="MsoNormal" style="background: none repeat scroll 0% 0%
          rgb(255, 255, 253); line-height: 12pt;"> <font color="black">
            <span style="font-size: 9pt; font-family: Arial;" lang="FR">
              421 Lishizhen Road, Pudong New Area, Shanghai, P.R. China
              201203 上海市浦东新区张江高科技园区李时珍路421号 邮编: 201203 </span> </font>
        </p>
        <p class="MsoNormal" style="background: none repeat scroll 0% 0%
          rgb(255, 255, 253); line-height: 12pt;"> <font color="black"
            face="Arial" size="1"> <span style="font-size: 9pt; color:
              black; font-family: Arial;" lang="FR">
              Fax: +86-21-58967931    Tel: +86-21-58966996   <b> <span
                  style="font-weight: bold;"> ext. 81468 </span> </b>
            </span> </font> </p>
        <p class="MsoNormal" style="background: none repeat scroll 0% 0%
          rgb(255, 255, 253); line-height: 12pt;"> <font color="black"
            face="Times New Roman" size="1"> <span style="font-size:
              9pt; color: black;" lang="EN-US"> <a
                moz-do-not-send="true" title="http://www.usi.com.tw/"
                href="http://www.usi.com.tw/"> <font
                  title="http://www.usi.com.tw/" color="black"
                  face="Arial"> <span title="http://www.usi.com.tw/"> <span
                      style="color: black; font-family: Arial;
                      text-decoration: none;" lang="FR">
                      http://www.usi.com.tw </span> </span> </font> </a>
            </span> </font> <b> <font color="black" face="Arial"
              size="1"> <span style="font-weight: bold; font-size: 9pt;
                color: black; font-family: Arial;" lang="FR">
                    E-mail: <u> <a moz-do-not-send="true"
                    title="mailto:cotton_sun@usish.com"
                    href="mailto:cotton_sun@usish.com"> <font
                      title="mailto:cotton_sun@usish.com" color="black">
                      <span title="mailto:cotton_sun@usish.com"> <span
                          style="color: black;"> david_zhu@usish.com </span>
                      </span> </font> </a> </u> </span> </font> </b>
        </p>
        <p class="MsoNormal" style="background: none repeat scroll 0% 0%
          rgb(255, 255, 253); line-height: 12pt;"> <b> <font
              color="black" face="Arial" size="1"> <span
                style="font-weight: bold; font-size: 9pt; color: black;
                font-family: Arial;" lang="FR">
                **************************************************************************

              </span> </font> </b> <font size="1"> <span
              style="font-size: 9pt;" lang="FR"><o:p></o:p></span></font></p>
      </div>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
libvirt-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:libvirt-users@redhat.com">libvirt-users@redhat.com</a>
<a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/libvirt-users">https://www.redhat.com/mailman/listinfo/libvirt-users</a></pre>
    </blockquote>
    <br>
  </body>
</html>