<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:΢ÈíÑźÚ
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Dear David:<div><br></div><div>I am trying figure it out using my way. So I used "virsh edit vm", I change the port the 5980 & 5981, but still not work!!!</div><div><br></div><div><div id="inlineImage1" style="display: inline-block"><script type="jsv#717_"></script> <span contenteditable="true"> </span> <div style="display: inline-block" unselectable="on" contenteditable="false" class="inlineImage" initheight="140" initwidth="1244"><img src="cid:inlineImage1" height="140" width="1244"></div> <span contenteditable="true"> </span><script type="jsv/717_"></script></div><br></div><div><br></div><div>I found after virsh edit, there is a xml file here /etc/libvirt/qemu which I edit using "virsh edit vm".</div><div><br></div><div>And I also run this command : "virsh define vm.xml" </div><div><br></div><div>also not work. Can you tell me where is the file I can fixed the spice port.</div><div><br><br><div>
<br><br>Sincerely yours,<br>PaulCheung<br><br><br> tel: 180-8882-7173<br></div><br><br><div>> Subject: Re: [ovirt-users] Bug: Spice port changed!!!!!<br>> From: djasa@redhat.com<br>> To: eq2008@msn.com<br>> CC: users@ovirt.org<br>> Date: Thu, 18 Sep 2014 15:27:50 +0200<br>> <br>> Hi,<br>> <br>> 2) is not a file, it's a key in engine-config<br>> 3) is a VDSM custom hook that needs to be in all the hypervisors in DC/Cluster<br>> <br>> Follow vdsm custom hook documentation (I don't have a link from top of my head but web or ML archives will surely help).<br>> <br>> David<br>> <br>> On Thu, 2014-09-18 at 14:51 +0800, PaulCheung wrote:<br>> > Dear David,<br>> > <br>> > <br>> > Thank you for your help . Your answer is very professional.<br>> > <br>> > <br>> > I still can't not find a way to stick with static port assignments<br>> > For I don't understand you telling me , 2&3, where I can find the<br>> > file to modify?<br>> > <br>> > <br>> > <br>> > <br>> > <br>> > <br>> > > However, if you _really_ want to stick with static port assignments,<br>> > do<br>> > > the following:<br>> > > 1) designate the port range so that it doesn't collide with other<br>> > ranges<br>> > > in use (e.g. RHEV uses 5900-6023, so 5800-5899 could be safe)<br>> > > 2) add a custom VM properties to the engine for setting of port and<br>> > > tls-port<br>> > > 3) add a vdsm hook to before_vm_start directory on each host that<br>> > will<br>> > > add "port" and "tlsPort" parameters to the graphics element of<br>> > libvirt<br>> > > domain xml<br>> > > <br>> > <br>> > <br>> > <br>> > <br>> > <br>> > <br>> > Sincerely yours,<br>> > PaulCheung<br>> > <br>> > <br>> > tel: 180-8882-7173<br>> > <br>> > <br>> > <br>> > > Subject: Re: [ovirt-users] Bug: Spice port changed!!!!!<br>> > > From: djasa@redhat.com<br>> > > To: eq2008@msn.com<br>> > > CC: users@ovirt.org<br>> > > Date: Wed, 17 Sep 2014 10:40:42 +0200<br>> > > <br>> > > Hi Paul,<br>> > > <br>> > > This behaviour is by design. It is a bad idea to override it. A good<br>> > > approach to your problem would be to write a launcher script that<br>> > would:<br>> > > 1) connect to the REST API<br>> > > 2) get the VM connection details<br>> > > 3) get new VM ticket<br>> > > 4) write this info down to a temporary .vv file [3]<br>> > > 5) launch remote-viewer<br>> > > <br>> > > Some info how to use REST API is described here [1] and .vv file<br>> > format<br>> > > is documented in virt-viewer sources [2]. Please note that [1] is a<br>> > bit<br>> > > outdated:<br>> > > * you can use HTTP header "filter: true" to be able to log in as<br>> > non-admin<br>> > > * you only have to use password login once when you use<br>> > > "prefer: persistent-auth" HTTP header and you send the cookie you<br>> > got<br>> > > in a response to first request.<br>> > > In the future, the steps 2-4 will become a one step of getting a<br>> > > ready-to-use .vv file from the API [3] but we aren't there yet.<br>> > > <br>> > > [1]<br>> > http://www.ovirt.org/How_to_Connect_to_SPICE_Console_Without_Portal<br>> > > [2]<br>> > https://git.fedorahosted.org/cgit/virt-viewer.git/tree/src/virt-viewer-file.c#n30<br>> > > [3] https://bugzilla.redhat.com/show_bug.cgi?id=1128763<br>> > > <br>> > > <br>> > > However, if you _really_ want to stick with static port assignments,<br>> > do<br>> > > the following:<br>> > > 1) designate the port range so that it doesn't collide with other<br>> > ranges<br>> > > in use (e.g. RHEV uses 5900-6023, so 5800-5899 could be safe)<br>> > > 2) add a custom VM properties to the engine for setting of port and<br>> > > tls-port<br>> > > 3) add a vdsm hook to before_vm_start directory on each host that<br>> > will<br>> > > add "port" and "tlsPort" parameters to the graphics element of<br>> > libvirt<br>> > > domain xml<br>> > > <br>> > > <br>> > > Best regards,<br>> > > <br>> > > David<br>> > > <br>> > > On St, 2014-09-17 at 10:41 +0800, PaulCheung wrote:<br>> > > > Dear all,<br>> > > > <br>> > > > <br>> > > > After shutdown the VM, then restart the VM the Vm's spice port is<br>> > > > changed!<br>> > > > <br>> > > > <br>> > > > <br>> > > > <br>> > > > <br>> > > > <br>> > > > <br>> > > > Because I have 10 terminal ARM-Box running spice client connected<br>> > to<br>> > > > the vm, but after the VM shutdown and start again, the vm not the<br>> > one<br>> > > > whice the one before.<br>> > > > <br>> > > > <br>> > > > I wish you can let us have a option, to let the VM with a fixed<br>> > spice<br>> > > > port, like:<br>> > > > vm1: spice port : 5900 tls:5901<br>> > > > vm2: 5902 5903<br>> > > > <br>> > > > <br>> > > > And I have another recommond: have a fuction to do that :<br>> > > > <br>> > > > <br>> > > > if the vm shutdown by user, it will start the VM automatic. That<br>> > > > means the VM can not be shutdown!<br>> > > > <br>> > > > <br>> > > > <br>> > > > <br>> > > > <br>> > > > <br>> > > > I hope you can have this two fuction! That means a lot to those<br>> > who<br>> > > > are using Terminal box user like me.<br>> > > > <br>> > > > <br>> > > > <br>> > > > <br>> > > > I am sorry for my poor English. But I hope you all can understand<br>> > > > what I am saying.<br>> > > > <br>> > > > <br>> > > > <br>> > > > <br>> > > > <br>> > > > <br>> > > > <br>> > > > <br>> > > > <br>> > > > <br>> > > > <br>> > > > Sincerely yours,<br>> > > > PaulCheung<br>> > > > <br>> > > > <br>> > > > tel: 180-8882-7173<br>> > > > <br>> > > > _______________________________________________<br>> > > > Users mailing list<br>> > > > Users@ovirt.org<br>> > > > http://lists.ovirt.org/mailman/listinfo/users<br>> > > <br>> > > <br>> > <br>> > _______________________________________________<br>> > Users mailing list<br>> > Users@ovirt.org<br>> > http://lists.ovirt.org/mailman/listinfo/users<br>> <br>> <br></div></div>                                            </div></body>
</html>