[libvirt] [PATCH] qemu: get VM's ip address from the output of arp command
chen_han_xiao at 126.com
Wed Jan 24 15:54:58 UTC 2018
At 2018-01-24 02:01:27, "Martin Kletzander" <mkletzan at redhat.com> wrote:
>On Tue, Jan 23, 2018 at 03:40:02PM +0800, Chen Hanxiao wrote:
>>From: Chen Hanxiao <chenhanxiao at gmail.com>
>>Introduce VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP to get ip address
>>of VM from the output of `arp -an` command.
>I'm not sure about the implications of this as sometimes we can't use that, but
>I guess that's fine.
>>We can use:
>> domifaddr f26-cloud --source arp
>>to get the address.
>>Signed-off-by: Chen Hanxiao <chenhanxiao at gmail.com>
>> include/libvirt/libvirt-domain.h | 1 +
>> src/qemu/qemu_driver.c | 102 +++++++++++++++++++++++++++++++++++++++
>> tools/virsh-domain-monitor.c | 2 +
>> 3 files changed, 105 insertions(+)
>I see no documentation changes here.
>>diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
>I think this should be determined like other programs in
>But rather than this, is this supported under non-Linux? I don't know how arp
>works elsewhere, but for Linux we could just parse /proc/net/arp ourselves.
Sure, will be done in v2.
More information about the libvir-list