Thought I’d share this little VBox hack…
If you’ve ever started a VirtualBox image and quickly needed to figure out the IP address of the image issue this command:
vboxmanage guestproperty enumerate "playplace" | grep -i net
vboxmanage (or VBoxManage) is located in /usr/bin on *nix systems and probably c:\program files\virtualbox on Windows.
Put it in your path in order to call from terminal or the windows command prompt.
That will output this stuff:
Name: /VirtualBox/GuestInfo/Net/0/V4/IP, value: 10.0.2.15, timestamp: 1384295732663943000, flags: Name: /VirtualBox/GuestInfo/Net/0/MAC, value: 080027F941B3, timestamp: 1384295732686491000, flags: Name: /VirtualBox/GuestInfo/Net/1/Status, value: Up, timestamp: 1384295732717167000, flags: Name: /VirtualBox/GuestInfo/Net/1/V4/Broadcast, value: 10.0.1.255, timestamp: 1384295732706088000, flags: Name: /VirtualBox/GuestInfo/Net/0/V4/Netmask, value: 255.255.255.0, timestamp: 1384295732674402000, flags: Name: /VirtualBox/GuestInfo/Net/1/V4/Netmask, value: 255.255.255.0, timestamp: 1384295732707344000, flags: Name: /VirtualBox/GuestInfo/Net/1/MAC, value: 080027C5D78B, timestamp: 1384295732714239000, flags: Name: /VirtualBox/GuestInfo/Net/2/V4/Netmask, value: 255.0.0.0, timestamp: 1381466649165746000, flags: Name: /VirtualBox/GuestInfo/Net/0/Status, value: Up, timestamp: 1384295732694110000, flags: Name: /VirtualBox/GuestInfo/Net/2/MAC, value: 0800277A34DD, timestamp: 1381432579639859000, flags: Name: /VirtualBox/GuestInfo/Net/2/V4/IP, value: 0.0.0.0, timestamp: 1381466649164714000, flags: Name: /VirtualBox/GuestInfo/Net/2/V4/Broadcast, value: 0.0.0.0, timestamp: 1381466649165305000, flags: Name: /VirtualBox/GuestInfo/Net/0/V4/Broadcast, value: 10.0.2.255, timestamp: 1384295732673823000, flags: Name: /VirtualBox/GuestInfo/Net/1/V4/IP, value: 192.168.0.55, timestamp: 1384295732704039000, flags: Name: /VirtualBox/GuestInfo/Net/2/Status, value: Up, timestamp: 1381432579642208000, flags: Name: /VirtualBox/GuestInfo/Net/Count, value: 2, timestamp: 1384295747971087000, flags:
If you look closely you’ll see 2 IP addesses…192.168.0.55 (my home network coming from my bridged adapter) and 10.0.2.15 (the NAT ip).
So now I can
ssh oracle@192.168.0.55
This is pretty helpful if you start up a bunch of vbox images you start up via scripts with VBoxHeadless…
Leave a comment