大网数据广告活动
服务器运维问答

Virsh can't connect to ovirt hypervisor

· 52CE 我爱测

I installed Ovirt and want to add network interface for NAT. So I need to connect to hypervisor by virsh and add nic. Ovirt installed on my local server, host (ovirt-engine.kvmserver.net) is on the same server. I tried to connect…

问题原文

原帖链接 · Abdus · CC BY-SA 3.0

I installed Ovirt and want to add network interface for NAT. So I need to connect to hypervisor by virsh and add nic.

Ovirt installed on my local server, host (ovirt-engine.kvmserver.net) is on the same server.

I tried to connect in readable mode is ok

 # virsh -r
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh > list
 Id    Name                           State
----------------------------------------------------
 10    CentOS_test                    running
 12    CentOS_test2                   running
 16    Windows1                       running
 17    Windows2                       running

In normal mode

# virsh
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh # list
Please enter your authentication name:
Please enter your password:
error: Failed to reconnect to the hypervisor
error: no valid connection
error: authentication failed: Failed to step SASL negotiation: -1 (SASL(-1): generic failure: All-whitespace username.)

As I understand I need to connect with certificate. I tried on https

# virsh connect https://ovirt-engine.kvmserver.net
2013-05-12 13:21:30.004+0000: 25581: info : libvirt version: 0.10.2, package: 18.el6_4.4 (CentOS BuildSystem <http://bugs.centos.org>, 2013-04-18-16:13:45, c6b7.bsys.dev.centos.org)
2013-05-12 13:21:30.004+0000: 25581: warning : virNetTLSContextCheckCertificate:1102 : Certificate check failed Certificate [session] owner does not match the hostname ovirt-engine.kvmserver.net
error: Failed to connect to the hypervisor
error: authentication failed: Failed to verify peer's certificate

I tried on port 80

# virsh connect http://ovirt-engine.kvmserver.net:80
error: Failed to connect to the hypervisor
error: authentication failed: TLS handshake failed A TLS packet with unexpected length was received.

How I should to connect to hypervisor?

已采纳解答

原帖链接 · Abdus · CC BY-SA 3.0

I found the solution!

The problem was on "Remote management using SASL authentication". I didn't create special user for SASL. Create user command is

# saslpasswd2 -a libvirt USERNAME
Password:
Again (for verification):

That's all.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2013-05-12)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。