unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* virtualization
@ 2022-09-23 19:12 Gottfried
  2022-09-23 19:53 ` virtualization Vagrant Cascadian
  0 siblings, 1 reply; 5+ messages in thread
From: Gottfried @ 2022-09-23 19:12 UTC (permalink / raw)
  To: help-guix


[-- Attachment #1.1.1: Type: text/plain, Size: 3405 bytes --]


Hi Guixers,

I installed a VM software and I added libvirt and virtualization in my 
config.scm file (see below)
---------------------------------------------------------------------
(use-modules (gnu))
(use-package-modules cups scanner)
(use-service-modules cups desktop networking ssh xorg virtualization)

(operating-system
   (locale "de_DE.utf8")
   (timezone "Europe/Berlin")
   (keyboard-layout (keyboard-layout "de"))
   (host-name "Tuxedo")
   (users (cons* (user-account
                   (name "gfp")
                   (comment "Gfp")
                   (group "users")
                   (home-directory "/home/gfp")
                   (supplementary-groups
                     '("wheel" "netdev" "audio" "video")))
                 %base-user-accounts))
   (packages
     (append
       (list (specification->package "nss-certs"))			
       %base-packages))
   (services
     (append
       (list (service mate-desktop-service-type)
             (service enlightenment-desktop-service-type)
			(service cups-service-type
				(cups-configuration
					(web-interface? #t)
					(extensions (list cups-filters hplip))))			
			(service openssh-service-type)
             (service tor-service-type)
             (set-xorg-configuration
               (xorg-configuration
                (keyboard-layout keyboard-layout)))
             (service libvirt-service-type
                      (libvirt-configuration
                       (unix-sock-group "libvirt")
                       (tls-port "16555"))))
	
       (modify-services %desktop-services
	(guix-service-type
                config => (guix-configuration
                  (inherit config)
                  (extra-options (list "--gc-keep-derivations=yes" 
"--gc-keep-outputs=yes"))))
	(sane-service-type _ => sane-backends))))

----------------------------------------------------------
Now, when I open the "Virtual Machine Manager"
and want to set it up
there is this message:

Virtual Machine Manager:

Fehler bei der Verbindung mit der virtuellen Maschine/
Error connecting to virtual machine
----------------------------------------------------------
If I want to add a connection:
QEMU/KVM

Connect -- I press the button:connect

Then it says:

Unable to connect to libvirt qemu:///system.

Stellen Sie sicher, dass der »libvirtd«-Dienst läuft/
Make sure that the libvirtd service is running

Libvirt URI is: qemu:///system

Traceback (most recent call last):
   File 
"/gnu/store/n3gyjzsylh2abc3ykxz9kf5335azgacr-virt-manager-3.2.0/share/virt-manager/virtManager/connection.py", 
line 922, in _do_open
     self._backend.open(cb, data)
   File 
"/gnu/store/n3gyjzsylh2abc3ykxz9kf5335azgacr-virt-manager-3.2.0/share/virt-manager/virtinst/connection.py", 
line 153, in open
     conn = libvirt.openAuth(self._open_uri,
   File 
"/gnu/store/anh3nz3qr46f0ds5i1pswisrc9s3cf3f-python-libvirt-8.6.0/lib/python3.9/site-packages/libvirt.py", 
line 147, in openAuth
     raise libvirtError('virConnectOpenAuth() failed')
libvirt.libvirtError: Socket-Erstellung zu 
'/var/run/libvirt/libvirt-sock' fehlgeschlagen: Keine Berechtigung/no 
authorization
-------------------------------------------------------------------
It seems I don't have the rights to start libvirt.

How can I now solve the problem?
Any thoughts?

Gottfried


[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3191 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: virtualization
  2022-09-23 19:12 virtualization Gottfried
@ 2022-09-23 19:53 ` Vagrant Cascadian
  2022-09-24 21:05   ` virtualization Gottfried
  0 siblings, 1 reply; 5+ messages in thread
From: Vagrant Cascadian @ 2022-09-23 19:53 UTC (permalink / raw)
  To: Gottfried, help-guix

[-- Attachment #1: Type: text/plain, Size: 1033 bytes --]

On 2022-09-23, gottfried@posteo.de wrote:
> I installed a VM software and I added libvirt and virtualization in my 
> config.scm file (see below)
...
>    (users (cons* (user-account
>                    (name "gfp")
>                    (comment "Gfp")
>                    (group "users")
>                    (home-directory "/home/gfp")
>                    (supplementary-groups
>                      '("wheel" "netdev" "audio" "video")))
>                  %base-user-accounts))
...
>              (service libvirt-service-type
>                       (libvirt-configuration
>                        (unix-sock-group "libvirt")
>                        (tls-port "16555"))))
...
> It seems I don't have the rights to start libvirt.
>
> How can I now solve the problem?
> Any thoughts?

I would add your user the to group you configure libvirt-service-type
with, e.g. "libvirt" ... or configure libvirt-service-type with a
different group that your user is already a part of.

live well,
  vagrant

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: virtualization
  2022-09-23 19:53 ` virtualization Vagrant Cascadian
