LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-05-2017, 01:13 PM   #1
Aquadeath
LQ Newbie
 
Registered: Aug 2015
Location: Indiana, USA
Distribution: Slackware Linux 14.1
Posts: 6

Rep: Reputation: Disabled
Libvirtd daemon unable to initialize network sockets


Fellow slackers,

I'm hoping someone can help me shine light to an issue with libvirt.
After spending several hours of trying to resolve this issue online, I keep running in a circle with this problem: I'm trying to setup a virtual machine to run a sandbox distro. Unfortunately, I'm not sure where I went wrong with the setup.

When I try to run virt-manager it states it is unable to connect libvirt. when I try to run libvirtd -d I get the following error message:
Quote:
root@:~# libvirtd -d
libvirtd: error: Unable to initialize network sockets. Check /var/log/messages or run without --daemon for more info.
So when I look into the log for the messages, I get the following:
Quote:
2017-10-05 16:05:08.892+0000: 1885: info : libvirt version: 3.4.0
2017-10-05 16:05:08.892+0000: 1885: info : hostname: Kugelschreiber.kugelschreiber.de
2017-10-05 16:05:08.892+0000: 1885: error : virGetGroupID:1110 : invalid argument: Failed to parse group 'users, root'
When I go into /etc/libvirt/libvirtd.conf, the socket access controls is uncommented for users and root.

Just for giggles, when I go into virsch to see if it reads QEMU, I get the same error
Quote:

root@Kugelschreiber:/etc# virsh -c qemu:///system
error: failed to connect to the hypervisor
error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory
I'm presuming either two scenarios, but unsure where to begin:
1.) I screwed up the build order (I can't remember how I built it to be honest, I want to say I did libvirt, then QEMU), and so somewhere there is a miscommunication between the two but not sure how to begin rectifying the problem

2.) I messed up the /etc/config file, hence the users parsing issue, but that wouldn't explain the libvirt-sock issue.

I appreciate any help with this issue.
 
Old 10-05-2017, 01:17 PM   #2
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,900

Rep: Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050
Did you try starting libvirt using the init script?

This link says how to add it to your boot process:

https://slackbuilds.org/repository/1...aries/libvirt/

EDIT:

Code:
chmod +x /etc/rc.d/rc.libvirt
/etc/rc.d/rc.libvirt start

Last edited by mralk3; 10-05-2017 at 01:19 PM.
 
Old 10-05-2017, 01:31 PM   #3
Aquadeath
LQ Newbie
 
Registered: Aug 2015
Location: Indiana, USA
Distribution: Slackware Linux 14.1
Posts: 6

Original Poster
Rep: Reputation: Disabled
When running chmod +x, it gives me similar error on failure to initialize network sockets.
[note: I did this in one of my users and not in root, however I'm running as su]

Quote:
bash-4.3# chmod +x /etc/rc.d/rc.libvirt
bash-4.3# /etc/rc.d/rc.libvirt start
Starting virtlockd: /usr/sbin/virtlockd -d
Starting virtlogd: /usr/sbin/virtlogd -d
Starting libvirtd: /usr/sbin/libvirtd -d
libkmod: conf_files_filter_out: Directories inside directories are not supported: /etc/modprobe.d/sound.conf
/usr/sbin/libvirtd: error: Unable to initialize network sockets. Check /var/log/messages or run without --daemon for more info.
 
Old 10-05-2017, 01:33 PM   #4
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,900

Rep: Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050
Code:
Check /var/log/messages
What error shows up in the log file?
 
Old 10-05-2017, 01:35 PM   #5
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174
what does
Code:
grep users /etc/libvirt/libvirtd.conf
says?
 
Old 10-05-2017, 01:36 PM   #6
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,900

Rep: Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050
This might be useful: https://wiki.libvirt.org/page/The_da...not_be_started
 
Old 10-05-2017, 01:38 PM   #7
Aquadeath
LQ Newbie
 
Registered: Aug 2015
Location: Indiana, USA
Distribution: Slackware Linux 14.1
Posts: 6

Original Poster
Rep: Reputation: Disabled
For grep users, the following populates
Quote:
bash-4.3# grep users /etc/libvirt/libvirtd.conf
# allow a 'trusted' set of users access to management capabilities
unix_sock_group = "users, root"
For the log messages I posted it in the first post:
Quote:
2017-10-05 16:05:08.892+0000: 1885: info : libvirt version: 3.4.0
2017-10-05 16:05:08.892+0000: 1885: info : hostname: Kugelschreiber.kugelschreiber.de
2017-10-05 16:05:08.892+0000: 1885: error : virGetGroupID:1110 : invalid argument: Failed to parse group 'users, root'
 
Old 10-05-2017, 01:39 PM   #8
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174
Quote:
Originally Posted by Aquadeath View Post
For grep users, the following populates
Code:
bash-4.3# grep users /etc/libvirt/libvirtd.conf
# allow a 'trusted' set of users access to management capabilities
unix_sock_group = "users, root"
that's wrong, it should be just
Code:
unix_sock_group = "users"
you can also reinstall the package and use the defaults overwriting your /etc/libvirt/libvirtd.conf with /etc/libvirt/libvirtd.conf.new.

have a look at what the READMEs of libvirt and qemu say about the group: "users" is used just for the sake of simplicity, because your user should be already in that group.
https://slackbuilds.org/repository/1...aries/libvirt/
https://slackbuilds.org/repository/14.2/system/qemu/

Last edited by ponce; 10-05-2017 at 01:51 PM.
 
Old 10-05-2017, 03:31 PM   #9
Aquadeath
LQ Newbie
 
Registered: Aug 2015
Location: Indiana, USA
Distribution: Slackware Linux 14.1
Posts: 6

Original Poster
Rep: Reputation: Disabled
Huh, after reinstalling and rebuilding libvirtd is working - had to remove all the older config files (which took a bit to find out why).
Only downside is gotta recompile virt-manager but least of my worries.

Thanks ponce and mralk3!

Last edited by Aquadeath; 10-05-2017 at 04:58 PM.
 
Old 10-05-2017, 08:44 PM   #10
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,900

Rep: Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050
Quote:
Thanks ponce and mralk3!
You are welcome! I'm not sure I did much though.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Centos Unable to initialize SSH krazybob Linux - Networking 46 05-21-2017 01:33 AM
RHEL4 U-4: unable to initialize network while booting wasim_raza Linux - Laptop and Netbook 2 08-31-2007 01:49 AM
PHP: Unable to initialize module leif_84 Programming 2 07-24-2007 01:46 PM
su: unable to initialize groups bertolez Red Hat 3 04-12-2007 02:53 AM
unable to initialize frontend: Kde kkrzyho Debian 6 04-14-2004 12:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration