
On Mon, Dec 12, 2011 at 10:18:23AM +0900, MATSUDA, Daiki wrote:
In addition, the QEMU guest agent requires specified socket. Virt IO Console, too. But unfortunately libvirt does not support to xml tags to give socket name options to QEMU for the QEMU guest agent and Virt IO Console.
Err, yes we do.
<channel type='unix'> <source mode='bind' path='/var/lib/libvirt/qemu/f16x86_64.agent'/> <target type='virtio' name='org.qemu.guest_agent.0'/> </channel>
Yes, I confirmed that it can create the socket for guest agent and communicate to guest.
Or for the console
<console type='unix'> <source mode='bind' path='/var/lib/libvirt/qemu/f16x86_64.console'/> <target type='virtio'/> </channel>
though you really want to use type=pty for consoles, so that 'virsh console' works correctly.
Daniel
But It is not enough. Because I use the socket for VirtIO console, i.e. gives the option '-device virtconsole,chardev=...,name=foo' for qemu.
And I read the source code, but found funny... In src/conf/domain_conf.h, struct _virDomainChrDef is struct _virDomainChrDef { ... union { int port; /* parallel, serial, console */ virSocketAddrPtr addr; /* guestfwd */ char *name; /* virtio */ } target; ... It is written that virtio must use char *name.
But in docs/schemas/domaincommon.rng and others, VirtIO Console use only int port.
Thoug I do not understand that which should be used, I attaches the patch for using *name.
Neither is really relevant for virtio-console, it just provides one or more interactive console for admins. The name is only relevant when coming to create virtio serial channels for non-interactive use. eg the <channel> elements. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|