Libvirt研发:屏蔽虚拟化特性
简介记录如何解决虚机内软件、游戏启动报错:Sorry, This Application Cannot Run Under A Virtual Machine
关键点
虚拟化检测点可参考文档:操作系统能否知道自己处于虚拟机中?
CPU model and topology
禁用CPU的hypervisor功能。
使用host-passthrough模式,透传主机CPU能力。
参考xml相关配置:
123456789...<cpu mode='host-passthrough' check='none'> <topology sockets='2' cores='2' threads='2'/> <feature policy='disable' name='hypervisor'/> <numa> <cell id='0' cpus='0-7 ...
OpenStack使用:GPU卡使用
含有多个设备的GPU常见型号:Quadro RTX 6000/8000
简述系统内lspci查看显卡信息如下,可以看到同一个PCI插槽上(b1)包含了4个设备:VGA compatible、Audio device、USB、Serial bus,同时4个设备对应的驱动各不相同。
目前cyborg暂不支持此类加速设备的管理,cyborg采集的attach handle info中,只包含了function 0,即生成的xml中仅会透传GPU中的1个设备进入虚机,由于设备不完整,会导致libvirt会无法拉起虚机。
使用此类GPU,需要通过nova compute的PCI透传功能实现,总体思路如下:
切换GPU卡各类设备的驱动为vfio_pci。
透传GPU卡的所有设备至虚机。
若这两点有一点不满足,libvirt在拉起虚机时均会报如下报错:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646 ...
NVIDIA使用:虚机游戏性能
环境信息
服务器:NE5260M5
CPU型号:Intel(R) Xeon(R) Silver 4210 CPU @ 2.20GHz
GPU型号:vGPU GRID T4-4Q(显存4G)
虚机配置:绑核大页 8C16G,数据盘100G,系统盘200G
游戏:英雄联盟,画质中等
部署问题Windows虚机核数未完全被使用未配置CPU拓扑信息的虚机,CPU拓扑关系如下:
123456<cpu mode='host-passthrough' check='none'> <topology sockets='8' cores='1' threads='1'/> <numa> <cell id='0' cpus='0-7' memory='16777216' unit='KiB' memAccess='shared'/> </nu ...
Linux配置:硬件管理
IPMI管理1234567891011121314151617181920212223242526272829303132333435# 查看ipmi信息[root@k205 ~]# ipmitool lan print 1Set in Progress : Set CompleteAuth Type Support : MD5Auth Type Enable : Callback : MD5 : User : MD5 : Operator : MD5 : Admin : MD5 : OEM : MD5IP Address Source : Static AddressIP Address : 111.111.50.14Subnet Mask : 255.255.255.0MAC ...
Linux配置:CPU管理
Generic Scaling GovernorsCPUFreq provides generic scaling governors that can be used with all scaling drivers. As stated before, each of them implements a single, possibly parametrized, performance scaling algorithm.
Scaling governors are attached to policy objects and different policy objects can be handled by different scaling governors at the same time (although that may lead to suboptimal results in some cases).
The scaling governor for a given policy object can be changed at any time with t ...
OpenStack部署:Cyborg
资源管理Device Profile12345678910# 创建VGPU模板openstack accelerator device profile create vgpu-dp '[{"resources:VGPU": "1"}]'# 创建PGPU模板openstack accelerator device profile create pgpu-dp '[{"resources:PGPU":"1"}]'openstack accelerator device profile create pgpu-dp '[{"resources:PGPU":"1"}, {"resources:PGPU":"1"}]'openstack accelerator device profile creat ...
NVIDIA使用:渲染能力
参考文档
NVIDIA官网文档:Virtual GPU Client Licensing User Guide
腾讯云:安装 NVIDIA GRID 驱动
关于nvidia Grid license - 腾讯云开发者社区-腾讯云
Unigine Valley BenchMark测试体验
Unigine Benchmark官网
Libvirt使用:通用手册
常见问题Internal error cannot find character device (null)
Symptom
This error message appears when attempting to connect to a guest virtual machine’s console:
1234# virsh console test2Connected to domain test2 Escape character is ^] error: internal error cannot find character device (null)
Investigation
This error message shows that there is no serial console configured for the guest virtual machine.
Solution
Set up a serial console in the guest’s XML file.
Procedure B.1. Setting up a serial conso ...
MySQL部署:Percona XtraDB Cluster
IntroductionPercona XtraDB Cluster is a fully open-source high-availability solution for MySQL. It integrates Percona Server and Percona XtraBackup with the Galera library to enable synchronous multi-source replication.
A cluster consists of nodes, where each node contains the same set of data synchronized accross nodes. The recommended configuration is to have at least 3 nodes, but you can have 2 nodes as well. Each node is a regular MySQL Server instance (for example, Percona Server). You can ...
OpenStack研发:Cyborg
IntroductionCyborg (previously known as Nomad) is an OpenStack project that aims to provide a general purpose management framework for acceleration resources (i.e. various types of accelerators such as GPU, FPGA, ASIC, NP, SoCs, NVMe/NOF SSDs, ODP, DPDK/SPDK and so on).
OverviewCyborg内部架构
cyborg-api - cyborg-api is a cyborg service that provides REST API interface for the Cyborg project. It supports POST/PUT/DELETE/GET operations and interacts with cyborg-agent and cyborg-db via cyborg-conduct ...