在虚拟机中有一份wireshark工程,用的svn服务端在win10真机上。现在想提交下代码, 方便做试验。 以前是可以正常svn操作的,现在不行了。update连接不上svn服务器. svn url用的是主机名称, 不是IP. 不想重新按照ip重新迁出一份代码了。
查了资料,修改虚拟机win7的hosts文件,停掉DNS Client服务,增加win10真机的入站,出站端口规则。做了这些修改后,win7虚拟机中的svn可以连上win10真机中的svn了。
hosts文件即时生效,只要注掉添加的本地解释的域名,ping域名时,马上ping不通了. 虚拟机的ipv6禁掉了,ipv4参数都是自动获取。
C:\Windows\System32\drivers\etc\hosts
# Copyright (c) 1993-2009 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host # localhost name resolution is handled within DNS itself. # 127.0.0.1 localhost # ::1 localhost # add new hostname and ip for svn on vmware win7 192.168.2.60 lostspeed-pc # ok # lostspeed-pc 192.168.2.60 # error控制面板\系统和安全\管理工具\服务
分别增加 tcp port = 8443, udp port = 8443, 允许连接。
