Por que não consigo acessar minha VM a partir da máquina host do Win7?

0

Eu tenho uma máquina virtual Linux / Boot2Docker em execução no VirtualBox no Windows 7 Pro. Não consigo fazer ping ou acessar a VM pelo Windows. (No entanto, o ping do meu Windows IP da VM funciona bem.) O tracert em execução parece mostrar que ele está procurando pela VM na LAN em vez do adaptador VirtualBox, mas parece que a tabela de roteamento deve rotear os pacotes corretamente.

ATUALIZAÇÃO: No Gerenciador do VirtualBox, vinculei o adaptador de rede da VM ao adaptador do Windows nº2 em vez do nº3, e agora posso fazer o ping da VM a partir do Windows. Tracert ainda olha para a LAN, mas talvez seja uma pista falsa. A VM ainda não está fazendo seu trabalho real, mas isso pode ser outro problema. Vou responder a pergunta se puder confirmar isso.

Saída do tracert:

>tracert 192.168.59.103

Tracing route to 192.168.59.103 over a maximum of 30 hops

  1     5 ms     3 ms     3 ms  10.25.80.254
  2     *        *        *     Request timed out.
  3     *        *        *     Request timed out.
  4     *        *        *     Request timed out.

Configuração de IP no Windows:

Windows IP Configuration


Ethernet adapter Private Network :

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::39e9:8769:9302:b800%21
   Autoconfiguration IPv4 Address. . : 169.254.184.0
   Subnet Mask . . . . . . . . . . . : 255.255.0.0
   Default Gateway . . . . . . . . . :

Ethernet adapter Corporate Network:

   Connection-specific DNS Suffix  . : pc.mycompany.com
   Link-local IPv6 Address . . . . . : fe80::483c:a909:5355:6820%10
   IPv4 Address. . . . . . . . . . . : 10.25.80.89
   Subnet Mask . . . . . . . . . . . : 255.255.254.0
   Default Gateway . . . . . . . . . : 10.25.80.205

Ethernet adapter VirtualBox Host-Only Network #2:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::78e7:30fe:75a0:1b27%23
   IPv4 Address. . . . . . . . . . . : 192.168.59.3
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :

Ethernet adapter VirtualBox Host-Only Network #3:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::10db:8090:da3b:46e3%37
   Autoconfiguration IPv4 Address. . : 169.254.70.227
   Subnet Mask . . . . . . . . . . . : 255.255.0.0
   Default Gateway . . . . . . . . . :

Tunnel adapter isatap.pc.mycompany.com:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . : pc.mycompany.com

Tunnel adapter isatap.{8AB45835-1093-4C43-A8A5-6D016FB1B8DE}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Tunnel adapter isatap.{C3E3838E-D107-4A3D-9CE4-1943D581BEB0}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Tunnel adapter isatap.{FEADDB5F-620C-4083-9AC3-3E34D663191A}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Tabela de roteamento do Windows ("impressão de rota"):

===========================================================================
Interface List
 21...00 1b 21 2c e2 a3 ......Intel(R) Gigabit CT Desktop Adapter
 10...f0 4d a2 dd 00 4a ......Broadcom NetLink (TM) Gigabit Ethernet
 23...08 00 27 00 18 d1 ......VirtualBox Host-Only Ethernet Adapter #2
 37...08 00 27 00 e8 47 ......VirtualBox Host-Only Ethernet Adapter #3
  1...........................Software Loopback Interface 1
 11...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
 12...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #2
 15...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #3
 40...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #4
===========================================================================

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0     10.25.80.205      10.25.80.89     10
       10.25.80.0    255.255.254.0         On-link       10.25.80.89    266
      10.25.80.89  255.255.255.255         On-link       10.25.80.89    266
     10.25.81.255  255.255.255.255         On-link       10.25.80.89    266
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    306
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    306
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    306
      169.254.0.0      255.255.0.0         On-link     169.254.184.0    266
      169.254.0.0      255.255.0.0         On-link    169.254.70.227    276
   169.254.70.227  255.255.255.255         On-link    169.254.70.227    276
    169.254.184.0  255.255.255.255         On-link     169.254.184.0    266
  169.254.255.255  255.255.255.255         On-link     169.254.184.0    266
  169.254.255.255  255.255.255.255         On-link    169.254.70.227    276
     192.168.59.0    255.255.255.0         On-link      192.168.59.3    276
     192.168.59.3  255.255.255.255         On-link      192.168.59.3    276
   192.168.59.255  255.255.255.255         On-link      192.168.59.3    276
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    306
        224.0.0.0        240.0.0.0         On-link      192.168.59.3    276
        224.0.0.0        240.0.0.0         On-link       10.25.80.89    266
        224.0.0.0        240.0.0.0         On-link     169.254.184.0    266
        224.0.0.0        240.0.0.0         On-link    169.254.70.227    276
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    306
  255.255.255.255  255.255.255.255         On-link      192.168.59.3    276
  255.255.255.255  255.255.255.255         On-link       10.25.80.89    266
  255.255.255.255  255.255.255.255         On-link     169.254.184.0    266
  255.255.255.255  255.255.255.255         On-link    169.254.70.227    276
===========================================================================
Persistent Routes:
  None

IPv6 Route Table
===========================================================================
Active Routes:
 If Metric Network Destination      Gateway
  1    306 ::1/128                  On-link
 23    276 fe80::/64                On-link
 10    266 fe80::/64                On-link
 21    266 fe80::/64                On-link
 37    276 fe80::/64                On-link
 37    276 fe80::10db:8090:da3b:46e3/128
                                    On-link
 21    266 fe80::39e9:8769:9302:b800/128
                                    On-link
 10    266 fe80::483c:a909:5355:6820/128
                                    On-link
 23    276 fe80::78e7:30fe:75a0:1b27/128
                                    On-link
  1    306 ff00::/8                 On-link
 23    276 ff00::/8                 On-link
 10    266 ff00::/8                 On-link
 21    266 ff00::/8                 On-link
 37    276 ff00::/8                 On-link
===========================================================================
Persistent Routes:
  None
    
por T Scherer 14.08.2015 / 01:05

1 resposta

0

Você precisará configurar uma Rota persistente para que todo o tráfego de rede da sua máquina para a VM (192.168.59.130) rotas através da NIC em questão (Adaptador Ethernet VirtualBox Host-Only Network # 2)

route add -p 192.168.59.103 mask 255.255.255.0 192.168.59.3 if 23

    
por 14.08.2015 / 12:44