Closed danielshahaf closed 8 years ago
A few random bits of background:
dhcp_leases
method does not appear in the latest ruby-libvirt release, 0.5.2; it's only in git master.The dhcp_leases method does not appear in the latest ruby-libvirt release, 0.5.2; it's only in git master.
0.6.0 has been released now with the dhcp_leases API (https://www.redhat.com/archives/libvir-list/2015-November/msg00867.html).
PR coming up. However, even ruby-libvirt 0.6.0 has a bug in the DHCP leases support that causes a crash. See https://www.redhat.com/archives/libvir-list/2016-January/msg00147.html for the fix.
Fog::Compute::Libvirt::Server#addresses runs an external shell command to determine the IP address of a VM that has a given MAC address. The implementation assumes libvirtd runs on localhost or can be SSHed to; it ignores other cases, such as a TCP transport. Please use the ruby-libvirt bindings'
dhcp_leases
method, to also support the case when libvirtd runs on a remote host, using a TCP transport.The code should be something along these lines: