linux – 如何调查无响应的KVM来宾?

我可以采取哪些步骤来调查每两周冻结一次的KVM访客?通过“冻结”,我的意思是当我尝试连接“ssh”或“virsh console”时没有响应.主机是Ubuntu(natty,11.04),使用libvirt管理其客户,客户端是Ubuntu(natty,两个服务器版本都没有安装窗口管理器.

如果我强制客人重置,它可以再工作一周. guest虚拟机syslog中没有最近或相关的消息(表示内核崩溃等).据我所知,可能是虚拟网络和tty正在破坏并阻止我与访客交谈.主持人经营着另外三位几乎相同的客人,这些客人全年都很稳定.如果guest虚拟机本身崩溃,那么syslog中是否应该有一些指示?

磁盘是使用virtio配置的lvm逻辑卷

% cat /etc/libvirt/qemu/vm-et.xml

    <domain type='kvm'>
      <name>vm-et</name>
      <uuid>8df572f1-e1dc-275a-4b9f-b7c322e2f5d3</uuid>
      <memory>2048576</memory>
      <currentMemory>2048576</currentMemory>
      <vcpu>1</vcpu>
      <os>
        <type arch='x86_64' machine='pc-0.12'>hvm</type>
        <boot dev='hd'/>
      </os>
      <features>
        <acpi/>
      </features>
      <clock offset='utc'/>
      <on_poweroff>destroy</on_poweroff>
      <on_reboot>restart</on_reboot>
      <on_crash>destroy</on_crash>
      <devices>
        <emulator>/usr/bin/kvm</emulator>
        <!--<disk type='file' device='disk'>
          <driver name='qemu' type='qcow2'/>
          <source file='/usr/scratch/appliances/vm-et/ubuntu-kvm/tmpzwV0x3.qcow2'/>
          <target dev='hda' bus='ide'/>
          <address type='drive' controller='0' bus='0' unit='0'/>
        </disk>-->
        <controller type='ide' index='0'>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
        </controller>
        <interface type='bridge'>
          <mac address='52:54:00:5a:1f:b4'/>
          <source bridge='br0'/>
          <model type='virtio'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
        </interface>
        <input type='mouse' bus='ps2'/>
        <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'/>
        <video>
          <model type='cirrus' vram='9216' heads='1'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
        </video>
        <memballoon model='virtio'>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
       </memballoon>
        <disk type='file' device='disk'>
          <source file='/dev/vg1/lv-et'/>
          <target dev='vda' bus='virtio'/>
        </disk>

        <serial type="pty">
          <source path="/dev/pts/3"/>
          <target port="1"/>
        </serial>

      </devices>
    </domain>

解决方法

调查那些问题确实很困难,因为你需要隔离设置的不同功能并测试它们 – 这在复杂的设置上非常困难,并且repro是一个为期两周的过程.

首先要做的是配置syslog以通过网络将日志发送到远程syslog服务(可能是在主机上运行的服务 – 你需要在syslog服务器上启用远程光照访问)以允许你由于存储空间或同步问题而捕获未进入访客日志的错误.

如果这不能提供有用的信息,您可以尝试连接到访客串行控制台(enter link description here在这里查看详细信息)并将发生的任何事情记录到主机上的日志文件中.

相关文章

文章浏览阅读1.8k次,点赞63次,收藏54次。Linux下的目录权限...
文章浏览阅读1.6k次,点赞44次,收藏38次。关于Qt的安装、Wi...
本文介绍了使用shell脚本编写一个 Hello
文章浏览阅读1.5k次,点赞37次,收藏43次。【Linux】初识Lin...
文章浏览阅读3k次,点赞34次,收藏156次。Linux超详细笔记,...
文章浏览阅读6.8k次,点赞109次,收藏114次。【Linux】 Open...