今天在把QEMU-KVM上的一个虚拟机Shutdown后总是无法启动,使用virt-manager管理工具启动时总是导致该工具意外终止,如果是使用virsh命令行管理工具启动时总是报错:
[root@db1 ~]# virsh start oneracvmerror: Failed to start domain oneracvmerror: Timed out during operation: cannot acquire state change lock
查了一下发现这是ibvirt在RHEL5上的Bug,,需要把libvirt的后天进程libvirtd –daemon重启一下:
关闭,直接KILL即可:
[root@db1 run]# kill -9 `ps -ef|grep ‘libvirtd –daemon’|grep -v grep |awk ‘{print $2}’`
这时候你还不能直接起来,否则会出错:
[root@db1 run]# libvirtd –daemonlibvirtd: error: Unable to obtain pidfile. Check /var/log/messages or run without –daemon for more info.
因为,它的启动记录文件还存在,需要先删除:
[root@db1 run]# rm /var/run/libvirtd.pid rm: remove regular file `libvirtd.pid’? y
这时候你就可以起来了:
[root@db1 run]# libvirtd –daemon
此时就可以启动虚拟机了:
[root@db1 ~]# virsh start oneracvmDomain oneracvm started
伟人之所以伟大,是因为他与别人共处逆境时,