首页 > Web开发 > 详细

Virtual Box VM network configuration - Virtual Box VM 配置上网

时间:2016-10-29 12:20:08      阅读:216      评论:0      收藏:0      [点我收藏+]

Limitations:

Network: company

Host: DHCP

Host NIC bridge: disabled

Network access: limited

========================

Based on that, it might not be possible to set the VM to access Internet, & visible to host at the same time.

========================

1. Set the VM IP to "DHCP"

vi /etc/network/interfaces

Set the VM‘s NIC in Virtual Box as 网络地址转换(NAT)

Reboot VM.

Now VM can access public Internet via host‘s NIC. But host cannot access VM. You can use apt-get now.

--------------------------------

2. Set the VM IP to "static", make it in the same domain as VBox‘s NIC in host

Set the VM‘s NIC in Virtual Box as 仅主机(Host-Only)网络

Reboot VM.

Now VM cannot access Internet, but host can ping this VM‘s IP. You can do your dev work using this VM now.

Virtual Box VM network configuration - Virtual Box VM 配置上网

原文:http://www.cnblogs.com/anbosun/p/6010163.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!