cyleon

一、启动虚拟机报错:

[root@KVM ~]# virsh start node-mssql-test01
error: Failed to start domain node-mssql-test01
error: internal error: qemu unexpectedly closed the monitor: Cannot set up guest memory \'pc.ram\': Cannot allocate memory

二、报错原因:不能分配内存,查看物理机内存和虚拟机分配的内存,发现剩余物理内存过少。

[root@KVM ~]# free -g
              total        used        free      shared  buff/cache   available
Mem:            125         104          14           0           6          17
Swap:            31          31           0
[root@KVM ~]# virsh dominfo node-mssql-test01
Id:             -
Name:           node-mssql-test01
UUID:           4fc06259-0873-4082-95b8-2b530c330584
OS Type:        hvm
State:          shut off
CPU(s):         16
Max memory:     30817152 KiB
Used memory:    30817152 KiB
Persistent:     yes
Autostart:      disable
Managed save:   no
Security model: none
Security DOI:   0

三、解决方法:修改虚拟机xml文件减少内存(经测试最多只能修改到20G左右)

[root@KVM ~]# virsh dumpxml node-mssql-test01 | grep -i memory
  <memory unit=\'KiB\'>20487152</memory>
  <currentMemory unit=\'KiB\'>20487152</currentMemory>
[root@KVM ~]# virsh start node-mssql-test01
Domain node-mssql-test01 started

 

分类:

技术点:

相关文章:

  • 2021-11-12
  • 2021-12-29
  • 2021-12-20
  • 2021-04-09
  • 2022-01-11
  • 2019-03-01
  • 2022-01-23
  • 2022-01-08
猜你喜欢
  • 2021-12-20
  • 2021-11-30
  • 2021-07-31
  • 2020-12-18
  • 2021-06-22
  • 2021-12-20
  • 2021-12-10
相关资源
相似解决方案