源碼編譯升級qemu,libvirt,以及virt-manager使用

下文說起內容均是基於源碼編譯升級。已經安裝了qemu,libvirt和virt-managerlinux

qemu升級c++

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:git

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

 

libvirt升級ubuntu

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被從新安裝回舊版本。app

 

VM Fireware替換ui

安裝edk2包:spa

# 這個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文件:.net

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.gitcode

相關文章
相關標籤/搜索