|
| 1 | +# libvirt |
| 2 | + |
| 3 | +[libvirt](https://libvirt.org/) is an API and daemon for managing platform |
| 4 | +virtualization, supporting virtualization technologies such as LXC, KVM, QEMU, |
| 5 | +Bhyve, Xen, VMWare, and Hyper-V. |
| 6 | + |
| 7 | +To use libvirt, install the `libvirt` package and |
| 8 | +[enable](../services/index.md#enabling-services) the `libvirtd`, `virtlockd` and |
| 9 | +`virtlogd` services. The `libvirtd` daemon can be reconfigured at runtime via |
| 10 | +[virt-admin(1)](https://man.voidlinux.org/virt-admin.1). |
| 11 | + |
| 12 | +The `libvirt` package provides the [virsh(1)](https://man.voidlinux.org/virsh.1) |
| 13 | +interface to libvirtd. `virsh` is an interactive shell and batch-scriptable tool |
| 14 | +for performing management tasks, including creating, configuring and running |
| 15 | +virtual machines, and managing networks and storage. Note that `virsh` usually |
| 16 | +needs to be run as root, as described in the `virsh` man page: |
| 17 | + |
| 18 | +> Most virsh commands require root privileges to run due to the communications |
| 19 | +> channels used to talk to the hypervisor. Running as non root will return an |
| 20 | +> error. |
| 21 | +
|
| 22 | +However, if you have the `polkit` and `dbus` packages installed and you enable |
| 23 | +the `dbus` service, `libvirtd` will grant necessary privileges to any user added |
| 24 | +to the `libvirt` group. |
| 25 | + |
| 26 | +An alternative to `virsh` is provided by the `virt-manager` and |
| 27 | +`virt-manager-tools` packages. |
| 28 | + |
| 29 | +For general information on libvirt, refer to [the libvirt |
| 30 | +wiki](https://wiki.libvirt.org/page/Main_Page) and [the wiki's |
| 31 | +FAQ](https://wiki.libvirt.org/page/FAQ). For an introduction to libvirt usage, |
| 32 | +refer to [the "VM lifecycle" page](https://wiki.libvirt.org/page/VM_lifecycle). |
0 commit comments