简体   繁体   中英

How do I access services on a vm from the host when not connected to network?

I am running VirtualBox on MacOS, I have a windows xp vm. I also have mysql database running inside the vm. The vm is configured to use Bridged Network Adapter. When I am connected to a wi-fi network (at home), I am able to connect to the data running on the vm from my mac (host), by using the IP address of the vm in the connection string.

How do I do this when I am not connected to the network (when I am travelling on a train for example)? What setting do I need to change on the VM so that my host can connect to the mysql database running on the xp vm?

There is no need for the VM to access the outside network etc... It is enough for the host to be able to access the database on the vm.

可以通过将VirtualBox中的端口转发与NAT作为网络模式一起使用来解决。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM