Ubuntu 12.04 KVM 运行 Ubuntu 12.04,linux-image-virtual 在启动时崩溃

Ubuntu 12.04 KVM 运行 Ubuntu 12.04,linux-image-virtual 在启动时崩溃

我的一台虚拟机在 virsh 中卡在“暂停”状态。如果我销毁并重新启动它,一段时间后它会以“正在运行”的状态暂停。如果我反应快的话,我最多可以在登录时输入我的用户名,但之后它会关闭。

我不知道从哪里开始所以任何帮助都将非常有用!!

我可以通过 guestfish 访问虚拟机文件。kern.log 和 syslog 没有填充新行。这是我从 kern.log 获得的最后一个输入:

Dec 13 11:21:08 soft201 kernel: imklog 5.8.6, log source = /proc/kmsg started.
Dec 13 11:21:08 soft201 kernel: [    0.000000] Initializing cgroup subsys cpuset
Dec 13 11:21:08 soft201 kernel: [    0.000000] Initializing cgroup subsys cpu
Dec 13 11:21:08 soft201 kernel: [    0.000000] Linux version 3.2.0-34-virtual (buildd@allspice) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #53-Ubuntu SMP Thu Nov 15 11:08:40 UTC 2012 (Ubuntu 3.2.0-34.53-virtual 3.2.33)
Dec 13 11:21:08 soft201 kernel: [    0.000000] Command line: root=UUID=61d48b48-a06a-48fb-842e-b38014086a93 ro quiet splash
Dec 13 11:21:08 soft201 kernel: [    0.000000] KERNEL supported cpus:
Dec 13 11:21:08 soft201 kernel: [    0.000000]   Intel GenuineIntel
Dec 13 11:21:08 soft201 kernel: [    0.000000]   AMD AuthenticAMD
Dec 13 11:21:08 soft201 kernel: [    0.000000]   Centaur CentaurHauls
Dec 13 11:21:08 soft201 kernel: [    0.000000] BIOS-provided physical RAM map:
Dec 13 11:21:08 soft201 kernel: [    0.000000]  BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
Dec 13 11:21:08 soft201 kernel: [    0.000000]  BIOS-e820: 0000000000100000 - 00000000dfffc000 (usable)
Dec 13 11:21:08 soft201 kernel: [    0.000000]  BIOS-e820: 00000000dfffc000 - 00000000e0000000 (reserved)
Dec 13 11:21:08 soft201 kernel: [    0.000000]  BIOS-e820: 00000000feffc000 - 00000000ff000000 (reserved)
Dec 13 11:21:08 soft201 kernel: [    0.000000]  BIOS-e820: 00000000fffc0000 - 0000000100000000 (reserved)
Dec 13 11:21:08 soft201 kernel: [    0.000000]  BIOS-e820: 0000000100000000 - 0000000a20000000 (usable)
Dec 13 11:21:08 soft201 kernel: [    0.000000] NX (Execute Disable) protection: active
Dec 13 11:21:08 soft201 kernel: [    0.000000] DMI 2.4 present.
Dec 13 11:21:08 soft201 kernel: [    0.000000] DMI: Bochs Bochs, BIOS Bochs 01/01/2007
Dec 13 11:21:08 soft201 kernel: [    0.000000] e820 update range: 0000000000000000 - 0000000000010000 (usable) ==> (reserved)
Dec 13 11:21:08 soft201 kernel: [    0.000000] e820 remove range: 00000000000a0000 - 0000000000100000 (usable)
Dec 13

如您所见,最后一行被截断了。我甚至不知道这是否相关。dmesg 日志是空的。

VM 的 qemu 日志返回以下内容:

2012-12-13 12:29:47.584+0000: starting up
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin QEMU_AUDIO_DRV=none /usr/bin/kvm -S -M pc-1.0 -enable-kvm -m 40960 -smp 14,sockets=14,cores=1,threads=1 -name numerink201 -uuid f4a889ed-a089-05d0-cc9d-9825ab1faeba -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/numerink201.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -drive file=/var/lib/libvirt/images/client.soft.fr/tmpcZAD9U.qcow2,if=none,id=drive-ide0-0-0,format=qcow2 -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -fsdev local,security_model=none,id=fsdev-fs0,path=/home/shared_folders/soft201 -device virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=hostshare,bus=pci.0,addr=0x5 -netdev tap,fd=18,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=02:00:00:1d:b9:e7,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -usb -vnc 127.0.0.1:0 -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
char device redirected to /dev/pts/3
qemu: terminating on signal 15 from pid 28248
2012-12-13 12:30:14.455+0000: shutting down

我添加了更多日志记录,libvirt.log 给了我以下内容:

2012-12-13 13:24:38.525+0000: 27694: info : libvirt version: 0.9.8
2012-12-13 13:24:38.525+0000: 27694: error : virExecWithHook:328 : Cannot find 'pm-is-supported' in path: No such file or directory
2012-12-13 13:24:38.525+0000: 27694: warning : qemuCapsInit:856 : Failed to get host power management capabilities
2012-12-13 13:24:39.865+0000: 27694: error : virExecWithHook:328 : Cannot find 'pm-is-supported' in path: No such file or directory
2012-12-13 13:24:39.865+0000: 27694: warning : lxcCapsInit:77 : Failed to get host power management capabilities
2012-12-13 13:24:39.866+0000: 27694: error : virExecWithHook:328 : Cannot find 'pm-is-supported' in path: No such file or directory
2012-12-13 13:24:39.866+0000: 27694: warning : umlCapsInit:87 : Failed to get host power management capabilities

我真的不知道接下来该去哪儿。

我会发布你需要的任何信息

答案1

好的,我已经解决了。

这个问题的简单答案是,随着客户机映像文件越来越大,主机的磁盘空间不足。每次客户机尝试写入磁盘时(我的情况总是如此),Libvirt 就会关闭客户机。
因此,添加更多磁盘空间或将映像移动到更大的磁盘/安装上可以在短期内解决我的问题。

为了帮助其他有类似问题的人。有一个错误,qcow2 图像的大小超出了虚拟限制。因此,如果您遇到这种情况,不要仅仅因为您限制了图像大小就认为您的主机有足够的磁盘空间!!

相关内容