Debian 7 + Hyper-V和随机networking/ DNS问题

我们的部门是基于nix的,但不幸的是,我们所属的公司是在Windows环境下运行,直到我为自己的服务器获得预算,我必须在Hyper-V环境下运行我们的服务器。

我在Wheezy虚拟机上遇到了大量的networking问题。 自从进行安装之后,在执行apt-get updateapt-get install <package>时,会出现随机问题来parsing主机名,我必须在成功完成前多次重复该过程。

 root@gitlab:/home/git/gitlab# apt-get update Err http://debian.mirror.ac.za wheezy Release.gpg Something wicked happened resolving 'debian.mirror.ac.za:http' (-5 - No address associated with hostname) Hit http://security.debian.org wheezy/updates Release.gpg Hit http://packages.dotdeb.org wheezy Release.gpg Hit http://security.debian.org wheezy/updates Release Hit http://packages.dotdeb.org wheezy Release Hit http://security.debian.org wheezy/updates/main Sources Err http://debian.mirror.ac.za wheezy-updates Release.gpg Something wicked happened resolving 'debian.mirror.ac.za:http' (-5 - No address associated with hostname) Hit http://packages.dotdeb.org wheezy/all Sources Hit http://security.debian.org wheezy/updates/main amd64 Packages Hit http://packages.dotdeb.org wheezy/all amd64 Packages Hit http://security.debian.org wheezy/updates/main Translation-en Ign http://debian.mirror.ac.za wheezy Release Ign http://debian.mirror.ac.za wheezy-updates Release Ign http://debian.mirror.ac.za wheezy/main Sources/DiffIndex Ign http://packages.dotdeb.org wheezy/all Translation-en Ign http://debian.mirror.ac.za wheezy/main amd64 Packages/DiffIndex Ign http://debian.mirror.ac.za wheezy-updates/main Sources/DiffIndex Ign http://debian.mirror.ac.za wheezy-updates/main amd64 Packages/DiffIndex Hit http://debian.mirror.ac.za wheezy-updates/main Translation-en Hit http://debian.mirror.ac.za wheezy/main Sources Hit http://debian.mirror.ac.za wheezy/main amd64 Packages Hit http://debian.mirror.ac.za wheezy-updates/main Sources Get:1 http://debian.mirror.ac.za wheezy-updates/main amd64 Packages [2905 B] Ign http://debian.mirror.ac.za wheezy/main Translation-en Fetched 2905 B in 4s (639 B/s) W: Failed to fetch http://debian.mirror.ac.za/debian/dists/wheezy/Release.gpg Something wicked happened resolving 'debian.mirror.ac.za:http' (-5 - No address associated with hostname) W: Failed to fetch http://debian.mirror.ac.za/debian/dists/wheezy-updates/Release.gpg Something wicked happened resolving 'debian.mirror.ac.za:http' (-5 - No address associated with hostname) E: Some index files failed to download. They have been ignored, or old ones used instead. 

不幸的是,今天我正在做系统pipe理员和更新运行在这个虚拟机上的Gitlab实例,我不能完成程序bundle install过程,没有在列表中随机出现。

 Fetching source index from https://rubygems.org/ Using rake (10.1.0) Using i18n (0.6.9) Using minitest (4.7.5) Using multi_json (1.8.4) Using atomic (1.1.14) Using thread_safe (0.1.3) Using tzinfo (0.3.38) Using activesupport (4.0.2) Using builder (3.1.4) Using erubis (2.7.0) Using rack (1.5.2) Using rack-test (0.6.2) Using actionpack (4.0.2) Using mime-types (1.25.1) Using polyglot (0.3.3) Using treetop (1.4.15) Using mail (2.5.4) Using actionmailer (4.0.2) Using actionpack-action_caching (1.1.0) Using actionpack-page_caching (1.0.2) Using activemodel (4.0.2) Using activerecord-deprecated_finders (1.0.3) Using arel (4.0.1) Using activerecord (4.0.2) Using bundler (1.3.5) Using thor (0.18.1) Using railties (4.0.2) Using hike (1.2.3) Using tilt (1.4.1) Using sprockets (2.10.1) Using sprockets-rails (2.0.1) Using rails (4.0.2) Using acts-as-taggable-on (2.4.1) Using asciidoctor (0.1.4) Using descendants_tracker (0.0.3) Using ice_nine (0.10.0) Using axiom-types (0.0.5) Using bcrypt-ruby (3.1.2) Using sass (3.2.12) Using bootstrap-sass (3.0.3.0) Using json (1.8.1) Using carrierwave (0.9.0) Using timers (1.1.0) Using celluloid (0.15.2) Using charlock_holmes (0.6.9.4) Using coercible (1.0.0) Using coffee-script-source (1.6.3) Using execjs (2.0.2) Using coffee-script (2.2.0) Using coffee-rails (4.0.1) Using colored (1.2) Using connection_pool (1.2.0) Using d3_rails (3.1.10) Using orm_adapter (0.5.0) Using warden (1.2.3) Using devise (3.0.4) Using devise-async (0.8.0) Using diff-lcs (1.2.5) Using dotenv (0.9.0) Using email_validator (1.4.0) Bundler::HTTPError: Network error while fetching https://s3.amazonaws.com/production.s3.rubygems.org/quick/Marshal.4.8/enumerize-0.7.0.gemspec.rz An error occurred while installing enumerize (0.7.0), and Bundler cannot continue. Make sure that `gem install enumerize -v '0.7.0'` succeeds before bundling. 

有一件事要指出的是,在这之前,问题仅限于apt-get ,而我已经设法升级几次Gitlab实例。

我已经尝试了传统networking适配器和普通networking适配器,并检查了Hyper-V IC模块已经加载:

 root@gitlab:/home/git/gitlab# lsmod | grep hv hv_utils 12986 0 hv_storvsc 17423 2 hv_netvsc 18304 0 hv_vmbus 32029 4 hv_netvsc,hv_storvsc,hid_hyperv,hv_utils scsi_mod 162269 5 libata,sr_mod,sg,hv_storvsc,sd_mod 

我还将/etc/resolve.conf设置为内部DNS服务器和8.8.8.8/8.8.4.4,没有任何区别。

还有什么可能导致这个? 我现在真的开始用完了。