Hi,

I am using <interface type='hostdev'> to assign SR-IOV VFs to QEMU/KVM
guests. libvirt lets me set the MAC address and the VLAN tag on that
element, but there is no way to set an IP address.

I would like to know which of these is the case:

  (a) libvirt cannot set it. The guest's IP address lives in the guest's
      own network stack, and with VFIO the host is not in the data path,
      so there is nothing host-side that could apply it.

  (b) libvirt could set it, but it has simply never been implemented.

I believe the answer is (a), because the <ip> element was added to
<hostdev mode='capabilities' type='net'> only for the LXC case, where the
host owns the container's network namespace:

  
https://lists.libvirt.org/archives/list/[email protected]/message/6OHH6V7FLIDOEDXQ5TGY4RLDV4AFV3IS/

But I would like that confirmed rather than inferred.

If it is (a), would you consider saying so in the documentation? The
hostdev interface section of formatdomain does not mention IP addresses
at all, so there is nothing telling a reader that this is out of scope by
design, or pointing them at the alternatives (a DHCP reservation keyed to
the MAC that libvirt already sets, cloud-init, or the guest agent).

Thanks,

Reply via email to