VM中的ubuntu 16无法访问Internet

祈祷

我正在尝试在我的愚蠢的Windows 7计算机上设置ubuntu 64位VM。

Windows连接到的网络信息

在此处输入图片说明

在此处输入图片说明

在的无线LAN适配器的IPv4主机-10.11.209.93

以太网适配器VB主机仅支持IPv4 -192.168.56.1

我在BIOS设置中启用了虚拟化。

Windows仅主机配置

在此处输入图片说明

并且,我还将VirtualMachine网络提供商设置为Bridge Adaptor

另外,进行网络共享(实际上并不需要)

在此处输入图片说明

在此处输入图片说明

但是,ubuntu VM中没有连接。

ifconfig

    enp0s3 Link encap:Ethernet  HWaddr 00:2D:32:3E:39:3B
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::48:817c:1b4d:e85a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:56 errors:0 dropped:1990 overruns:0 frame:0
          TX packets:169 errors:8 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:7409 (7.4 KB)  TX bytes:16785 (16.7 KB)

    lo   Link encap:Local Loopback  
         inet addr:127.0.0.1  Mask:255.0.0.0
         inet6 addr: ::1/128 Scope:Host
         UP LOOPBACK RUNNING  MTU:16436  Metric:1
         RX packets:50121 errors:0 dropped:0 overruns:0 frame:0
         TX packets:50121 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1 
         RX bytes:17079(7.4 KB)  TX bytes:16785(17.0 KB)

resolv.conf

$ cat /etc/resolvconf/resolv.conf.d/head                   

    # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) 
    #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN

$ cat /etc/resolv.conf
    nameserver 127.0.0.1
    search shaharma.net

ping google.com 只是挂在ubuntu VM上。

我也尝试添加,nameserver 8.8.8.8但也不起作用。

参考

How to share internet access between Ubuntu and Windows guests OS in VirtualBox?

12.04 on VirtualBox -No internet access on Guest OS

How-to: VirtualBox Networking Part Two - NAT and Bridged

heynnema

Your resolv.conf looks wrong. The DNS server can't be 8.8.8.8.4.4.4.4. Somewhere you entered a list of DNS servers, but you forgot the comma between the server addresses (ie: 8.8.8.8, 4.4.4.4). Probably did it in the connection script for your network connection. Go to the network icon in the top panel, and choose Edit Connections.... Locate and edit the network connection and add the comma, and restart your VM.

更新:您的VM设置应包括桥接适配器。Internet连接共享应该关闭。您的企业网络也可能给您带来麻烦……如果是这样,请与网络管理员联系以获取更多帮助。

让我们知道您的情况。欢呼声

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章