compile libvirt

简介: POSIX-linux 编译安装libvirt依赖包; 1.yum install device-mapper-devel 2.yum install libpciaccess-devel 3.

POSIX-linux 编译安装libvirt依赖包;

1.yum install device-mapper-devel

2.yum install libpciaccess-devel

3.yum -y install libnl-devel

4.初步编译配置完成;

总结,通常系统情况下Ruiy维护的OS系统,在手动自定义编译libvirt时需添加的依赖包用如下yum -y install libpciaccess-devel libnl-devel device-mapper-devel;

5,一句话概括hypervisors

libvirt supports many different kinds of virtualization (often referred to as "drivers司机" or "hypervisors管理员")

linux 抓取硬件序列号

厂商在主板里烧入的序列号(SN)是唯一的,可以作为一台服务器的唯一索引。通过Linux下的dmidecode命令可以很方便地抓取到服务器的序列号。

但是由于各家厂商对SMBios的刷写规范不太一样,我们需要做一些兼容的操作。

简单总结了一下,见下表

厂商 一般抓取方法
Dell dmidecode -s system-serial-number
HP dmidecode -s system-serial-number
IBM dmidecode -s system-serial-number
Huawei dmidecode -s system-serial-number(华为机架式服务器) 或 
dmidecode -s baseboard-serial-number(华为刀片)

 

用一段shell来覆盖所有的机型,如下:

get_sn(){
     local  mySN=`dmidecode -s system-serial-number |  grep  - v  '#' `
     if  echo  "${mySN}"  grep  -qiE  "^NotSpecified|^None|^ToBeFilledByO.E.M.|O.E.M."  then
             mySN=`dmidecode -s baseboard-serial-number`
     fi
     #对于RHEL4和CentOS4,dmidecode不支持-s参数,需要采用不同的SN获取方法
     if  grep  -q  'release 4'   /etc/redhat-release  then
         mySN=`dmidecode |  grep  -A5  'System Information'  grep  'Serial Number'  awk  '{print $3}'  sed  's/^[ t]*//g'  sed  's/[ t]$//g' `
     fi
     echo  $mySN
}

希望对服务器运维有帮助

Not all hypervisors supported by libvirt require a running libvirtd. If you want to connect to a VMware ESX/ESXi or GSX server then libvirtd is not necessary. See the VMware ESX page for details

http://www.aikaiyuan.com/2900.html [db2 for centos]

目录
相关文章
|
Linux C语言
LINUX error: Building GCC requires GMP 4.2+, MPFR 3.1.0+ and MPC 0.8.0+.
LINUX error: Building GCC requires GMP 4.2+, MPFR 3.1.0+ and MPC 0.8.0+.
663 0
LINUX error: Building GCC requires GMP 4.2+, MPFR 3.1.0+ and MPC 0.8.0+.
|
5月前
|
Linux
linux运行protoc出现错误 while loading shared libraries: libprotoc.so.19
linux运行protoc出现错误 while loading shared libraries: libprotoc.so.19
|
编译器 Linux
ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.22' not found
ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.22' not found
1119 0
|
并行计算 编译器 TensorFlow
win10 install tensorflow error:Loaded runtime CuDNN library: 7102 but source was compiled with 7005
win10 install tensorflow error:Loaded runtime CuDNN library: 7102 but source was compiled with 7005
133 0
解决ERROR: Cannot uninstall ‘PyYAML‘. It is a distutils installed project and thus we cannot accuratel
解决ERROR: Cannot uninstall ‘PyYAML‘. It is a distutils installed project and thus we cannot accuratel
304 0
解决ERROR: Cannot uninstall ‘PyYAML‘. It is a distutils installed project and thus we cannot accuratel
libtoolize: error: Please install GNU M4, or 'export M4=/path/to/gnu/m4'
libtoolize: error: Please install GNU M4, or 'export M4=/path/to/gnu/m4'
107 0
|
C语言
编译OpenJDK8:configure error /usr/lib64/ccache/gcc is a symbolic link to ccache
编译OpenJDK8:configure error /usr/lib64/ccache/gcc is a symbolic link to ccache
85 0