Chinaunix首页 | 论坛 | 博客
  • 博客访问: 339691
  • 博文数量: 74
  • 博客积分: 2705
  • 博客等级: 少校
  • 技术积分: 590
  • 用 户 组: 普通用户
  • 注册时间: 2007-11-05 15:13
个人简介

鱼!

文章分类

全部博文(74)

文章存档

2014年(12)

2013年(10)

2012年(4)

2011年(11)

2010年(7)

2009年(12)

2008年(16)

2007年(2)

我的朋友

分类: 虚拟化

2012-11-29 13:20:09

下载最新的centos5.5安装在windows 2008 R2 hyper-v
安装后,发现网络卡没有驱动,不得已,改设定centos 网络系由传统的网络卡接口,网络可以联机,但是此种网卡性能不够好

上网找相关数据,安装centos必须安装
Linux Integration Services v2.1 for Microsoft Hyper-V

网络卡才可以顺利驱动

找到的相关文件
最新的文章(centos 5.5–跟我要装的同版本)
http://blog.yam.com/gavint/article/32203135
按照网页的方式,先以传统网络接口,进行相关的安装,再mount linux_ic.iso进行
make

make install

但是在make时出现
make: *** /lib/modules/2.6.18-????/build: No such file or directory?

的问题
从另一个网页得知

(介绍最详细)

下以下指令(要设定传统网络接口,因为要上网update)
sudo yum update

reboot

再回到/opt/linux_ic (linuc_ic.iso整个复制过来目录文件夹),go on时发现如下错误,

Updating module dependencies. This may take a while...depmod make: depmod: Command not found make: *** [install] Error 127

Have a look at Adding a Directory to Linux PATH Environment Variable first and then run this portion again:

make && make install

reboot

After reboot, if your VM is x64, login and run:

yum install adjtimex

终于,网络卡顺利驱动成功

[附注]

网络上还有一些旧文章,其内容说名的linux_ic.iso已找不到(其安装为./setup.pl drivers)
竟然找不到,所以就不能以此方式安装

新的linux_ic.iso请参考第一个参考网页连结

旧文件网页连结

http://www.zdnet.com.tw/enterprise/blog/powerman/0,2003032234,10000777,00.htm

[后续设定网页连结]

ostube

http://blog.smps.tp.edu.tw/~kcodavid/index.php?load=read&id=504

OVER!!

后记:

验证 Linux Integration Services v2.1 功能
 1. modinfo 指令,可取得模块信息
  # /sbin/modinfo vmbus
  filename: /lib/modules/2.6.18-194.el5/kernel/drivers/vmbus/vmbus.ko
  version: 2.1.25
  license: GPL
  srcversion: 3C1899C419665CB2514F2D0
  depends:
  vermagic: 2.6.18-194.el5 SMP mod_unload 686 REGPARM 4KSTACKS gcc-4.1
  parm: vmbus_irq:int
  parm: vmbus_loglevel:int
  这个指令以可以使用其他模块,例如 modinfo [vmbus|netvsc|storvsc|blkvsc]


 2. 验证所有子系统是否正常运作
  # /sbin/lsmod | grep vsc
  blkvsc 37572 3
  storvsc 32292 0
  netvsc 40144 0
  vmbus 51912 3 blkvsc,storvsc,netvsc
  scsi_mod 141973 5 scsi_dh,blkvsc,storvsc,libata,sd_mod


 NOTE: 各子系统功能如下
   "netvsc" 提供网络卡整合支持。
   "storvsc" 提供 SCSI Disk 整合支持。
   "blkvsc" 提供 IDE Disk 整合支持。
   "vmbus" 提供 Host Guest 快速沟通平台。


卸载 Linux Integration Services
 1. # cd /opt/linux_ic_v21_rtm
 2. # make uninstall
 3. # vi /boot/grub/grub.conf
  将含有 noprobe 的项目删除。
 4. 还原 initrd 映像档
  # cp /boot/initrd-2.6.18-194.el5.img.backup0 /boot/initrd-2.6.18-194.el5.img
 5. 重新启动


备注
 1. 如果使用 RedHat Enterprise Linux 5.5 需修改下列档案。
  # vi /boot/grub/grub.conf
   hda=noprobe hdb=noprobe 修改为 ide0=noprobe ide1=noprobe


 2. Enabling Promiscuous Mode
  The synthetic network adapter can be used in either normal mode or promiscuous mode. When in promiscuous mode, the synthetic network adapter will pass all packets through instead of only the packets destined for the guest. This is usually needed only for advanced networking configurations.


  To enable promiscuous mode, execute the following steps as the root user:
  # rmmod netvsc.ko
  # modprobe netvsc promisc_mode=1


  To disable promiscuous mode, execute the following steps as the root user:
  # rmmod netvsc.ko
  # modprobe netvsc


 3. (KB2387594)
  问题:更新 Kernel 后,开机出现"Unable to mount root file system"。
  原因:更新 Kernel 后,Linux Integration Services 需重新编译。
  解决方法:为防止此问题,需在更新 Kernel 前,启用 Dynamic Kernel Module Support (DKMS)
  I. 安装最新版本的 DKMS 套件:
   # wget or
   # rpm -ivh dkms-2.1.1.2-1.noarch.rpm


  II. 环境设定
   a. 复制 Linux Integration Services 的原始档到 VM
    # mkdir /usr/src/linuxic-2.1
    # cp -R /media/cdrom/* /usr/src/linuxic-2.1
   b. 复制 dkms.conf /usr/src/linuxic-2.1
    # cp /opt/linux_ic_v21_rtm/scripts/dkms.conf /usr/src/linuxic-2.1
   c. 将下列信息额外加入到 /etc/modprobe.conf
    alias scsi_hostadapter1 vmbus
    alias scsi_hostadapter2 blkvsc
    alias scsi_hostadapter3 storvsc
    alias scsi_hostadapter4 netvsc


  III. 透过 DKMS 安装 Drivers
   # dkms add -m linuxic -v 2.1
   # dkms build -m linuxic -v 2.1
   # dkms install --force -m linuxic -v 2.1
   # reboot


  IV. 重开机后,确认 drivers 是否有成功加载
   # /sbin/modinfo vmbus
   filename: /lib/modules/2.6.18-194.el5/extra/vmbus.ko
   version: 2.1.25
   license: GPL
   srcversion: 3C1899C419665CB2514F2D0
   depends:
   vermagic: 2.6.18-194.el5 SMP mod_unload 686 REGPARM 4KSTACKS gcc-4.1
   parm: vmbus_irq:int
   parm: vmbus_loglevel:int

阅读(1965) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~