Proposal for virtual devices described in XML

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

 




My try of "ip" attribute failed because of a bug in patch. With this corrected file, it works as well as "target".

Pour :        libvir-list@xxxxxxxxxx
cc :        
Objet :        Proposal for virtual devices described in XML

After comments from Daniel P. Berrange and from Bull people, my proposal is reduced to following 2 functions:

/* Create a virtual device attachment to backend */
int virDomainAttachDevice(virDomainPtr domain, char *xml);
/* Destroy a virtual device attachment to backend */
int virDomainDetachDevice(virDomainPtr domain, char *xml);
/* @domain: pointer to domain object
* @xml: pointer to XML description of one device
* Returns 0 in case of success, -1 in case of failure. */

The XML would be in same form as the part of domain description for a single device, either <disk.../disk> or <interface.../interface>.
The device is identified by its target name. This attribute is optional for "interface" in domain description, but would become mandatory in Attach/Detach description. It is not yet processed in Libvirt-0.1.6 source xml.c (function
virDomainParseXMLIfDesc). I have successfully tried the attached patch, which tranlates "target" into Xen "vifname". (It processes "ip" attribute in same way, but my try failed, maybe because address value was invalid for Xen).

Attachment: difxml6
Description: Binary data


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]