<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <br>
    <div class="moz-forward-container"><br>
      <br>
      -------- Forwarded Message --------
      <table class="moz-email-headers-table" border="0" cellpadding="0"
        cellspacing="0">
        <tbody>
          <tr>
            <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Subject:
            </th>
            <td>RE: [ovirt-users] Bug: Spice port changed!!!!!</td>
          </tr>
          <tr>
            <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Date: </th>
            <td>Thu, 25 Sep 2014 15:10:54 +0800</td>
          </tr>
          <tr>
            <th nowrap="nowrap" valign="BASELINE" align="RIGHT">From: </th>
            <td>PaulCheung <a class="moz-txt-link-rfc2396E" href="mailto:eq2008@msn.com">&lt;eq2008@msn.com&gt;</a></td>
          </tr>
          <tr>
            <th nowrap="nowrap" valign="BASELINE" align="RIGHT">To: </th>
            <td>Vinzenz Feenstra <a class="moz-txt-link-rfc2396E" href="mailto:vfeenstr@redhat.com">&lt;vfeenstr@redhat.com&gt;</a></td>
          </tr>
        </tbody>
      </table>
      <br>
      <br>
      <style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:微软雅黑
}
--></style>
      <div dir="ltr">Thank you very much!   Finally,  all my problem
        solved!!!!   
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>
          <div><font color="#8c0095">#!/bin/bash</font></div>
          <div><font color="#8c0095"><br>
            </font></div>
          <div><font color="#8c0095">#start Vm</font></div>
          <div><font color="#8c0095">curl --insecure --request POST
              --header "Accept: application/xml" --header "Content-Type:
              application/xml" --user 'admin@internal:kvmadmin!' --data
              '&lt;action&gt; &lt;/action&gt;'
<a class="moz-txt-link-rfc2396E" href="https://kvm01.allwinnertech.com/ovirt-engine/api/vms/714261c4-2139-4315-8d8c-802b895c6aea/start">"https://kvm01.allwinnertech.com/ovirt-engine/api/vms/714261c4-2139-4315-8d8c-802b895c6aea/start"</a></font></div>
          <div><font color="#8c0095"><br>
            </font></div>
          <div><font color="#8c0095">#Set VM ticket</font></div>
          <div><font color="#8c0095">curl --insecure --request POST
              --header "Accept: application/xml" --header "Content-Type:
              application/xml" --user 'admin@internal:kvmadmin!' --data
              '&lt;action&gt;&lt;ticket&gt;&lt;expiry&gt;1234567890&lt;/expiry&gt;&lt;value&gt;123456&lt;/value&gt;&lt;/ticket&gt;&lt;/action&gt;'
<a class="moz-txt-link-rfc2396E" href="https://kvm01.allwinnertech.com/ovirt-engine/api/vms/714261c4-2139-4315-8d8c-802b895c6aea/ticket">"https://kvm01.allwinnertech.com/ovirt-engine/api/vms/714261c4-2139-4315-8d8c-802b895c6aea/ticket"</a></font></div>
          <div><font color="#8c0095"><br>
            </font></div>
          <div><font color="#8c0095">#Connect to the VM</font></div>
          <div><font color="#8c0095">curl -k -v -u
              'admin@internal:kvmadmin!' -H "Content-type:
              application/xml" -X GET
              <a class="moz-txt-link-freetext" href="https://172.16.1.115/api/vms/714261c4-2139-4315-8d8c-802b895c6aea">https://172.16.1.115/api/vms/714261c4-2139-4315-8d8c-802b895c6aea</a>
              &gt; ./vm.info</font></div>
          <div><font color="#8c0095">p1=$(cat ./vm.info|grep
              '&lt;port&gt;')</font></div>
          <div><font color="#8c0095">p2=$(cat ./vm.info|grep
              '&lt;secure_port&gt;')</font></div>
          <div><span style="font-size: 12pt;"><font color="#8c0095">port1=${p1:0-11:4}</font></span></div>
          <div><font color="#8c0095">port2=${p2:0-18:4}</font></div>
          <div><span style="font-size: 12pt;"><font color="#8c0095"><br>
              </font></span></div>
          <div><span style="font-size: 12pt;"><font color="#8c0095"><br>
              </font></span></div>
          <div><span style="font-size: 12pt;"><font color="#8c0095">spicec
                -h kvm01.allwinnertech.com -w 123456 -p $port1 -s $port2
                -f --ca-file=./ca.crt &gt;/dev/null 2&gt;&amp;1 &amp;</font></span></div>
          <div><br>
          </div>
          <div><br>
          </div>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
          <br>
          <div>
            <br>
            <br>
            Sincerely yours,<br>
            PaulCheung<br>
            <br>
            <br>
             tel: 180-8882-7173<br>
          </div>
          <br>
          <br>
          <div>
            <hr id="stopSpelling">Date: Thu, 25 Sep 2014 09:07:05 +0200<br>
            From: <a class="moz-txt-link-abbreviated" href="mailto:vfeenstr@redhat.com">vfeenstr@redhat.com</a><br>
            To: <a class="moz-txt-link-abbreviated" href="mailto:eq2008@msn.com">eq2008@msn.com</a><br>
            Subject: Re: [ovirt-users] Bug: Spice port changed!!!!!<br>
            <br>
            <div class="ecxmoz-cite-prefix">On 09/25/2014 03:48 AM,
              PaulCheung wrote:<br>
            </div>
            <blockquote
              cite="mid:BLU180-W4629BA60EB71984015A0ABDBBE0@phx.gbl"><span
                style="font-size:12pt;"><font color="#8c0095"><b>curl -k
                    -v -u 'admin@internal:password' -H "Content-type:
                    application/json" -X POST <a moz-do-not-send="true"
                      class="ecxmoz-txt-link-freetext"
href="https://172.16.1.115/api/vms/714261c4-2139-4315-8d8c-802b895c6aea/start"
                      target="_blank">https://172.16.1.115/api/vms/714261c4-2139-4315-8d8c-802b895c6aea/start</a></b></font></span></blockquote>
            <span style="font-size:12pt;"><b>The body was missing: -d
                "{}"<br>
                <br>
                This should work:<br>
                <br>
                curl -k -v -u 'admin@internal:password' -H
                "Content-type: application/json" -X POST <a
                  moz-do-not-send="true"
                  class="ecxmoz-txt-link-freetext"
href="https://172.16.1.115/api/vms/714261c4-2139-4315-8d8c-802b895c6aea/start"
                  target="_blank">https://172.16.1.115/api/vms/714261c4-2139-4315-8d8c-802b895c6aea/start</a></b></span>
            <b>-d "{}</b>"<br>
            <pre class="ecxmoz-signature">-- 
Regards,

Vinzenz Feenstra | Senior Software Engineer
RedHat Engineering Virtualization R &amp; D
Phone: +420 532 294 625
IRC: vfeenstr or evilissimo

Better technology. Faster innovation. Powered by community collaboration.
See how it works at redhat.com</pre>
          </div>
        </div>
      </div>
      <br>
    </div>
    <br>
  </body>
</html>