How to get IP of guest OS in VirtualBox

After upgrading my VM running Fedora 23 beta to the release version, Gnome Desktop Manager (GDM) no longer started again. This is the same issue with newer version of xorg-x11-*, and it’s not yet supported by VirtualBox 5.0.

I previously posted a quick fix by downgrading xorg-x11-* packages. To do that, I need to ssh into the VM.

Here’s how we can find the IP address of running VMs.

Let’s list the VMs available:

~$ vboxmanage list runningvms
"banan" {0c92f898-316d-4efb-a6ea-bc555c4064ff}
"Windows7" {7f7a27a0-4bc0-47e2-ae92-0a1e360a3d81}
"f23" {7645e5b9-1dba-4850-9745-117029bb82ab}

I’m interested in “f23”. To list all IPs associated with available NICs run:

~$ vboxmanage guestproperty enumerate "f23" | grep IP
Name: /VirtualBox/GuestInfo/Net/0/V4/IP, value:, timestamp: 1447197251856159000, flags: 
Name: /VirtualBox/GuestInfo/Net/1/V4/IP, value:, timestamp: 1447197286865156000, flags:

Note that, if you don’t see any IPs listed, it’s likely that your VM is not running or/and the VM Guest Addition is not installed on that VM.


Leave a Reply

Your email address will not be published. Required fields are marked *