[libvirt-users] vnc port/listen address ignored when setting machine?

Hi, First of all, I hope it's not a big problem - I'm running on Debian, not Redhat. To my problem: I'm starting to learn virtualization, libvirt, and decided to create some test machine. I did it with: virt-install --name debian-test \ --os-type=linux \ --os-variant=debianwheezy \ --cdrom /media/media/software/iso/debian-testing-amd64-netinst-2014-01-16.iso \ --graphics vnc,listen=0.0.0.0,port=20001 \ --disk pool=default,format=raw,size=20 \ --ram 2048 \ --vcpus=2 \ --network bridge=virbr0 \ --hvm \ --virt-type=kvm Machine starts, but domdisplay shows: =# virsh domdisplay debian-test vnc://localhost:14101 When I tried setting it with --grpahics=vnc,...port=40001, I got it to listen on port 34101 (which is weird anyway, but at least I can change it). But whatever I do - I can't make it to listen on 0.0.0.0. I know I can use ssh port forwarding to get to this VNC, but I would very much prefer to be able to set VNC listen to 0.0.0.0 for at least some of my test domains. What am I doing wrong? Best regards, depesz -- The best thing about modern society is how easy it is to avoid contact with it. http://depesz.com/

On 01/16/2014 04:51 PM, hubert depesz lubaczewski wrote:
Hi, First of all, I hope it's not a big problem - I'm running on Debian, not Redhat.
To my problem: I'm starting to learn virtualization, libvirt, and decided to create some test machine. I did it with: virt-install --name debian-test \ --os-type=linux \ --os-variant=debianwheezy \ --cdrom /media/media/software/iso/debian-testing-amd64-netinst-2014-01-16.iso \ --graphics vnc,listen=0.0.0.0,port=20001 \ --disk pool=default,format=raw,size=20 \ --ram 2048 \ --vcpus=2 \ --network bridge=virbr0 \ --hvm \ --virt-type=kvm
Machine starts, but domdisplay shows: =# virsh domdisplay debian-test vnc://localhost:14101
When I tried setting it with --grpahics=vnc,...port=40001, I got it to listen on port 34101 (which is weird anyway, but at least I can change it).
Libvirt's XML and virt-install expect the TCP port, virsh domdisplay shows the VNC port, which is the TCP port minus 5900. For graphics listening on the wildcard address, domdisplay always shows 'localhost'.
But whatever I do - I can't make it to listen on 0.0.0.0.
What is the address reported by 'netstat -tnp'? Jan

On Thu, Jan 16, 2014 at 05:11:52PM +0100, Ján Tomko wrote:
On 01/16/2014 05:10 PM, Ján Tomko wrote:
On 01/16/2014 04:51 PM, hubert depesz lubaczewski wrote:
What is the address reported by 'netstat -tnp'? Oops, 'nestat -tlnp'.
=# netstat -ntlp | grep -i qem tcp 0 0 0.0.0.0:20001 0.0.0.0:* LISTEN 5595/qemu-system-x8 So it's listening where I wanted it to, it's just that output from domgraphics shows wrong (well, different) values. Thanks. That was simple and fast. Best regards, depesz -- The best thing about modern society is how easy it is to avoid contact with it. http://depesz.com/
participants (2)
-
hubert depesz lubaczewski
-
Ján Tomko