[ovirt-users] Fwd: RE: Bug: Spice port changed!!!!!

Vinzenz Feenstra vfeenstr at redhat.com
Thu Sep 25 03:14:42 EDT 2014




-------- Forwarded Message --------
Subject: 	RE: [ovirt-users] Bug: Spice port changed!!!!!
Date: 	Thu, 25 Sep 2014 15:10:54 +0800
From: 	PaulCheung <eq2008 at msn.com>
To: 	Vinzenz Feenstra <vfeenstr at 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 at internal:kvmadmin!' --data '<action> </action>' 
"https://kvm01.allwinnertech.com/ovirt-engine/api/vms/714261c4-2139-4315-8d8c-802b895c6aea/start"

#Set VM ticket
curl --insecure --request POST --header "Accept: application/xml" 
--header "Content-Type: application/xml" --user 
'admin at 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-802b895c6aea/ticket"

#Connect to the VM
curl -k -v -u 'admin at 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 at redhat.com
To: eq2008 at msn.com
Subject: Re: [ovirt-users] Bug: Spice port changed!!!!!

On 09/25/2014 03:48 AM, PaulCheung wrote:

    *curl -k -v -u 'admin at 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 at 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



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20140925/93bd160c/attachment.html>


More information about the Users mailing list