基于Windows Server 2008 R2 Hyper-V环境虚拟化Centos来宾操作系统

简介:

       在Hyper-V虚拟机中,正常安装完CentOS、RedHat等Linux操作系统之后,网络是

不正常的。因为CentOS和RedHat等Linux操作系统是不能识别Hyper-V的虚拟网络的。

要想使虚拟机能够正常识别Hyper-V虚拟网络,需要安装微软的Linux集成服务工具。

      下载链接: Linux Integration Services v2.1 for Windows Server 2008 Hyper-V R2 - 中文(简体)

 

下面介绍安装过程(以CentOS X64 为例):

 

  1. 正常安装CentOS操作系统,安装完毕后,挂在镜像文件,安装adjtimex  软件包

     

    [root@localhost ~]# mount /dev/cdrom /tmp
    [root@localhost ~]# mount /dev/cdrom /tmp/
    [root@localhost ~]# rpm -ivh /tmp/CentOS/adjtimex-1.20-2.1.x86_64.rpm 

     

    如果不安装该软件包的话,后面编译集成服务工具时,会提示"Your system DOES NOT support the timesource driver"  错误.

     

  2.  解压集成服务工具,解压后包含一个pdf 帮助文件和一个名为"LinuxIC v21"的iso文件

   wKiom1OVUcSx2h1yAADcVzBKxVI182.jpg

3. Hyper-V虚拟机->设置->IDE控制器->DVD驱动器->图像文件,定位到解压出来的ISO镜像文件,

    如图示

    wKiom1OVVLPSL1T5AAMhBCPVDX4625.jpg

4. 启动虚拟机,打开终端程序,执行集成服务工具的编译安装

[root@localhost ~]# mount /dev/cdrom /mnt/
[root@localhost ~]# mkdir -p /opt/linux_is_v2.1
[root@localhost ~]# cp -R /mnt/* /opt/linux_is_v2.1/
[root@localhost ~]# cd /opt/linux_is_v2.1/
[root@localhost linux_is_v2.1]# ls
docs  LICENSE-DUAL-BSD-GPL  LICENSE-GPL  Makefile  README  scripts  src
[root@localhost linux_is_v2.1]# make
[root@localhost linux_is_v2.1]# make install

5. 安装完毕后,打开网卡配置文件,vi "/etc/sysconfig/network-scripts/ifcfg-eth0" ,配置网络信息

