解决 CPU topology doesn't match maximum vcpu count
来源:互联网 发布:js获取今天年月日 编辑:程序博客网 时间:2024/06/06 06:58
[root@nova08 6447f1bf-db9a-4a97-b281-22c329836018]# virsh define xml
error: Failed to define domain from xml
error: unsupported configuration: CPU topology doesn't match maximum vcpu count
提示CPU topology doesn't match maximum vcpu count , 很奇怪啊,为什么会报这种错,于是去翻代码,根本没有段代码,很奇怪了.
于是google了下, 发现如下代码:
> > + /* qemu as of 2.5.0 rejects SMP topologies that don't match the cpu count */> > + if (def->cpu && def->cpu->sockets) {> > + topologycpus = def->cpu->sockets * def->cpu->cores * def->cpu->threads;> > + if (topologycpus != virDomainDefGetVcpusMax(def)) {> > + /* presence of query-hotpluggable-cpus should be a good enough witness */> > + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS)) {> > + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",> > + _("CPU topology doesn't match maximum vcpu count"));> > + goto cleanup;> > + }
从代码可以看出来是topologycpus = def->cpu->sockets * def->cpu->cores * def->cpu->threads; 总的cpu不等于 max cpu。
于是通过代码文件,找到我当前 qemu2.0.0的代码,发现我的代码是这样的:
if (def->cpu->sockets && virDomainDefGetVcpusMax(def) > def->cpu->sockets * def->cpu->cores * def->cpu->threads) { virReportError(VIR_ERR_XML_DETAIL, "%s", _("Maximum CPUs greater than topology limit")); goto error; }
这两个代码一样,但是报错的日志不一样。
于是马上 virsh version 查看版本:
[root@nova08 6447f1bf-db9a-4a97-b281-22c329836018]# virsh versionCompiled against library: libvirt 2.0.0Using library: libvirt 2.0.0Using API: QEMU 2.0.0Running hypervisor: QEMU 2.6.0
libvirt是2.0.0的版本。
这就郁闷了,我本地代码库的tag也是 2.0.0啊。 奇怪了,哪位知道求告诉下原因。
从以上代码可以看出,如果要使用maxcpu就不能有 cpu-sockets的配置,就是不能有:
<cpu> <topology sockets='2' cores='1' threads='1'/> 不能有这一行 </cpu>
于是去掉 topology sockets,这一行,及解决问题。
阅读全文
0 0
- 解决 CPU topology doesn't match maximum vcpu count
- Column count doesn't match value count at row 1
- Column count doesn't match value count at row 1
- Column count doesn't match value count at row 1
- Column count doesn't match value count at row 1
- Column count doesn't match value count at row 1
- Column count doesn't match value count at row 1
- Column count doesn't match value count at row 1
- Column count doesn't match value count at row 1
- Column count doesn't match value count at row 1
- Column count doesn't match value count at row 1 问题Column count doesn't match value count at row 1
- Column count doesn't match value count at row 1错误原因
- mysql错误:Column count doesn't match value count at row 1
- mysql提示Column count doesn't match value count at row 1错误
- 执行Mysql提示"Column count doesn't match value count at row 1"错误
- 错误提示: Column count doesn't match value count at row 1
- java.sql.SQLException:Column count doesn't match value count at row 1
- java.sql.SQLException: Column count doesn't match value count at row 1
- 三十年河东三十年河西
- TeamViewer不小心注册成商业版试用期到期怎么办
- 使用 DialogFragment 和 BottomSheet 实现底部弹出框
- Spring 报 NoSuchBeanDefinitionException
- 技术文章 | 深入剖析:关于cache buffers chains的经典案例处理详解
- 解决 CPU topology doesn't match maximum vcpu count
- 大化设计模式-单例模式
- n皇后,排列树
- Android录音与播放录音实现
- 黑客术语基础知识
- ASP.NET身份验证方式
- Windows下使用linux命令
- HTML5移动端通过touch事件判断手势方向及页面到达底部
- 安卓开发获取总方法数