0

From the following command virsh net-edit default, I see:

<network>
  <name>default</name>
  <uuid>7a106327-942a-40e7-a977-018b5323832a</uuid>
  <forward mode='nat'/>
  <bridge name='virbr0' stp='on' delay='0'/>
  <mac address='52:54:01:c4:28:33'/>
  <ip address='192.168.122.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.122.2' end='192.168.122.254'/>
      <host mac='0c:b5:c6:10:10:00' name='host1' ip='192.168.122.2'/>
      <host mac='0c:b5:c6:10:10:01' name='host2' ip='192.168.122.3'/>
    </dhcp>
  </ip>
</network>

However, when I execute virsh net-dhcp-leases default, I get empty results? Why is this happening? I'm expecting to see info on host1 and host2. My end goal is to be able to perform an IP address lookup using a specific mac address.

 Expiry Time   MAC address   Protocol   IP address   Hostname   Client ID or DUID
-----------------------------------------------------------------------------------
3
  • Are the virtual machines running? Did they request DHCP leases? Aug 20, 2021 at 15:50
  • I don't think i have any VMs active? Just the default network is active. I thought I would be able to output this dhcp config just like i see in net-edit. Does each VM belong to one network? Does each network only have one VM? I don't understand the relationship. Aug 20, 2021 at 17:16
  • How can you have leases when no virtual machine has requested one? Aug 20, 2021 at 17:21

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.