[libvirt] virtio console: name=foo is not supported
MATSUDA, Daiki
matsudadik at intellilink.co.jp
Mon Dec 12 01:18:23 UTC 2011
>> 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.
P.S. I can not use GIT, because live in restricted network.
MATSUDA Daiki
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: libvirt-0.9.8-virtioconsole-support-name.patch
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20111212/4ddaf42c/attachment-0001.ksh>
More information about the libvir-list
mailing list