How to get VM ip address from command line

This is for discussing general topics about how to use VirtualBox.
Post Reply
Y2J
Posts: 12
Joined: 24. Feb 2010, 12:39
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Ubuntu 9.10

How to get VM ip address from command line

Post by Y2J »

Hello, i'm working with VirtualBox by command line.
I'd like to know how to get the ip address of my virtual machine from command line.

Thanks in advance
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: How to get VM ip address from command line

Post by Perryg »

From within the guest use terminal or command window.
ifconfig -a (Linux) ipconfig /all (Windows)
Y2J
Posts: 12
Joined: 24. Feb 2010, 12:39
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Ubuntu 9.10

Re: How to get VM ip address from command line

Post by Y2J »

perry i mean how to get ip address of the vm from the command line of the os where virtualbox is installed
baf
Volunteer
Posts: 829
Joined: 27. Sep 2008, 06:18
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: linux,xp,win7
Location: Luleå or Skellefteå, Sweden

Re: How to get VM ip address from command line

Post by baf »

Try VBoxManage guestproperty enumerate <MachineName>
there you find:
Name: /VirtualBox/GuestInfo/Net/0/V4/IP, value: 10.0.2.15, timestamp: 1267018722416154000, flags:
Y2J
Posts: 12
Joined: 24. Feb 2010, 12:39
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Ubuntu 9.10

Re: How to get VM ip address from command line

Post by Y2J »

thanks a lot baf
makco10
Posts: 1
Joined: 3. Apr 2014, 23:58

Re: How to get VM ip address from command line

Post by makco10 »

Ip of the phpvirtualbox then port

Example:

192.168.0.10:9000

In the Remote Desktop of Windows

;)
Post Reply