[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
# Microsoft Corporation Hyper-V Network Adapter
DEVICE=eth0
BOOTPROTO=none
HWADDR=00:15:5d:01:2e:04
ONBOOT=yes
NETMASK=255.255.255.0
IPADDR=192.168.1.71
GATEWAY=192.168.1.1
TYPE=Ethernet

  vi /etc/resolf.conf 文件,配置DNS网络信息.

  配置完毕后,重启网卡。

 

6. 验证网络连通性:

[root@localhost ~]# ping www.sina.com.cn
PING polaris.sina.com.cn (202.108.33.60) 56(84) bytes of data.
64 bytes from 202.108.33.60: icmp_seq=1 ttl=243 time=3.51 ms
64 bytes from 202.108.33.60: icmp_seq=2 ttl=243 time=3.46 ms
64 bytes from 202.108.33.60: icmp_seq=3 ttl=243 time=2.75 ms
64 bytes from 202.108.33.60: icmp_seq=4 ttl=243 time=3.50 ms
64 bytes from 202.108.33.60: icmp_seq=5 ttl=243 time=2.86 ms
64 bytes from 202.108.33.60: icmp_seq=6 ttl=243 time=3.40 ms
64 bytes from 202.108.33.60: icmp_seq=7 ttl=243 time=5.94 ms
64 bytes from 202.108.33.60: icmp_seq=8 ttl=243 time=2.99 ms
64 bytes from 202.108.33.60: icmp_seq=9 ttl=243 time=2.77 ms
--- polaris.sina.com.cn ping statistics ---
9 packets transmitted, 9 received, 0% packet loss, time 7998ms
rtt min/avg/max/mdev = 2.756/3.469/5.948/0.930 ms
[root@localhost ~]#

 

可以看到,网络已经可以正常通讯.具体参见http://wiki.centos.org/OzydeJong/CentOS5_HyperV

 

 

      本文转自marbury 51CTO博客,原文链接:http://blog.51cto.com/magic3/1424049,如需转载请自行联系原作者


相关文章
|
7月前
|
安全 Unix 物联网
Windows 7 & Windows Server 2008 R2 简体中文版下载 (2025 年 10 月更新)
Windows 7 & Windows Server 2008 R2 简体中文版下载 (2025 年 10 月更新)
791 0
Windows 7 & Windows Server 2008 R2 简体中文版下载 (2025 年 10 月更新)
|
8月前
|
安全 Unix 物联网
Windows 7 & Windows Server 2008 R2 简体中文版下载 (2025 年 9 月更新)
Windows 7 & Windows Server 2008 R2 简体中文版下载 (2025 年 9 月更新)
2231 2
|
Linux 虚拟化 iOS开发
Windows Server 2008 R2 OVF (2025 年 4 月更新) - VMware 虚拟机模板
Windows Server 2008 R2 OVF (2025 年 4 月更新) - VMware 虚拟机模板
456 29
Windows Server 2008 R2 OVF (2025 年 4 月更新) - VMware 虚拟机模板
|
Linux 虚拟化 iOS开发
Windows Server 2008 R2 OVF (2025 年 6 月更新) - VMware 虚拟机模板
Windows Server 2008 R2 OVF (2025 年 6 月更新) - VMware 虚拟机模板
311 0
Windows Server 2008 R2 OVF (2025 年 6 月更新) - VMware 虚拟机模板
|
虚拟化 Windows
Windows 7 10 11 2008R2 2016 2019 2022 2025 (updated Jun 2025) 2025 年 6 月更新
Windows 7 10 11 2008R2 2016 2019 2022 2025 (updated Jun 2025) 2025 年 6 月更新
182 0
|
Unix 虚拟化 Windows
Windows 7 & Windows Server 2008 R2 简体中文版下载 (2025 年 6 月更新)
Windows 7 & Windows Server 2008 R2 简体中文版下载 (2025 年 6 月更新)
498 0
|
安全 Unix 虚拟化
Windows 7 & Windows Server 2008 R2 简体中文版下载 (2025 年 2 月更新)
Windows 7 & Windows Server 2008 R2 简体中文版下载 (2025 年 2 月更新)
701 11
Windows 7 & Windows Server 2008 R2 简体中文版下载 (2025 年 2 月更新)
|
数据挖掘 虚拟化
虚拟化数据恢复—VMware虚拟化环境下重装系统导致服务器崩溃的数据恢复
VMware虚拟化平台 vmfs文件系统 工作人员误操作重装操作系统,服务器崩溃。 重装系统会导致文件系统元文件被覆盖。要恢复数据,必须找到&提取重装系统前的文件系统残留信息,通过提取出来的元文件信息恢复虚拟磁盘。通过拼接虚拟磁盘来恢复服务器数据。
356 13
|
运维 监控 数据可视化
Hyper-V的哪些性能?使其成为企业构建云平台和虚拟化环境的首选
Hyper-V凭借高效性、灵活性、高可用性及管理简便性等优势,成为企业构建云平台和虚拟化环境的首选。其微内核架构、硬件辅助虚拟化技术和动态内存管理提升了性能与资源利用率;支持多操作系统和硬件平台,具备故障转移、实时迁移功能,确保业务连续性;提供可视化管理工具和PowerShell脚本自动化,简化管理流程;与Windows Server及Azure无缝集成,降低硬件、运维和能源成本。
|
存储 虚拟化 Windows
想要掌握Hyper-V如何安装,首先需要确保你的操作系统版本满足Hyper-V的安装要求
Hyper-V的安装需确保操作系统版本和硬件满足要求。硬件上,64位处理器需支持SLAT及虚拟化技术(如VT-x或AMD-V),至少4GB RAM和充足存储空间;BIOS/UEFI中启用虚拟化技术和DEP。软件方面,需Windows 10 Pro及以上或Windows Server 2016/2019及以上,并保持系统更新。安装步骤包括检查系统要求、启用Hyper-V功能、配置并创建虚拟机,最后安装操作系统。注意备份数据及网络适配器配置。

热门文章

最新文章