zoukankan      html  css  js  c++  java
  • KVM虚拟机无法启动

    一、启动虚拟机报错:

    [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
  • 相关阅读:
    Intern Day16
    粉红
    开始还房贷!
    Sonnet-十四行诗
    CSS兼容大全
    TCL电视直播软件
    《Linux权威指南》阅读笔记(2)
    《Linux权威指南》阅读笔记(1)
    Linux crontab定时执行任务 命令格式与详细例子
    linux下find查找命令用法
  • 原文地址:https://www.cnblogs.com/cyleon/p/9673060.html
Copyright © 2011-2022 走看看