[libvirt] Node devices?

Ed Swierk eswierk at aristanetworks.com
Thu Feb 11 00:23:04 UTC 2010


On Wed, Feb 10, 2010 at 1:02 AM, Daniel P. Berrange <berrange at redhat.com> wrote:
> Mostly what Alex already said :-)
>
> The libvirt APIs are split into several functional areas
>
>  - virDomain - guest management
>  - virInterface - host network interface configuration
>  - virStorage   - storage manangement
>  - virNetwork   - virtual networking
>
> The goal is that an app should be able to accomplish all its virtualization
> management tasks without needing any other remote access to the host via
> SSH or other systems. Many of the APIs for those areas I mention above
> require knowledge of what physical devices are present on the machine. For
> example, assigning a PCI or USB device to a guests requires that you know
> what PCI / USB devices the host has. Setting up a storage pool requires
> knowing what disks are available. Configuring network interfaces requires
> knowing what NICs are available, etc.  So 'virNodeDev' APIs provide the
> missing link that lets you discover the information about a host that you
> need in order to use the other APIs.

Thanks, Daniel and Alex, that helps a lot.

I'm still not clear about the purpose of the node device XML format,
and the nodedev-create virsh command. What does it mean to "create a
device" on a node, if the node device info is gathered via udev or hal
from the actual hardware? Is this to fill in gaps in udev's or hal's
knowledge of the hardware?

(In addition to sheer curiosity, I'm thinking about whether the node
device API could be used to solve a specific issue with the current
macvtap implementation, namely handling the dynamic addition and
removal of the underlying network device. I want to try to understand
the libvirt-y way of doing things before I go and propose something
completely stupid...)

--Ed




More information about the libvir-list mailing list