I want to manage remote libvirt , have run libvirtd in the dest host :
[root@dest_host ~]# ps aux | grep libvirtd
root 3293 0.0 0.1 923796 5856 ? Sl 12:59 0:00 libvirtd
--daemon
then I use the command in source host :
1. [root@source_host ~]# ssh -l root 211.87.***.97 ## login
the dest host
2. [root@dest_host ~]# virsh -c qemu+ssh://127.0.0.1/system list --all
# query vm status
output:
Id Name State
----------------------------------------------------
- ubuntu shut off
- vdisk shut off
also I use the command in source host
1. [root@source_host ~]# ssh -l root 211.87.***.97 ## login the dest
host
2. [root@dest_host ~]# virsh -c qemu+ssh://211.87.***.97/system list
--all ### query vm status
output:
Id Name State
----------------------------------------------------
- ubuntu shut off
- vdisk shut off
however , in the source host , execute the command :
1. [root@source_host ~]# virsh -c qemu+ssh://211.87.228.97/system list
--all ### query vm status
output:
error: failed to connect to the hypervisor
error: no valid connection
error: End of file while reading data: : Input/output error
I have referred to
http://wiki.libvirt.org/page/Failed_to_connect_to_the_hypervisor#Other_er... ,
http://wiki.libvirt.org/page/SSHSetup and
http://wiki.libvirt.org/page/SSHPolicyKitSetup .
All of them don't work.
how should I do ? Help .