how to get the ipaddress of a virtual box running on local machine

VirtualboxIp AddressWinscp

Virtualbox Problem Overview


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.

Virtualbox Solutions


Solution 1 - Virtualbox

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser1015388View Question on Stackoverflow
Solution 1 - VirtualboxNaveen kumarView Answer on Stackoverflow