ubuntu14.04下libvmi 編譯安裝使用

        今天寫一篇關於libvmi的文章,事實上網上有很是多關於libvmi的文章,但是,在依照網上的作。編譯的時侯沒錯。但是在運行./example/process-list ubuntu時會報錯,就是那些錯誤致使我對libvmi折騰了一兩週,如下進行開講。linux

       首先講下,這篇使用libvmi的環境:git

        源代碼:https://github.com/libvmi/libvmi#github

        系統:ubuntu14.04ubuntu

        虛擬機:Xen-4.4windows

        在使用libvmi的example下的指令前須配置/etc/libvmi.conf文件(下篇講)dom


一.編譯libvmi的源文件post

        命令:cd libvmi-master/ui

        ./autogen.shspa

        ./configureci

       //假設報錯:Error: aclocal not found

       //解決的方法: sudo apt-get  install automake autoconf

       //假設報錯:Error: Package requirements (glib-2.0 >= 2.16) were not met

       //解決方法:$ sudo apt-get install libglib2.0-dev

       //假設報錯:Error: Package requirements (check >= 0.9.4) are not met:

       //解決方法:$ sudo apt-get install check

       $ make 

       $ sudo ldconfig 

       $ sudo make install

       //注意上面的./configure命令。在編譯過程當中會出現如下的東西,必定要注意:

 

       Feature      | Option                    | Reason

       -------------|---------------------------|----------------------------

       Xen Support  | --enable-xen=yes          | yes

       Xen Events   | --enable-xen-events=yes   | yes

       KVM Support  | --enable-kvm=no           | libvirt missing

       File Support | --enable-file=yes         | yes

       Shm-snapshot | --enable-shm-snapshot=no  | no

       -------------|---------------------------|----------------------------

       OS           | Option

       -------------|--------------------------------------------------------

       Windows      | --enable-windows=yes

       Linux        | --enable-linux=yes

 

      Tools        | Option                    | Reason

       -------------|---------------------------|----------------------------

       VMIFS        | --enable-vmifs=no   | FUSE library missing (libfuse-dev)

 

       //注意:假設看一下,你會發現。假設你要libvmi能夠支持Xen,則Xen Support  | --enable-xen=yes 而且Xen Events   | --enable-  xen-events=yes  ,其它的同樣,假設相似於上面的KVM Support  | --enable-kvm=no           | libvirt missing。是不支持kvm的,而且缺乏liobvirt

       //那麼在庫都不缺乏的時侯,怎樣使Xen Events   | --enable-xen-events=no變爲Xen Events   | --enable-xen-events=yes呢?

       //注意:./configure  --enable-xen-events=yes  

       //也可以使Xen Events   | --enable-xen-events=yes變爲Xen Events   | --enable-xen-events=no,使用如下的參數:

      ./configure  --enable-xen-events=no


二.運行libvmi命令獲取虛擬機信息

        命令:cd libvmi-master/examples

        sudo ./process-list ubuntu-qk

        注意:此處的ubuntu-qk是你用sudo xl list(有些版本號的是sudo xm list)查到的虛擬機名字

        注意:自此處可能會遇到的一些問題:

        1)像這個問題:Re: [libvirt-users] ERROR: Domain not found: no domain with matching nam

        解決方式:多是你缺乏xenstore庫,致使你的libvmi./configure時不支持xen xen event,可以在./configure時驗證看上面提到的xenxen-event處的結果。爲no,看後面的missing **,這個**可能就是你缺乏的庫,裝上就行了

        2)問題:VMI_ERROR: Found more than one VMM or file to use, please specify what you w_

        解決方法:在libvmi進行./configure的時侯,假設kvmxen同一時候支持的話,會包這個錯,解決方法,假設分析xen的。則在編譯的時侯./configure --enable-kvm=no,就可以了

相關文章
相關標籤/搜索