Thank you Michal! I found the file.
Do you mean there is a libvirt API for this? I did not find `virsh
net-dhcp-leases default` on my KVM host.
On 9/15/14 4:02 AM, "Michal Privoznik" <mprivozn(a)redhat.com> wrote:
On 12.09.2014 17:46, Jianfeng Tang wrote:
>>
> Hi,
>
> I plan to use KVM internal network 'default' and grep dhcp log to figure
> out the IP address that assigned to my VM.
>
> I know I can configure static ip but I like to assign ip dynamically to
> avoid mgmt cost.
>
> Does anyone know where the dhcp log is? My KVM host is running Ubuntu
> Raring (13.04). It does not have file /var/log/daemon.log as some online
> doc mentioned.
>
> Thanks,
> ~Jianfeng
>
Hi,
this is the area that is somewhat actively worked on.
The leases file is located under
/var/lib/libvirt/dnsmasq/default.leases, however I'd strongly recommend
using libvirt API for that:
virsh net-dhcp-leases default
BTW: it's not KVM's default network. The network is created and managed
by libvirt ;-)
Michal