@ 2022-09-24 21:05   ` Gottfried
  2022-09-25  8:06     ` virtualization Gottfried
  0 siblings, 1 reply; 5+ messages in thread
From: Gottfried @ 2022-09-24 21:05 UTC (permalink / raw)
  To: Vagrant Cascadian, help-guix


[-- Attachment #1.1.1: Type: text/plain, Size: 1274 bytes --]

Am 23.09.22 um 21:53 schrieb Vagrant Cascadian:
> On 2022-09-23, gottfried@posteo.de wrote:
>> I installed a VM software and I added libvirt and virtualization in my
>> config.scm file (see below)
> ...
>>     (users (cons* (user-account
>>                     (name "gfp")
>>                     (comment "Gfp")
>>                     (group "users")
>>                     (home-directory "/home/gfp")
>>                     (supplementary-groups
>>                       '("wheel" "netdev" "audio" "video")))
>>                   %base-user-accounts))
> ...
>>               (service libvirt-service-type
>>                        (libvirt-configuration
>>                         (unix-sock-group "libvirt")
>>                         (tls-port "16555"))))
> ...
>> It seems I don't have the rights to start libvirt.
>>
>> How can I now solve the problem?
>> Any thoughts?
> 
> I would add your user the to group you configure libvirt-service-type
> with, e.g. "libvirt" ... or configure libvirt-service-type with a
> different group that your user is already a part of.
> 
> live well,
>    vagrant

Hi,
I added my user to the group "libvirt", but it didn't help. It gives the 
same error message.
May be something else?
  Gottfried

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3191 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: virtualization
  2022-09-24 21:05   ` virtualization Gottfried
@ 2022-09-25  8:06     ` Gottfried
  2022-09-25  8:14       ` virtualization Chris Keschnat via
  0 siblings, 1 reply; 5+ messages in thread
From: Gottfried @ 2022-09-25  8:06 UTC (permalink / raw)
  To: Vagrant Cascadian, help-guix


[-- Attachment #1.1.1: Type: text/plain, Size: 1871 bytes --]

Am 24.09.22 um 23:05 schrieb Gottfried:
> Am 23.09.22 um 21:53 schrieb Vagrant Cascadian:
>> On 2022-09-23, gottfried@posteo.de wrote:
>>> I installed a VM software and I added libvirt and virtualization in my
>>> config.scm file (see below)
>> ...
>>>     (users (cons* (user-account
>>>                     (name "gfp")
>>>                     (comment "Gfp")
>>>                     (group "users")
>>>                     (home-directory "/home/gfp")
>>>                     (supplementary-groups
>>>                       '("wheel" "netdev" "audio" "video")))
>>>                   %base-user-accounts))
>> ...
>>>               (service libvirt-service-type
>>>                        (libvirt-configuration
>>>                         (unix-sock-group "libvirt")
>>>                         (tls-port "16555"))))
>> ...
>>> It seems I don't have the rights to start libvirt.
>>>
>>> How can I now solve the problem?
>>> Any thoughts?
>>
>> I would add your user the to group you configure libvirt-service-type
>> with, e.g. "libvirt" ... or configure libvirt-service-type with a
>> different group that your user is already a part of.
>>
>> live well,
>>    vagrant
> 
> Hi,
> I added my user to the group "libvirt", but it didn't help. It gives the 
> same error message.
> May be something else?
>   Gottfried

Hi,

it is very strange.

I added my user"gfp" to the group "libvirt" and checked it yesterday,
and I was added into that group.

It was through the command:
sudo usermod -a -G libvirt gfp

But today, when I checked it again,
I was not in the group "libvirt"

How can that be?


[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3191 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: virtualization
  2022-09-25  8:06     ` virtualization Gottfried
@ 2022-09-25  8:14       ` Chris Keschnat via
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Keschnat via @ 2022-09-25  8:14 UTC (permalink / raw)
  To: help-guix

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


Gottfried <gottfried@posteo.de> writes:

> [[PGP Signed Part:Undecided]]
> Am 24.09.22 um 23:05 schrieb Gottfried:
>> Am 23.09.22 um 21:53 schrieb Vagrant Cascadian:
>>> On 2022-09-23, gottfried@posteo.de wrote:
>>>> I installed a VM software and I added libvirt and virtualization in my
>>>> config.scm file (see below)
>>> ...
>>>>     (users (cons* (user-account
>>>>                     (name "gfp")
>>>>                     (comment "Gfp")
>>>>                     (group "users")
>>>>                     (home-directory "/home/gfp")
>>>>                     (supplementary-groups
>>>>                       '("wheel" "netdev" "audio" "video")))
>>>>                   %base-user-accounts))
>>> ...
>>>>               (service libvirt-service-type
>>>>                        (libvirt-configuration
>>>>                         (unix-sock-group "libvirt")
>>>>                         (tls-port "16555"))))
>>> ...
>>>> It seems I don't have the rights to start libvirt.
>>>>
>>>> How can I now solve the problem?
>>>> Any thoughts?
>>>
>>> I would add your user the to group you configure libvirt-service-type
>>> with, e.g. "libvirt" ... or configure libvirt-service-type with a
>>> different group that your user is already a part of.
>>>
>>> live well,
>>>    vagrant
>> Hi,
>> I added my user to the group "libvirt", but it didn't help. It gives
>> the same error message.
>> May be something else?
>>   Gottfried
>
> Hi,
>
> it is very strange.
>
> I added my user"gfp" to the group "libvirt" and checked it yesterday,
> and I was added into that group.
>
> It was through the command:
> sudo usermod -a -G libvirt gfp
>
> But today, when I checked it again,
> I was not in the group "libvirt"
>
> How can that be?
>
> [2. OpenPGP public key --- application/pgp-keys; OpenPGP_0x61FAF349C9FB7F94.asc]...
>
> [[End of PGP Signed Part]]

I am not exactly sure what happened, but I think you should set the
groups in the your operating config.

#+begin_src scheme
(supplementary-groups
  '("wheel" "netdev" "audio" "video")))
#+end_src

to

#+begin_src scheme
(supplementary-groups
  '("wheel" "netdev" "audio" "video" "libvirt")))
#+end_src

And then do a ~guix system reconfigure ..~. Your user should then be
part of the libvirt group even after reboots.
-----BEGIN PGP SIGNATURE-----

iQGzBAEBCAAdFiEEJeJoXz7yKQFBopzYUzV95hT0vZUFAmMwDvwACgkQUzV95hT0
vZVHaQv+NkOPN3pkDvNX3ZFml/4DowM1MOGDcjLxRdqvGAlKNU7DhqpsY/DTg1Vq
km0zLGOaPIIxR+ErE1vixTL49f5lmzsOphKAFkjPq38zYMelpJGfPypJrcfGx4rB
f0QdDN/04YiFcSf7ImSIfRu5efzopjhwxSwmlxHbjnCBML0RTzSx1Vu37GaORDjJ
Ly6XikABehQxdPrzddFnHRJyBijZfWzrVAfgC5L9H2Xi252/SxxJGG7UK0/NckQL
WfkidUXdzy6WLRWZpIw9396dTa1sEtLEeSBX4ByIbMgHvsZyqAAOIdHrZnR6TPps
SiRkir/tSKx+mXpZi/jWHiFhftpF8WT29G4EYdP1S9J0gDRet5iSjU5LuBcuJnlJ
qA0tQvoVwP+xYSDhi/IZxnvG9EqwG0iXV4gtgNBJCxlzXRD7F0rqVb0YzllhW2yO
FG4/R+Gf6TRwlE17pb1R9rZPVa4cSsmmKqd+vyxdkwkrshaSfXLKEMWQX5RmnOUs
wY6CPsqJ
=i8PY
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-09-25  8:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-23 19:12 virtualization Gottfried
2022-09-23 19:53 ` virtualization Vagrant Cascadian
2022-09-24 21:05   ` virtualization Gottfried
2022-09-25  8:06     ` virtualization Gottfried
2022-09-25  8:14       ` virtualization Chris Keschnat via

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).