克隆完KVM虚拟主机后,修改后主机名以及IP地址信息后,手动使用命令“virsh destroy 主机”删除之前的虚拟机,发现有如下报错:
1
2
3
4
5
6
7
|
[root@KVM-02 data]
# virsh list --all
Id Name State
----------------------------------------------------
- centos65 shut off
[root@KVM-02 data]
# virsh destroy centos65
error: Failed to destroy domain centos65
error: Requested operation is not valid: domain is not running
|
重启下libvirtd服务 :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
[root@KVM-02 ~]
# /etc/init.d/libvirtd restart
Stopping libvirtd daemon: [ OK ]
Starting libvirtd daemon: 2015-07-13 03:19:55.517+0000: 4824: info : libvirt ver sion: 0.9.10, package: 21.el6 (Red Hat, Inc. <
http:
//bugzilla
.redhat.com
/bugzill
a>, 2012-05-23-09:15:11, x86-003.build.bos.redhat.com)
2015-07-13 03:19:55.517+0000: 4824: warning : virGetHostname:2108 : getaddrinfo failed
for
'KVM-02'
: Name or service not known
[ OK ]
[root@KVM-02 ~]
# warning : virGetHostname:2108 : getaddrinfo failed for^C
[root@KVM-02 ~]
# echo "10.10.10.202 KVM-02" >>/etc/hosts
[root@KVM-02 ~]
# vim /etc/sysconfig/network-scripts/ifcfg-eth0
[root@KVM-02 ~]
# service libvirtd restart
Stopping libvirtd daemon: [ OK ]
Starting libvirtd daemon: [ OK ]
[root@KVM-02 ~]
# virsh list --all
Id Name State
----------------------------------------------------
|
问题解决
本文转自 冰冻vs西瓜 51CTO博客,原文链接:http://blog.51cto.com/molewan/1673692,如需转载请自行联系原作者