KVM故障之(10) - 各種小意外

    額.....寫到哪是哪,多多諒解!!!!

1.昨天服務器意外斷電,結果其中一個KVM虛機死活起不來,報錯
“Error restoring domain: operation failed: failed to read qemu header”

起初是再新建一個虛機,然後將硬盤掛上,啓動,正常啓動,只是原來的配置沒有了,這說明虛擬的磁盤沒有問題;還是想着完美恢復,就去Google搜索,發現原來是原來主機關機過程中KVM的當前狀態,並在下次啓動時恢復,虛擬狀態文件保存在/var/lib/libvirt/qemu/save,應該是意外斷電導致虛擬狀態文件有缺失,無法正常讀取並且恢復,解決方法就是刪除虛擬狀態文件。

命令:
rm -Rf /var/lib/libvirt/qemu/save/(虛機名稱).save

然後重啓,正常;問題解決。


2.error : usbDeviceListAdd:425 : internal error Device 001:003 is already in use

解決方案:將usb的兩個硬件刪除掉後,重啓即可
 


3.在mac上ssh遠程操作redhat6.2上面的virt-manager管理虛擬機!結果出現以下的錯誤!

fsxchen:~ apple$ ssh -X [email protected] virt-manager
Traceback (most recent call last):
  File "/usr/share/virt-manager/virt-manager.py", line 383, in <module>
    main()
  File "/usr/share/virt-manager/virt-manager.py", line 248, in main
    cli.setup_i18n(gettext_app, gettext_dir)
  File "/usr/share/virt-manager/virtManager/cli.py", line 90, in setup_i18n
    locale.setlocale(locale.LC_ALL, '')
  File "/usr/lib64/python2.6/locale.py", line 513, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

解決辦法:

export LC_ALL=en_US.UTF-8

原因:KVM只能使用英文模式


4.遷移window 2008機器時報錯

[root@server qemu]# virsh start window-bak-2008

error: Failed to start domain window-bak-2008

error: internal error Process exited while reading console log output: Supported machines are:

pc         RHEL 6.4.0 PC (alias of rhel6.4.0)

rhel6.4.0  RHEL 6.4.0 PC (default)

rhel6.3.0  RHEL 6.3.0 PC

rhel6.2.0  RHEL 6.2.0 PC

rhel6.1.0  RHEL 6.1.0 PC

rhel6.0.0  RHEL 6.0.0 PC

rhel5.5.0  RHEL 5.5.0 PC

rhel5.4.4  RHEL 5.4.4 PC

rhel5.4.0  RHEL 5.4.0 PC

解決方案:

修改紅色部分

<domain type='kvm'>

  <name>window-2008_bak</name>

  <uuid>9078089c-d7d0-e213-c3a9-d29a8afcb7e1</uuid>

  <memory unit='KiB'>4194304</memory>

  <currentMemory unit='KiB'>4194304</currentMemory>

  <vcpu placement='static'>2</vcpu>

  <os>

    <type arch='x86_64' machine='rhel6.4.0'>hvm</type>   #對應(default)





發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章