Difference between revisions of "Virsh net-dhcp-leases"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
Tags: Mobile web edit, Mobile edit
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<code>[[virsh net-list]]</code>
 
  
virsh net-dhcp-leases
 
error: command 'net-dhcp-leases' requires <network> option
 
  
 
  virsh net-dhcp-leases default
 
  virsh net-dhcp-leases default
Line 15: Line 12:
 
  -------------------------------------------------------------------------------------------------------------------
 
  -------------------------------------------------------------------------------------------------------------------
  
 +
virsh net-dhcp-leases [[vagrant]]-libvirt
 +
  Expiry Time          MAC address        Protocol  IP address          Hostname  Client ID or DUID
 +
-----------------------------------------------------------------------------------------------------------
 +
  2021-04-11 11:58:01  52:54:00:09:2f:df  ipv4      192.168.121.42/24  -          01:52:54:00:09:2f:df
 +
 +
virsh net-dhcp-leases
 +
error: command 'net-dhcp-leases' requires <network> option
  
 
== Get IP from VM ==
 
== Get IP from VM ==
Line 28: Line 32:
 
  [[arp]] -e  
 
  [[arp]] -e  
 
  192.168.1.10          ether  52:54:00:33:87:t5
 
  192.168.1.10          ether  52:54:00:33:87:t5
 +
 +
 +
== Related commands ==
 +
* <code>[[virsh domifaddr]]</code>
 +
* <code>[[virsh net-list]]</code>
 +
* <code>[[virsh net-dumpxml]]</code>
  
 
== See also ==
 
== See also ==

Latest revision as of 11:06, 11 April 2021


virsh net-dhcp-leases default
Expiry Time          MAC address        Protocol  IP address                Hostname        Client ID or DUID
-------------------------------------------------------------------------------------------------------------------
2020-02-06 12:19:41  52:54:00:5d:c1:a1  ipv4      192.168.122.119/24        DESKTOP-LDUJ5M6 01:52:54:00:5d:c1:a1

No DHCP leases in this example:

virsh net-dhcp-leases default
Expiry Time          MAC address        Protocol  IP address                Hostname        Client ID or DUID
-------------------------------------------------------------------------------------------------------------------
virsh net-dhcp-leases vagrant-libvirt
 Expiry Time           MAC address         Protocol   IP address          Hostname   Client ID or DUID
-----------------------------------------------------------------------------------------------------------
 2021-04-11 11:58:01   52:54:00:09:2f:df   ipv4       192.168.121.42/24   -          01:52:54:00:09:2f:df
virsh net-dhcp-leases
error: command 'net-dhcp-leases' requires <network> option

Get IP from VM[edit]


virsh domiflist VM_MACHINE_NAME
Interface  Type       Source     Model       MAC
-------------------------------------------------------
vnet1      network    default    rtl8139     52:54:00:33:87:t5
arp -e 
192.168.1.10          ether  52:54:00:33:87:t5


Related commands[edit]

See also[edit]

Advertising: