• 源码编译升级qemu,libvirt,以及virtmanager使用


    下文提及内容均是基于源码编译升级。已经安装了qemu,libvirt和virt-manager

    qemu升级

    yum -y install gcc gcc-c++ automake libtool zlib-devel glib2-devel bzip2-devel libuuid-devel spice-protocol spice-server-devel usbredir-devel libaio-devel ceph-devel pixman-devel
    yum install libaio-devel    #和lvm做后端存储有关

    #关于spice
    wget https://www.spice-space.org/download/releases/spice-protocol-0.12.9.tar.bz2
    tar -jxvf spice-protocol-0.12.9.tar.bz2
    cd spice-protocol-0.12.9
    ./configure --prefix=/usr --sysconfdir=/etc  --localstatedir=/var --libdir=/usr/lib64
    make -j30
    make install
    yum install celt051-devel
    wget https://www.spice-space.org/download/releases/spice-0.14.0.tar.bz2
    tar -jxvf spice-0.14.0.tar.bz2
    cd spice-0.14.0
    ./configure --prefix=/usr --sysconfdir=/etc  --localstatedir=/var --libdir=/usr/lib64
    make -j30
    make install
    # root用户下 #
    wget https://download.qemu.org/qemu-2.10.2.tar.xz
    xz -d qemu-2.10.2.tar.xz
    tar -xvf qemu-2.10.2.tar
    cd qemu-2.10.2
    ./configure --prefix=/usr --localstatedir=/var  --sysconfdir=/etc --enable-kvm --enable-rbd --target-list=aarch64-softmmu --enable-spice # 使用ceph时enable-rdb
    make -j30
    make install

     编译完成之后 做链接, 替换qemu-kvm:

    ln -s /usr/bin/qemu-system-aarch64 /usr/bin/qemu-kvm
    ln -s /usr/bin/qemu-system-aarch64 /usr/libexec/qemu-kvm

    libvirt升级

    yum install gcc libnl-devel libxml2-devel yajl-devel device-mapper-devel libpciaccess-devel libnl3-devel netcf-devel numactl-devel
    wget https://libvirt.org/sources/libvirt-4.0.0.tar.xz
    xz -d libvirt-4.0.0.tar.xz
    tar -xvf libvirt-4.0.0.tar
    cd libvirt-4.0.0
    ./configure --prefix=/usr --localstatedir=/var  --sysconfdir=/etc --with-numactl
    make
    make install
    ldconfig #更新动态链接库

    重启libvirtd,执行virsh version验证,如下:

    root@ubuntu:/usr/lib/x86_64-linux-gnu# virsh version
    Compiled against library: libvirt 4.0.0
    Using library: libvirt 4.0.0
    Using API: QEMU 4.0.0
    Running hypervisor: QEMU 2.10.0

    virt-manager不需升级,直接使用即可。如果使用apt install virt-manager升级会造成libvirt被重新安装回旧版本。

    VM Fireware替换

    安装edk2包:

    # 这个edk2包可以启动cirros
    yum install http://rpmfind.net/linux/fedora-secondary/releases/27/Everything/aarch64/os/Packages/e/edk2-aarch64-20170209git296153c5-5.fc27.noarch.rpm 
    # 比较新的edk2包,不支持cirros yum install https://www.kraxel.org/repos/jenkins/edk2/edk2.git-aarch64-0-20180612.154.gc25d390552.noarch.rpm

    替换AAVMF文件:

    rm /usr/share/AAVMF/* -rf
    ln /usr/share/edk2/aarch64/QEMU_EFI-pflash.raw /usr/share/AAVMF/AAVMF_CODE.fd
    ln /usr/share/edk2/aarch64/vars-template-pflash.raw /usr/share/AAVMF/AAVMF_VARS.fd

    即可完成,注意edk2有时是edk2.git

  • 相关阅读:
    yablog: calculate cosine with python numpy
    HDF
    numarray 1.5.1
    Angles between two ndimensional vectors in Python Stack Overflow
    3D stem plot
    linq to sql一定要注意的地方!
    将IRepository接口进行抽象,使它成为数据基类的一个对象,这样每个子类都可以有自己的最基础的CURD了
    (SQL)比较一个集合是否在另一个集合里存在的方法
    linq to sql统一更新方法,直接返回更新的对象(解决更新后再刷新数据错误显示问题)
    LINQ TO SQL数据实体应该这样设计(解决多表关联问题)
  • 原文地址:https://www.cnblogs.com/hurongpu/p/8514002.html
Copyright © 2020-2023  润新知