[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] Device backend in another domain (xen)

Hi all,

Xen have (AFAIK unique) feature of having backend device in other domU
(sometimes called driver domain) instead of dom0. Currently libxl support it
for disk and network devices, but in general it is valid for any device
(perhaps excluding PCI). Current implementation requires ID of backend domain
to be specified during device attach/domain startup. There are some upcoming
patches to allow also use domain name.

I'd like to add support for it into libvirt. The question is how specify
domain reference. The simplest approach is to use direct domain ID, logically
it fits in <source/> tag, so something like:
    <disk type='file'>
      <source file='/path/to/file/inside/domain/7' domid='7'/>
      <target dev='xvdb'/>
    <interface type='bridge'>
      <source bridge='name-of-bridge-in-domiain-7' domid='7'/>

This have obvious limitation that domain ID changes with each domain restart.
But perhaps more correct approach is to use name or UUID?
Extending <source/> tag is right thing to do? Or should I add a new tag
(<backenddomain uuid='...'/> ? )?

Regarding implementation I need some hints how to do the value verification
(check if domain exists at least). If it has to be done in domain_conf.c
(during XML parsing) it will require predetermined domain load order, which
IMHO isn't acceptable. So perhaps the check should be done at domain
startup/device attach (by driver)?
In any case: is it possible at all to check if domain with given name/UUID
exists in scope of domain_conf.c? It looks like it requires connection
reference, which isn't passed to virDomain*DefParseXML.

Best Regards,
Marek Marczykowski
Invisible Things Lab

Attachment: signature.asc
Description: OpenPGP digital signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]