• RHEL3.9GA virtio 设定方法


      RHEL3.9GA系统安装好,默认磁盘格式是IDE格式的,若需要转换成virtio格式,需要经一下几步来设定:

    1、更新kernel,并重新启动系统。

    # rpm -Uvh kernel-smp-2.4.21-63.EL.i686.rpm

    2、修改grub文件,使其启动到2.4.21-63.ELsmp版本

    # vi /etc/grub.conf

    # grub.conf generated by anaconda

    #

    # Note that you do not have to rerun grub after making changes to this file

    # NOTICE:  You have a /boot partition.  This means that

    #          all kernel and initrd paths are relative to /boot/, eg.

    #          root (hd0,0)

    #          kernel /vmlinuz-version ro root=/dev/hda2

    #          initrd /initrd-version.img

    #boot=/dev/hda

    default=0

    timeout=10

    splashimage=(hd0,0)/grub/splash.xpm.gz

    title Red Hat Enterprise Linux AS (2.4.21-63.ELsmp)

            root (hd0,0)

            kernel /vmlinuz-2.4.21-63.ELsmp ro root=LABEL=/

            initrd /initrd-2.4.21-63.ELsmp.img

    title Red Hat Enterprise Linux AS (2.4.21-50.EL)

            root (hd0,0)

            kernel /vmlinuz-2.4.21-50.EL ro root=LABEL=/ nmi_watchdog=0 divider=10 notsc lpj=n

            initrd /initrd-2.4.21-50.EL.img

    3、重起系统

    # reboot

    4、安装virtio包

    # rpm –ivh  kmod-virtio-smp-0.1-17.el3.i686.rpm

    5、查看/etc/rc.d/rc.sysinit文件,找到如下内容所在位置:

    if  [  -f  /etc/rc.modules ];then

           /etc/rc.modules

    fi

    6、在该内容下添加内容,具体如下:

    if  [  -f  /etc/rc.modules ];then

           /etc/rc.modules

     fi

     modprobe  virtio

     modprobe  virtio_ring

     modprobe  virtio_blk

     modprobe  virtio_net

     modprobe  virtio_pci

    7、重启系统,加载模块。

    # reboot

    8、利用mkinitrd命令,创建initrd文件

    #mkinitrd --with virtio --with virtio_ring --with virtio_blk --with virtio_net --with virtio_pci /boot/initrd-2.4.21-63.ELsmp.img 2.4.21-63.ELsmp

    9、执行完毕,关闭guest。并在图形化界面操作,将磁盘格式选定为virtio格式。

    10、开启guest ,guest正常启动。此时磁盘格式已成功转化为virtio格式。

  • 相关阅读:
    当别人没说好,那么事就没达成协定
    设计模式(六):原型模式
    《一拳超人》观后感
    设计模式(五):中介者模式
    设计模式(四):单例模式与工厂模式
    设计模式(二):构造器模式与模块模式
    设计模式(一):概念小谈
    CSS代码记录
    java之如何实现调用启动一个可执行文件,exe
    file类之目录
  • 原文地址:https://www.cnblogs.com/poiqwe/p/2840348.html
Copyright © 2020-2023  润新知