kvm虚拟化两个小故障的处理

  • kvm
  • 2月 21, 2014
  • 1 评论

问题一:KVM宿主机,在使用virsh console时,发现控制台(console)无法使用
报出如下错误:
error: operation failed: Active console session exists for this domain

现象:

# virsh console v03
Connected to domain v03
Escape character is ^]
error: operation failed: Active console session exists for this domain

解决办法:

# ps aux | grep console
root     19449  0.0  0.0 300964  3648 pts/1    Sl    2013  33:33 /usr/bin/virsh --connect qemu:///system console 2

kill -9 19449

重新登录console

# virsh console v03
Connected to domain v03
Escape character is ^]

问题二: KVM明明有内存很多的内存,但是因为内存不够无法创建虚拟机。

实际内存情况:

# free -m
             total       used       free     shared    buffers     cached
Mem:         32060      31180        879          0        163      22466
-/+ buffers/cache:       8550      23509
Swap:        16383          4      16379

KVM中可分配内存仅为890M:

# virsh freecell
Total: 880492 KiB

发现是linxu下内存cache的问题,清理内存cache:

sync; echo 3 > /proc/sys/vm/drop_caches

现在的状态:

# free -m
             total       used       free     shared    buffers     cached
Mem:         32060       7652      24407          0          0         15
-/+ buffers/cache:       7635      24424
Swap:        16383          4      16379

现在KVM可分配内存如下所示:

 virsh freecell
Total: 24985164 KiB

u2

Related Posts

kvm下安装Debian9无法启动

[摘要] kvm里面安装了Debian9.2,启动的时候一直…

Read more

One thought on “kvm虚拟化两个小故障的处理

评论已关闭。

You Missed

你的AI管家永不眠:拆解Gemini Spark的云端Agent架构

  • u2
  • 5月 22, 2026
  • 42 views

CodeGraph 让 AI 编程助手拥有”代码知识图谱”

  • u2
  • 5月 19, 2026
  • 171 views

MCP Gateway 完全指南:企业级 AI Agent 的控制平面

  • u2
  • 5月 17, 2026
  • 57 views

技术深度解析:Model Context Protocol (MCP)

  • u2
  • 5月 16, 2026
  • 66 views

Hermes Agent 自动学习与成长原理深度解读

  • u2
  • 5月 14, 2026
  • 111 views

Agent Memory + Skills 双轮驱动 Memori Labs × Anthropic Dreaming 执行记忆 vs 会话记忆,如何构建持续进化的 Agent

  • u2
  • 5月 11, 2026
  • 111 views
Agent Memory + Skills 双轮驱动 Memori Labs × Anthropic Dreaming 执行记忆 vs 会话记忆,如何构建持续进化的 Agent