[libvirt-users] virtio-serial port that listens tcp socket on host

Hello. Is that possible to create virtio-serial port that on host listens tcp socket and how to avoid duplicate listened ports in case of migration? -- Vasiliy Tolstov, e-mail: v.tolstov@selfip.ru jabber: vase@selfip.ru

On Tue, Aug 26, 2014 at 6:56 PM, Vasiliy Tolstov <v.tolstov@selfip.ru> wrote:
Hello. Is that possible to create virtio-serial port that on host listens tcp socket and how to avoid duplicate listened ports in case of migration?
-- Vasiliy Tolstov, e-mail: v.tolstov@selfip.ru jabber: vase@selfip.ru
_______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users
Hello, not, right now it is not possible. Why don`t you want to just assign unique paths for socket name, derived, say, from VM` UUID?

2014-08-26 19:11 GMT+04:00 Andrey Korolyov <andrey@xdel.ru>:
not, right now it is not possible. Why don`t you want to just assign unique paths for socket name, derived, say, from VM` UUID?
In case of unix domain sockets paths not problem, but i want to connect to each qemu-ga address from central point. I don't want to use socat , as i see qemu have ability to specify host and port and in this case qemu listens tcp port on this address. But in libvirt schema i can't provide host and port. -- Vasiliy Tolstov, e-mail: v.tolstov@selfip.ru jabber: vase@selfip.ru

On 26.08.2014 18:42, Vasiliy Tolstov wrote:
2014-08-26 19:11 GMT+04:00 Andrey Korolyov <andrey@xdel.ru <mailto:andrey@xdel.ru>>:
not, right now it is not possible. Why don`t you want to just assign unique paths for socket name, derived, say, from VM` UUID?
In case of unix domain sockets paths not problem, but i want to connect to each qemu-ga address from central point. I don't want to use socat , as i see qemu have ability to specify host and port and in this case qemu listens tcp port on this address. But in libvirt schema i can't provide host and port.
From http://libvirt.org/formatdomain.html#elementsCharTCP <devices> <serial type="tcp"> <source mode="connect" host="0.0.0.0" service="2445"/> <protocol type="raw"/> <target port="1"/> </serial> </devices> (side note, I wonder why the heck we try to connect to 0.0.0.0:2445 in the example) I'd say substitute 0.0.0.0 with the IP address of your mgmt host. And use unique port number per domain, otherwise you'd have to pass XML with changed/unique port upon migration. Michal

On Fri, Sep 5, 2014 at 10:45 AM, Michal Privoznik <mprivozn@redhat.com> wrote:
On 26.08.2014 18:42, Vasiliy Tolstov wrote:
2014-08-26 19:11 GMT+04:00 Andrey Korolyov <andrey@xdel.ru <mailto:andrey@xdel.ru>>:
not, right now it is not possible. Why don`t you want to just assign unique paths for socket name, derived, say, from VM` UUID?
In case of unix domain sockets paths not problem, but i want to connect to each qemu-ga address from central point. I don't want to use socat , as i see qemu have ability to specify host and port and in this case qemu listens tcp port on this address. But in libvirt schema i can't provide host and port.
From http://libvirt.org/formatdomain.html#elementsCharTCP
<devices> <serial type="tcp"> <source mode="connect" host="0.0.0.0" service="2445"/> <protocol type="raw"/> <target port="1"/> </serial> </devices>
(side note, I wonder why the heck we try to connect to 0.0.0.0:2445 in the example)
I'd say substitute 0.0.0.0 with the IP address of your mgmt host. And use unique port number per domain, otherwise you'd have to pass XML with changed/unique port upon migration.
Michal
Michal, I suspect that Vasily mentioned channel block where virtio-serial setup belongs, not serial. For now, libvirt does not allow to add TCP connection inside.

2014-09-05 10:45 GMT+04:00 Michal Privoznik <mprivozn@redhat.com>:
From http://libvirt.org/formatdomain.html#elementsCharTCP
<devices> <serial type="tcp"> <source mode="connect" host="0.0.0.0" service="2445"/> <protocol type="raw"/> <target port="1"/> </serial> </devices>
(side note, I wonder why the heck we try to connect to 0.0.0.0:2445 in the example)
I'd say substitute 0.0.0.0 with the IP address of your mgmt host. And use unique port number per domain, otherwise you'd have to pass XML with changed/unique port upon migration.
This is character device, but i need channel with virtio serial. But serial also may be useful.... Thanks -- Vasiliy Tolstov, e-mail: v.tolstov@selfip.ru jabber: vase@selfip.ru
participants (3)
-
Andrey Korolyov
-
Michal Privoznik
-
Vasiliy Tolstov