I'm trying to debug an issue and trying to figure out if a particular Machine of mine even has an IP. How can I show all the leases of a Virtualbox DHCP server? The reason I can't just log into the guest is, that it's a Vulnhub VM. Finding out a way to log into the machine is the whole point of the exercise.
Asked
Active
Viewed 4,567 times
2 Answers
6
On Linux :
cat $HOME/Library/VirtualBox/NatNetwork-Dhcpd.leases
On Windows :
%userprofile%\\.VirtualBox\HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter-Dhcpd.leases
This is the file:
<?xml version="1.0"?>
<Leases version="1.0">
...
<Lease mac="08:00:27:45:fb:92" network="0.0.0.0" state="acked">
<Address value="10.0.2.15"/>
<Time issued="1594735097" expiration="600"/>
</Lease>
...
</Leases>
You can find the mac from vm with vboxmanage showvminfo smp318 | grep MAC
You can list running VM with vboxmanage list runningvms
zx485
- 2,337
Julien Guay
- 61
1
On Debian systems:
cat ~/.config/VirtualBox/(your network name).leases
You can
ls ~/.config/VirtualBox | grep ".leases"
to see all of the DHCP leases of all networks created.
Destroy666
- 12,350