Score:0

Why is net-dhcp-leases coming up empty in VIRSH?

kr flag

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
---------------------------------------------
Michael Hampton avatar
cz flag
Are the virtual machines running? Did they request DHCP leases?
average_coder25 avatar
kr flag
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.
Michael Hampton avatar
cz flag
How can you have leases when no virtual machine has requested one?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.