From: Dave Scott Subject: Re: [PATCH v2] implement libvirt-like 'channels' via PV consoles Date: Mon, 16 Jun 2014 13:49:36 +0000 Message-ID: <89F384A6-A676-4D02-AE5F-0498EDFD2207@citrix.com> References: <1402912195-24732-1-git-send-email-dave.scott@citrix.com> <20140616133407.GA8696@laptop.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WwXI3-0002cS-L9 for xen-devel@lists.xenproject.org; Mon, 16 Jun 2014 13:49:39 +0000 In-Reply-To: <20140616133407.GA8696@laptop.dumpdata.com> Content-Language: en-US Content-ID: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Konrad Rzeszutek Wilk Cc: "xen-devel@lists.xenproject.org" , Ian Campbell , Stefano Stabellini , Wei Liu , Ian Jackson List-Id: xen-devel@lists.xenproject.org Hi Konrad, On 16 Jun 2014, at 14:34, Konrad Rzeszutek Wilk wr= ote: > On Mon, Jun 16, 2014 at 10:49:49AM +0100, David Scott wrote: >> Several libvirt applications (e.g. oVirt, CloudStack) make use of 'chann= els': >> low-bandwidth private host <-> guest communication links which resemble = serial >> ports. Typical uses include: >> = >> * initial VM configuration without using the network: read the config d= ata >> directly from the channel on boot >> = >> * controlling a guest agent: signal shutdown reqests, exchange clipboar= d data, >> trigger resolution changes >> = >> This patch set re-uses the existing PV console protocol implemented by q= emu >> to provide this service. >> = >> If you declare a channel in your .xl file as follows: >> = >> channel =3D [ "type=3Dsocket,path=3D/tmp/mysock,name=3Dguest-agent" ] >> = >> then an extra PV console will be added to your guest. This console has t= he >> extra key in the frontend >> = >> name =3D guest-agent >> = >> which allows udev scripts in the VM to create a named device in a well-k= nown >> location (e.g. /dev/xen-channels/guest-agent, similar to the KVM /dev/vp= orts). > = > Are these udev scripts somewhere implemented? I=92ve been playing with these ones: https://github.com/djs55/mirage-console/tree/master/udev (ignore the reference to Mirage =97 you just need the .rules file and the h= elper script) Do you think an example udev script like this should live in the tree? > = > Thanks! Cheers, Dave > = >> The qemu process in the backend domain will proxy the data to/from the n= amed >> Unix domain socket (in this case /tmp/mysock). >> = >> Note this mechanism is intended for low-bandwidth communication only. If= an >> application requires a high-bandwith connection then it should use a dir= ect >> vchan connection (and not proxy it via a qemu). >> = >> Changes since v1: >> = >> * extend xl.cfg(5) >> * add docs/misc/channel.txt >> * libxl_types.idl: omit unnecessary init_val =3D 0 >> * xl_cmdimpl.c: fixed over-long lines >> * xl_cmdimpl.c: use xrealloc (via ARRAY_EXTEND_INIT) >> * xl_cmdimpl.c: exit() on parse failure rather than ignore configuration >> * libxl_create.c: use libxl__device_console_init instead of memset >> * libxl_create.c: use libxl__strdup(NOGC rather than raw strdup >> * libxl.c: add name=3D to console frontend >> * libxl.c: resolve the backend_domid from backend_domname >> * libxl_dm.c: channels[i].devid rather than i >> * libxl_dm.c: fix indentation >> * libxl_dm.c: use GCSPRINTF convenience macro >> = >> Signed-off-by: David Scott >> = >> = >> = >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xen.org >> http://lists.xen.org/xen-devel > = > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel