Fwd: RE: Bug: Spice port changed!!!!!

This is a multi-part message in MIME format. --------------000005010404040804050304 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit -------- Forwarded Message -------- Subject: RE: [ovirt-users] Bug: Spice port changed!!!!! Date: Thu, 25 Sep 2014 15:10:54 +0800 From: PaulCheung <eq2008@msn.com> To: Vinzenz Feenstra <vfeenstr@redhat.com> Thank you very much! Finally, all my problem solved!!!! #!/bin/bash #start Vm curl --insecure --request POST --header "Accept: application/xml" --header "Content-Type: application/xml" --user 'admin@internal:kvmadmin!' --data '<action> </action>' "https://kvm01.allwinnertech.com/ovirt-engine/api/vms/714261c4-2139-4315-8d8c..." #Set VM ticket curl --insecure --request POST --header "Accept: application/xml" --header "Content-Type: application/xml" --user 'admin@internal:kvmadmin!' --data '<action><ticket><expiry>1234567890</expiry><value>123456</value></ticket></action>' "https://kvm01.allwinnertech.com/ovirt-engine/api/vms/714261c4-2139-4315-8d8c..." #Connect to the VM curl -k -v -u 'admin@internal:kvmadmin!' -H "Content-type: application/xml" -X GET https://172.16.1.115/api/vms/714261c4-2139-4315-8d8c-802b895c6aea > ./vm.info p1=$(cat ./vm.info|grep '<port>') p2=$(cat ./vm.info|grep '<secure_port>') port1=${p1:0-11:4} port2=${p2:0-18:4} spicec -h kvm01.allwinnertech.com -w 123456 -p $port1 -s $port2 -f --ca-file=./ca.crt >/dev/null 2>&1 & Sincerely yours, PaulCheung tel: 180-8882-7173 ------------------------------------------------------------------------ Date: Thu, 25 Sep 2014 09:07:05 +0200 From: vfeenstr@redhat.com To: eq2008@msn.com Subject: Re: [ovirt-users] Bug: Spice port changed!!!!! On 09/25/2014 03:48 AM, PaulCheung wrote: *curl -k -v -u 'admin@internal:password' -H "Content-type: application/json" -X POST https://172.16.1.115/api/vms/714261c4-2139-4315-8d8c-802b895c6aea/start* *The body was missing: -d "{}" This should work: curl -k -v -u 'admin@internal:password' -H "Content-type: application/json" -X POST https://172.16.1.115/api/vms/714261c4-2139-4315-8d8c-802b895c6aea/start* *-d "{}*" -- Regards, Vinzenz Feenstra | Senior Software Engineer RedHat Engineering Virtualization R & 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 --------------000005010404040804050304 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit <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"><eq2008@msn.com></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"><vfeenstr@redhat.com></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 '<action> </action>' <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 '<action><ticket><expiry>1234567890</expiry><value>123456</value></ticket></action>' <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> > ./vm.info</font></div> <div><font color="#8c0095">p1=$(cat ./vm.info|grep '<port>')</font></div> <div><font color="#8c0095">p2=$(cat ./vm.info|grep '<secure_port>')</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 >/dev/null 2>&1 &</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 & 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> --------------000005010404040804050304--
participants (1)
-
Vinzenz Feenstra