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]

目录
相关文章
|
3天前
|
Ubuntu Linux 内存技术
Linux(14)Debain Make image and module configuration instructions
Linux(14)Debain Make image and module configuration instructions
7 0
|
3天前
|
Rust 开发工具 开发者
如何通过cargo install安装我们的crate?
我在安装tauri的开发工具时,产生一个疑问,为什么可以通过cargo安装全局命令,顺着这个线索我找到了如下方案。原理是在项目开发者指定可执行文件,也就是`[[bin]]`,然后发布到crates.io,之后就可以通过install安装到可执行目录下,我们就能正常使用了。并不是所有crate都可以执行,而是只有在源码中声明bin的才能使用。
|
9月前
|
并行计算 Ubuntu PyTorch
ImportError:..mmcv/_ext.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZNK2at6Tensor6deviceEv解决
ImportError:..mmcv/_ext.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZNK2at6Tensor6deviceEv解决
780 0
|
11月前
|
自然语言处理
openEuler 打开图形菜单报错:make [1]:‘ [ scripts/i Makefile. host:9: scripts/ kconfig/ lexer. lex.c]错误 127
openEuler 打开图形菜单报错:make [1]:‘ [ scripts/i Makefile. host:9: scripts/ kconfig/ lexer. lex.c]错误 127
216 0
|
C++ iOS开发
报错解决:Could not build wheels for soxr, which is required to install pyproject.toml-based projects(可用)
链接如下:【金山文档】 1-Microsoft Visual C++ Build Tools。找了好久,才找到正确的解决方案,网上一大堆升级setuptools的方法只对少数人管用。注意,虽然我的这个报错内容有点长,但是我感觉和其它的。如果网页提示登录,可以不用登录,直接下载即可。然后打开镜像ios文件(双击即可)错误是一样的解决方案。文件,打开后安装即可。
2406 1
报错解决:Could not build wheels for soxr, which is required to install pyproject.toml-based projects(可用)
解决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
335 0
解决ERROR: Cannot uninstall ‘PyYAML‘. It is a distutils installed project and thus we cannot accuratel
解决ERROR: Cannot uninstall ‘llvmlite‘. It is a distutils installed project and thus we cannot accurat
解决ERROR: Cannot uninstall ‘llvmlite‘. It is a distutils installed project and thus we cannot accurat
727 0
解决ERROR: Cannot uninstall ‘llvmlite‘. It is a distutils installed project and thus we cannot accurat
You must install libks to build mod_signalwire
You must install libks to build mod_signalwire
138 0
|
编译器 C语言
CodeBlocks出现Can‘t find compiler executable in your search path for GNU GCC Compier错误
CodeBlocks出现Can‘t find compiler executable in your search path for GNU GCC Compier错误
230 0
CodeBlocks出现Can‘t find compiler executable in your search path for GNU GCC Compier错误
|
Python
Cannot uninstall 'numpy'. It is a distutils installed project and thus we cannot accurately determin
版权声明:本文为 testcs_dn(微wx笑) 原创文章,非商用自由转载-保持署名-注明出处,谢谢。 https://blog.csdn.net/testcs_dn/article/details/81116048 Cannot uninstall 'numpy'.
5922 0