0

What are the effects for using sudo for libvirt commands such as virt-manager/virsh? Will it affect something later when using the created VMs and regret not using it before?

I'm trying to use them without sudo (don't use root when you can ) and everything is fine. (Except for using bridged network - BTW not sure whether the problem is indeed sudo related at all)

But many articles such as this use sudo in many cases, why?

jw_
  • 343

1 Answers1

0

For all general virsh operations, sudo shouldn't be necessary. (As long as the user is in the libvirt group).

Certain configuration will require sudo - for example, the configuration files in /etc/libvirt is "rw" for root, while permissions are "r" for other users.

Some operations will also require sudo, like PCI passthrough and USB - since hardware access control will require direct control to physical devices, which libvirt does not have.