天天看點

oVirt node使用virsh指令需要登陸的問題

如果要在oVirt的node使用virsh指令管理檢視虛拟機,會有要求輸入使用者名。

[[email protected] ~]# virsh list --all

Please enter your authentication name: admin

Please enter your password: 

error: failed to connect to the hypervisor

error: no valid connection

error: authentication failed: authentication failed

這個主要是因為oVirt管理節點和計算節點使用tls證書認證,之間的通訊進行加密。通過saslpasswd2指令建立一個使用者就可以,在virsh的指令中,輸入使用者,密碼,就可以像以前一樣使用了。

[[email protected] ~]# saslpasswd2 -a libvirt admin

Password: 

Again (for verification): 

[[email protected] ~]# virsh list --all

Please enter your authentication name: admin

Please enter your password: 

 Id    Name                           State

----------------------------------------------------

 3     test05                         running