[root@localhost ~]# virsh list
error: failed to connect to the hypervisor
error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory
[root@localhost ~]# systemctl status libvirtd
● libvirtd.service - Virtualization daemon
Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:libvirtd(8)
https://libvirt.org
[root@localhost ~]# systemctl start libvirtd
[root@localhost ~]# systemctl status libvirtd
● libvirtd.service - Virtualization daemon
Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2018-12-27 23:39:09 EST; 1s ago
Docs: man:libvirtd(8)
https://libvirt.org
Main PID: 2319 (libvirtd)
Tasks: 19 (limit: 32768)
CGroup: /system.slice/libvirtd.service
├─2319 /usr/sbin/libvirtd
├─2425 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq...
└─2428 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq...
Dec 27 23:39:09 localhost.localdomain systemd[1]: Started Virtualization...
Dec 27 23:39:10 localhost.localdomain dnsmasq[2425]: started, version 2....
Dec 27 23:39:10 localhost.localdomain dnsmasq[2425]: compile time option...
Dec 27 23:39:10 localhost.localdomain dnsmasq-dhcp[2425]: DHCP, IP range...
Dec 27 23:39:10 localhost.localdomain dnsmasq-dhcp[2425]: DHCP, sockets ...
Dec 27 23:39:10 localhost.localdomain dnsmasq[2425]: reading /etc/resolv...
Dec 27 23:39:10 localhost.localdomain dnsmasq[2425]: using nameserver 11...
Dec 27 23:39:10 localhost.localdomain dnsmasq[2425]: read /etc/hosts - 2...
Dec 27 23:39:10 localhost.localdomain dnsmasq[2425]: read /var/lib/libvi...
Dec 27 23:39:10 localhost.localdomain dnsmasq-dhcp[2425]: read /var/lib/...
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost ~]# virsh list --all
Id Name State
----------------------------------------------------
[root@localhost ~]#