-------- Forwarded Message --------
Subject:        RE: [ovirt-users] Bug: Spice port changed!!!!!
Date:   Thu, 25 Sep 2014 15:10:54 +0800
From:   PaulCheung <[email protected]>
To:     Vinzenz Feenstra <[email protected]>



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-802b895c6aea/start";

#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-802b895c6aea/ticket";

#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: [email protected]
To: [email protected]
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



_______________________________________________
Users mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/users

Reply via email to