VirtualBox

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#17324 closed enhancement (wontfix)

Feature request: Add a way to get VM's IP address through the API without guest additions

Reported by: MartinDachev Owned by:
Component: network Version: VirtualBox 5.2.0
Keywords: ip address bridged mode main api guest additions Cc:
Guest type: all Host type: all

Description

I am constantly reading about VirtualBox networking and trying to find a way to get the IP of a VM without installing Guest Additions to it, mainly when using Bridged Networking. From what I have read from the manual - it should be possible with little additions.

I work in a project that uses the VirtualBox Main API through the VirtualBox Web Service. I use it to make and configure VMs. The IP needs to be taken automatically, without user interaction and no logging with SSH - because you don't know the IP.

I have read the following from the manual:

"Bridging to a wireless interface is done differently from bridging to a wired interface, because most wireless adapters do not support promiscuous mode. All traffic has to use the MAC address of the host's wireless adapter, and therefore VirtualBox needs to replace the source MAC address in the Ethernet header of an outgoing packet to make sure the reply will be sent to the host interface. When VirtualBox sees an incoming packet with a destination IP address that belongs to one of the virtual machine adapters it replaces the destination MAC address in the Ethernet header with the VM adapter's MAC address and passes it on. VirtualBox examines ARP and DHCP packets in order to learn the IP addresses of virtual machines."

From this statement it looks like VirtualBox already knows the IP address of a VM using Bridged Adapter - yet I haven't found a way to get it without Guest Additions.

Change History (4)

comment:1 by Valery Ushakov, 6 years ago

Resolution: wontfix
Status: newclosed

Sorry, but you are reading too much into that sentence and misinterpret it.

comment:2 by Socratis, 6 years ago

vushakov, would you care to explain a little bit more in depth if you don't mind? AFAIK, VirtualBox doesn't know the guest's IP (w/o the GAs), but I might be missing something fundamental. What's the underlying reason that VirtualBox can't keep a tab on the Bridged IPs? Because the filter doesn't communicate with the main program? Or do I have it wrong?

comment:3 by Valery Ushakov, 6 years ago

The mac/ip is tracked only when "bridging" to a wifi interface.

The bridging code is 1) in the kernel and 2) has no idea there are VMs, anything that can talk the VBox ioctls can connect (e.g. I have code to connect NetBSD rump).

comment:4 by Socratis, 6 years ago

Got it, thanks for the explanation.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use