Difference between revisions of "Libvirt"

From wikieduonline
Jump to navigation Jump to search
 
(17 intermediate revisions by the same user not shown)
Line 1: Line 1:
libvirt<ref>https://libvirt.org/</ref> is a [[virtualization]] API with supports for [[KVM]], [[QEMU]], Xen, Virtuozzo, VMWare ESX, LXC, BHyve and more
+
<code>libvirt</code><ref>https://libvirt.org/</ref> is a [[virtualization]] API with supports for [[KVM]], [[QEMU]], Xen, Virtuozzo, VMWare ESX, LXC, BHyve and more
 
 
 
 
  
  
Line 7: Line 5:
 
At least the following packages compose libvirt in Ubuntu:
 
At least the following packages compose libvirt in Ubuntu:
 
* <code>[[libvirt-bin]]</code> (<code>dpkg -s</code> This is a transitional package. You can safely remove it)
 
* <code>[[libvirt-bin]]</code> (<code>dpkg -s</code> This is a transitional package. You can safely remove it)
 +
 +
[[Ubuntu 20.04 LTS]]
 
* <code>[[libvirt-clients]]</code>: <code>[[virsh]]</code>, <code>[[virt-admin]]</code>, <code>virt-host-validate</code>, <code>[[virt-login-shell]]</code>, <code>[[virt-pki-validate]]</code>, <code>[[virt-xml-validate]]</code>
 
* <code>[[libvirt-clients]]</code>: <code>[[virsh]]</code>, <code>[[virt-admin]]</code>, <code>virt-host-validate</code>, <code>[[virt-login-shell]]</code>, <code>[[virt-pki-validate]]</code>, <code>[[virt-xml-validate]]</code>
 
* <code>[[libvirt-daemon]]</code>:  
 
* <code>[[libvirt-daemon]]</code>:  
::<code>libvirtd</code>:  <code>/etc/libvirt/[[virtlogd.conf]]</code>
+
::<code>libvirtd</code>:  <code>[[/etc/libvirt/virtlogd.conf]]</code>
 
::<code>virt-sanlock-cleanup</code>
 
::<code>virt-sanlock-cleanup</code>
 
::<code>virtlockd</code>
 
::<code>virtlockd</code>
 
::<code>[[virtlogd]]</code> (<code>[[systemctl status libvirtd]]</code>)
 
::<code>[[virtlogd]]</code> (<code>[[systemctl status libvirtd]]</code>)
* <code>libvirt-daemon-system</code>
+
::<code>[[libvirt-guests.sh]]</code>
 +
* <code>[[libvirt-daemon-system]]</code>
 
::<code>[[systemctl status libvirt-guests]]</code>
 
::<code>[[systemctl status libvirt-guests]]</code>
  
Line 24: Line 25:
 
:: <code>/etc/[[libvirt]]/qemu/networks</code>
 
:: <code>/etc/[[libvirt]]/qemu/networks</code>
 
* Config files:
 
* Config files:
:: <code>/etc/libvirt/virtlogd.conf</code>
+
:: <code>/etc/libvirt/[[virtlogd.conf]]</code>
 
::: Includes information about Unix Socket permissions: unix_sock_group, unix_sock_ro_perms, unix_sock_rw_perms, auth_unix_ro, auth_unix_rw
 
::: Includes information about Unix Socket permissions: unix_sock_group, unix_sock_ro_perms, unix_sock_rw_perms, auth_unix_ro, auth_unix_rw
:: <code>/etc/libvirt/libvirtd.conf</code>
+
:: <code>[[/etc/libvirt/libvirtd.conf]]</code>
  
  
 
* Images directory: <code>/var/lib/libvirt/images</code> (See: <code>[[virsh pool-define-as]]</code>)
 
* Images directory: <code>/var/lib/libvirt/images</code> (See: <code>[[virsh pool-define-as]]</code>)
* Logs:  
+
* [[Journalctl -u libvirtd|Logs]]:  
:<code>/var/log/libvirt/[[qemu]]</code>
+
:<code>[[/var/log/libvirt/qemu/]]</code>
:<code>[[journalctl -u libvirtd]]</code>
+
:<code>[[journalctl -r -u libvirtd]]</code>
 
:<code>[[systemctl status libvirtd]]</code>
 
:<code>[[systemctl status libvirtd]]</code>
 
:<code>[[systemctl restart libvirtd]]</code>
 
:<code>[[systemctl restart libvirtd]]</code>
Line 55: Line 56:
 
* [[Review libvirt error messages in journald]]
 
* [[Review libvirt error messages in journald]]
 
* Understand different CPU model an topologies: https://libvirt.org/formatdomain.html#elementsCPU
 
* Understand different CPU model an topologies: https://libvirt.org/formatdomain.html#elementsCPU
 +
* Review [[AppArmor]] configurations related to libvirt: <code>/etc/apparmor.d/libvirt</code>
 +
 +
 +
== Related terms ==
 +
* <code>[[multipass set]] local.driver=libvirt</code>
 +
* [[Ceph]] storage driver backend
 +
* <code>[[prometheus-libvirt-exporter]]</code>
  
 
== See also ==
 
== See also ==
 
* [[MacVTap]]
 
* [[MacVTap]]
 +
* {{libvirtd}}
 
* {{libvirt}}
 
* {{libvirt}}
 +
* {{virt-manager}}
 
* {{virsh}}
 
* {{virsh}}
 
* {{QEMU}}
 
* {{QEMU}}

Latest revision as of 19:24, 4 June 2022

libvirt[1] is a virtualization API with supports for KVM, QEMU, Xen, Virtuozzo, VMWare ESX, LXC, BHyve and more


Ubuntu packages[edit]

At least the following packages compose libvirt in Ubuntu:

  • libvirt-bin (dpkg -s This is a transitional package. You can safely remove it)

Ubuntu 20.04 LTS

libvirtd: /etc/libvirt/virtlogd.conf
virt-sanlock-cleanup
virtlockd
virtlogd (systemctl status libvirtd)
libvirt-guests.sh
systemctl status libvirt-guests

Config files and directories[edit]

  • Config directories:
/etc/libvirt/
/etc/libvirt/storage/ (In Ubuntu there is no default pool. Folder will be automatically created with first pool)
/etc/libvirt/qemu.conf
/etc/libvirt/qemu/XML_FILES_FROM_SERVERS.XML
/etc/libvirt/qemu/networks
  • Config files:
/etc/libvirt/virtlogd.conf
Includes information about Unix Socket permissions: unix_sock_group, unix_sock_ro_perms, unix_sock_rw_perms, auth_unix_ro, auth_unix_rw
/etc/libvirt/libvirtd.conf


/var/log/libvirt/qemu/
journalctl -r -u libvirtd
systemctl status libvirtd
systemctl restart libvirtd
  • Information
libvirtd --help, the daemon will print out the paths of the Unix domain socket(s) that it listens on

Activities[edit]

Basic

Medium


Advanced:


Related terms[edit]

See also[edit]

Advertising: