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

浪子不回头ぞ 提交于 2019-11-28 23:40:52

问题


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.


回答1:


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




回答2:


Go to settings of your virtual box guest operating system. Then go to Shared folders and add the folder you want to share between your guest and host. Give the appropriate readonly (check the Read-only checkbox) or readwrite (uncheck the Read-only checkbox) permissions and turn on the Auto-mount (check the Auto-mount checkbox).

See screenshot below. I created a VMShared folder on my host (local machine). Then shared it with the guest ( operating system in virtual box ).



来源:https://stackoverflow.com/questions/42953785/how-to-get-the-ipaddress-of-a-virtual-box-running-on-local-machine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!