I've been searching how to obtain the IP address of a guest VM. I found a way to do that using VBoxManage (enumerate), which can display the IP. However, to be able to use that successfully, one must install the Guest Addons, which are not available for Mac OS X Hosts.
So, is there another way to achieve this? The problem is that I cannot login to my VM, because I do not have an account on it. It is running a webserver, and it is intended to be accessed by a browser (but then you need to know the IP address first, of course).
I know the guest VM is getting an IP address assigned using DHCP (which is taken care of by virtualbox) and it is configured with "Host-only" networking.
I tried to run a scan with (ping) scan with nmap, but I was unable to find it (while it was running).
Any idea how to tackle this? Thanks!
Retrieve IP address of guest
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: Retrieve IP address of guest
If the guest is being served an IP address using VirtualBox DHCP (host only) then you in fact control what IP address it receives, there is no need to interrogate to find it. At worst you may have to ping an address or two to verify it.
Otherwise, forget that it's a VM. How would you do it for any normal PC? (or Mac).
Otherwise, forget that it's a VM. How would you do it for any normal PC? (or Mac).
-
- Site Moderator
- Posts: 27329
- Joined: 22. Oct 2010, 11:03
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Win(*>98), Linux*, OSX>10.5
- Location: Greece
Re: Retrieve IP address of guest
There's a script using "route", which I wanted to improve, but it's about 30th on my browser tabs. That "weekend" I wanted to work on the script, never came...
See: viewtopic.php?f=22&t=87823
See: viewtopic.php?f=22&t=87823
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
-
- Posts: 2
- Joined: 23. May 2018, 12:17
Re: Retrieve IP address of guest
@mpack, thanks, it suddenly works now, no idea why it didn't work earlier.
@socratis, I wanted to reply that I've already seen that script while searching, and arp -a did not list my mac address. However, when it's all working now, arp -a also show the ip and mac address I was looking for.
Thanks for your replies, unfortunately, I have no idea what was wrong...
@socratis, I wanted to reply that I've already seen that script while searching, and arp -a did not list my mac address. However, when it's all working now, arp -a also show the ip and mac address I was looking for.
Thanks for your replies, unfortunately, I have no idea what was wrong...