50

I need to connect to my virtual box running on my local machine to transfer files from my local system to VM by using WinSCP.

How do I find the IP address? When I go to the settings and network tab, there I find something related to IP, but when I use that, it says cannot find or invalid.

Sae1962
  • 1,020
  • 14
  • 29
user1015388
  • 985
  • 1
  • 11
  • 25
  • What is the OS of the VM? – Jackson Mar 22 '17 at 14:00
  • When I start mine using vagrant, it shows the ip address on boot time. Do you have console access to the vbox so you can type command to get ip address? – Arthur Swails Mar 22 '17 at 14:01
  • Yes I have a console – user1015388 Mar 22 '17 at 14:28
  • Accessing your Ubuntu Virtualbox Guest from your Host OS [link]https://gist.github.com/odan/48fc744434ec6566ca9f7a993f4a7ffb – Eldar Oct 07 '18 at 21:34
  • 1
    In case you want to get the ip without going to your vm you can use `VBoxManage guestproperty enumerate | grep IP` on host machine as stated here [link] https://forums.virtualbox.org/viewtopic.php?f=1&t=36592 – sobhan Apr 08 '19 at 07:44

1 Answers1

70

Login to virtual machine use below command to check ip address. (anyone will work)

  1. ifconfig
  2. ip addr show

If you used NAT for your virtual machine settings(your machine ip will be 10.0.2.15), then you have to use port forwarding to connect to machine. IP address will be 127.0.0.1

If you used bridged networking/Host only networking, then you will have separate Ip address. Use that IP address to connect virtual machine

Naveen kumar
  • 1,267
  • 5
  • 8