[Kimchi-devel] [PATCH] List IPs of VM Ifaces

Christy Perez christy at linux.vnet.ibm.com
Tue Jun 9 13:47:36 UTC 2015


I could add a check for the VM being off, and always return an empty
list in that case.

On 06/09/2015 08:21 AM, Crístian Deives wrote:
> Reviewed-by: Crístian Deives <cristiandeives at gmail.com>
> 
> However, I'm worried with the DHCP lease code. AFAIU, it only works if
> the guest system has a predictable IP mechanism (i.e. static IP or a
> DHCP server which always assigns the same IP address to the same MAC). I
> tried "GET /vms/<vm>/ifaces/<iface>/ips" on a shutoff VM and I got the
> IP address the VM had when it was running. That's most probably the same
> address it will use on next boot, but we can't be sure of that, that
> depends on the guest network configuration and/or the external DHCP
> server. I guess even the ARP code might not be always correct, so I
> guess both approaches has their faults. This patch fetches the most
> likely IP address the guest VM has, which should be correct on most of
> the times, so I think this is good enough for the end user. I just don't
> feel it's 100% trustworthy - but maybe 99% :-)
> 
> On 03-06-2015 12:06, Christy Perez wrote:
>> Signed-off-by: Christy Perez <christy at linux.vnet.ibm.com>
>> ---
>>   docs/API.md                  |  1 +
>>   src/kimchi/mockmodel.py      |  9 +++++++++
>>   src/kimchi/model/vmifaces.py | 28 ++++++++++++++++++++++++++++
>>   tests/test_rest.py           |  6 ++++++
>>   4 files changed, 44 insertions(+)
> 




More information about the Kimchi-devel mailing list