大网数据广告活动
服务器运维问答

How can I check how much ram available to add to guest OS on libvirt?

· 52CE 我爱测

I have a server with 32 gb ram and there is libvirt. There are 12 gb of ram is used. When I try to add ram to my guest OS it is not possible to add more than 12gb ram. How can I check how much ram available to add to guest OS on …

问题原文

原帖链接 · Gani Rakhmatov · CC BY-SA 3.0

I have a server with 32 gb ram and there is libvirt. There are 12 gb of ram is used. When I try to add ram to my guest OS it is not possible to add more than 12gb ram. How can I check how much ram available to add to guest OS on libvirt? I want to give all available memory to it.

已采纳解答

原帖链接 · Michael Hampton · CC BY-SA 3.0

The absolute maximum amount of RAM you can give to a guest is the total amount of RAM available to the host. But of course, if you do that, then you should expect some performance issues, or things will just fail to start or run properly.

That number is displayed both when you create the VM in virt-manager, and by virsh nodememstats.

# virsh nodememstats
total  :             32938320 KiB
free   :              1087720 KiB
buffers:              1249844 KiB
cached :              3681120 KiB

This system is using almost all of its memory, so it has little room left for memory for new VMs.

To improve memory usage in KVM, make sure that each Windows guest has the virtio balloon driver installed (Linux already includes this driver), and enable ksm on the host to deduplicate virtual machine memory.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-10-25)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。