Natxo Asenjo
2023-Mar-19 19:21 UTC
virsh domifaddr --domain domname --source {lease, arp} not showing results with ipv6
hi, I have configured a routed network on my laptop with a ipv6 subnet and dnsmasq is handing out ipv6 addresses to my vms and it works really wel, but finding out which ips have been used is not as easy as with ipv4. [root at lenovo ~]# virsh domifaddr --domain wec --source lease Name MAC address Protocol Address ------------------------------------------------------------------------------- [root at lenovo ~]# virsh domifaddr --domain wec --source arp Name MAC address Protocol Address ------------------------------------------------------------------------------- When using a ipv4 network, this works: root at lenovo ~]# virsh domifaddr --domain evenng --source arp Name MAC address Protocol Address ------------------------------------------------------------------------------- vnet2 52:54:00:4c:83:98 ipv4 192.168.122.229/0 [root at lenovo ~]# virsh domifaddr --domain evenng --source lease Name MAC address Protocol Address ------------------------------------------------------------------------------- vnet2 52:54:00:4c:83:98 ipv4 192.168.122.229/24 I can obviously look into the leases file and find out the address, but it would be nice to be able to use the virt tooling. This is on a fedora 37 running qemu-kvm-7.0.0-14.fc37.x86_64 and dnsmasq-2.89-1.fc37.x86_64, everything intalled from the fedora repositories. -- -- Groeten, natxo -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20230319/31f76d31/attachment.htm>
Michal Prívozník
2023-Mar-21 14:40 UTC
virsh domifaddr --domain domname --source {lease, arp} not showing results with ipv6
On 3/19/23 20:21, Natxo Asenjo wrote:> hi, > > I have configured a routed network on my laptop with a ipv6 subnet and > dnsmasq is handing out ipv6 addresses to my vms and it works really wel, > but finding out which ips have been used is not as easy as with ipv4. > > [root at lenovo ~]# virsh domifaddr --domain wec --source lease > ?Name ? ? ? MAC address ? ? ? ? ?Protocol ? ? Address > ------------------------------------------------------------------------------- > > [root at lenovo ~]# virsh domifaddr --domain wec --source arp > ?Name ? ? ? MAC address ? ? ? ? ?Protocol ? ? Address > ------------------------------------------------------------------------------- > > When using a ipv4 network, this works: > > root at lenovo ~]# virsh domifaddr --domain evenng --source arp > ?Name ? ? ? MAC address ? ? ? ? ?Protocol ? ? Address > ------------------------------------------------------------------------------- > ?vnet2 ? ? ?52:54:00:4c:83:98 ? ?ipv4 ? ? ? ? 192.168.122.229/0 > <http://192.168.122.229/0> > > [root at lenovo ~]# virsh domifaddr --domain evenng --source lease > ?Name ? ? ? MAC address ? ? ? ? ?Protocol ? ? Address > ------------------------------------------------------------------------------- > ?vnet2 ? ? ?52:54:00:4c:83:98 ? ?ipv4 ? ? ? ? 192.168.122.229/24 > <http://192.168.122.229/24> > > I can obviously look into the leases file and find out the address, but > it would be nice to be able to use the virt tooling.Looks like you won't find any info for IPv6 there, because that's exactly what '--source lease' is doing. Are you sure that your IPv6 address is not autoconfigured and it indeed is libvirt spawned dnsmasq that's assigning the IPv6 address? For the '--source arp' case - libvirt reads the arp table (effectively the same info is exposed under /proc/net/arp file) and finds a matching entry there, based on the MAC address. Can you see whether there's a match? And lastly - there's '--source agent' which is most likely to return useful information, but that requires guest agent running inside. Michal> > This is on a fedora 37 running qemu-kvm-7.0.0-14.fc37.x86_64 and > dnsmasq-2.89-1.fc37.x86_64, everything intalled from the fedora > repositories.So is it safe to assume that libvirt (which is where you're reporting the issue) is: libvirt-8.6.0-5.fc37 ? Michal
Reasonably Related Threads
- virsh domifaddr --domain domname --source {lease, arp} not showing results with ipv6
- virsh domifaddr --domain domname --source {lease, arp} not showing results with ipv6
- virsh domifaddr --domain domname --source {lease, arp} not showing results with ipv6
- Re: SSH from host to domain using hostname
- Beginner needs help !