首先去微软下载集成服务
?familyid=c1256a7f-8a2d-4b18-851c-63b22ca976d3&displaylang=zh-cn
然后在hyper-v管理器中停到RedHat Enterprise Linux 6,并在设置中移除旧版网络适配器并添加新版的网络适配器,然后在DVD驱动器中挂载刚才下载的镜像,保存设置。启动linux。
以root用户登录,此时执行ifconfig-a会出现如下结果
lo Link encap:Local Loopback
inetaddr:127.0.0.1 Mask:255.0.0.0
inet6addr: ::1/128 Scope:Host
UPLOOPBACK RUNNING MTU:16436 Metric:1
RXpackets:0 errors:0 dropped:0 overruns:0 frame:0
TXpackets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0txqueuelen:0
RXbytes:0 (0.0 b) TX bytes:0 (0.0 b)
说明只有会换连接,没有可用的网卡。
下面准备安装集成服务
mkdir/mnt/cdrom(创建cdrom目录)
mount/dev/cdrom /mnt/cdrom(挂载刚才挂载的镜像文件)
cd/mnt/cdrom里面有两个目录x86和x86_64前者是32位操作系统用的后者是64位用的。
执行arch命令出现i686说明是32的出现x86_64是64位的,根据自己的情况进入相应的目录(我的是32位的,进入X86目录)。
rpm–ivh kmod-microsoft-hyper-v-rhel6-60.1.x86_64.rpm
rpm–ivh microsoft-hyper-v-rhel6-60.1.i686.rpm
安装完成后重启系统
Reboot
同样用root登录,执行ifconfig–a 显示如下结果
eth2 Link encap:Ethernet HWaddr 00:15:5D:E8:D9:11
inetaddr: 192.168.1.140 Bcast: 192.168.1.255 Mask:255.255.255.0
inet6addr: 2001:da8:20c:502:215:5dff:fee8:d911/64 Scope:Global
inet6addr: fe80::215:5dff:fee8:d911/64 Scope:Link
UPBROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RXpackets:11202 errors:0 dropped:0 overruns:0 frame:0
TXpackets:460 errors:0 dropped:0 overruns:0 carrier:0
collisions:0txqueuelen:1000
RXbytes:1147316 (1.0 MiB) TX bytes:67755 (66.1 KiB)
lo Link encap:Local Loopback
inetaddr:127.0.0.1 Mask:255.0.0.0
inet6addr: ::1/128 Scope:Host
UPLOOPBACK RUNNING MTU:16436 Metric:1
RXpackets:0 errors:0 dropped:0 overruns:0 frame:0
TXpackets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0txqueuelen:0
RXbytes:0 (0.0 b) TX bytes:0 (0.0 b)
说明网卡已经成功被发现。
配置网卡
配置文件位置/etc/sysconfig/network-scripts/ifcfg-seth0。我的配置如下
DEVICE=seth0
BOOTPROTO=static(获取ip方式)
IPADDR=192.168.1.140
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
ONBOOT=yes(开机自动激活)
配置好后执行下列命令servicenetwork restart重启网络服务,至此可以不用旧版的网络适配器来连接linux了。
注意:
此集成服务支持的host主机
WindowsServer® 2008 Standard, Windows Server 2008 Enterprise, and Windows
Server2008 Datacenter (64-bit versions only)
Microsoft®Hyper-V Server 2008
WindowsServer® 2008 R2 Standard, Windows Server 2008 R2 Enterprise, andWindows
Server2008 R2 Datacenter
Note
Microsoft®Hyper-V Server 2008 R2
Supportedversions include those updated with Service Pack 1 or Service Pack 2,where available.
此集成服务支持的guest主机
Thisversion of Linux Integration Services supports the following guestoperating systems and
virtualCPU (vCPU) configurations:
RedHat Enterprise Linux 6.0 and 6.1 x86 and x64 (Up to 4 vCPU)
CentOS6.0 x86 and x64 (Up to 4 vCPU)
Othersupported operating systems (including SUSE Linux Enterprise Server10 and Red Hat
EnterpriseLinux 5) should use the version of Linux Integration Servicesavailable at
?FamilyID=eee39325-898b-4522-9b4cf4b5b9b64551.