Oracle KVM adding host ‘Command returned failure code 1 during SSH session’

When you get ‘Command returned failure code 1 during SSH session’ during adding a KVM host with the Oracle Linux Virtualization Manager, there might be something wrong with the libvertd deamon on the host you want to add.

I had this issue with adding a Oracle Linux 7.7 host.

Please check on the KVM host the following:

$ journalctl -xe
-- Unit libvirtd.service has begun starting up.
Mar 26 05:30:41 hostname libvirtd[11113]: libvirt version: 5.7.0, package: 11.el7 (Unknown, 2020-03-10-13:07:09, jenkins-10-147-72-125-43ff6ce1-34af-4e5f-9321-
Mar 26 05:30:41 hostname libvirtd[11113]: hostname: hostname
Mar 26 05:30:41 hostname libvirtd[11113]: --listen parameter not permitted with systemd activation sockets, see 'man libvirtd' for further guidance
Mar 26 05:30:41 hostname systemd[1]: libvirtd.service: main process exited, code=exited, status=6/NOTCONFIGURED
Mar 26 05:30:41 hostname systemd[1]: Failed to start Virtualization daemon.
-- Subject: Unit libvirtd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit libvirtd.service has failed.
--
-- The result is failed.

If this is the case, you need to switch libvirtd from listening to a UNIX sockets (the systemd default), to ‘traditional mode’ normal ports. That can be done with:

$ systemctl mask libvirtd.socket libvirtd-ro.socket \
              libvirtd-admin.socket libvirtd-tls.socket libvirtd-tcp.socket

$ systemctl restart libvirtd

The last command might fail if you did not install libvirtd yet.

Please also check man libvirtd for instructions.

Happy KVM-ing!

Tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published.