这是我在 Ubuntu Server 13.04 上运行 VirtualBox 以托管 Windows 虚拟机所做的。我相信这将与您的情况类似
首先,确保您为虚拟机使用 PCNet 以太网。
接下来修改您的网络:
nano /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto br0
iface br0 inet static
address 192.168.2.98 #<- Change this to the internal IP address of your Ubuntu box
netmask 255.255.255.0
network 192.168.2.0 #<- Change this to the internal network
broadcast 192.168.2.255 #<- Change this to the internal IP address of your Windows VM
gateway 192.168.2.1 #<- Change this to your gateway
bridge_ports eth0
bridge_stp off
bridge_maxwait 5
然后,您需要确保您在 Windows 中的网络配置为静态,然后您需要配置 Windows 防火墙以允许连接通过它,以及配置您的路由器以转发您需要转发到 VM 的端口
祝你好运