使用virsh连接到别的服务器时,使用的是tcp连接
virsh -c qemu+tcp://host/system
如果目标服务器没有开启libvirtd的tcp端口监听时,会出现
error: unable to connect to server at 'host:16509': Connection refused
error: failed to connect to the hypervisor
vi /etc/default/libvirt-bin
修改为libvirt_opts = "-d -l"
增加-l监听tcp
service libvirt-bin restart
service libvirtd restart