How To

KVM Libvirt Service Management – systemd, SysVinit, Upstart

Libvirt is an open source virtualization API that provides a consistent interface enabling you to provision, start, stop, migrate, and monitor VMs on KVM hypervisor.

Original content from computingforgeeks.com - post 87701

The management of the libvirtd service can vary slightly depending on the host operating system – whether it uses systemd or the older init systems like SysVinit or Upstart.

Here’s we show you how the management of the libvirtd service can be performed on different init systems. The list should cover the common Libvirtd service management operations you might need to perform on various systems.

1. Systemd

Enable libvirtd service to start on system boot:

sudo systemctl enable libvirtd

Start the libvirtd service:

sudo systemctl start libvirtd

Check the libvirtd service status:

sudo systemctl status libvirtd

Stop the libvirtd service:

sudo systemctl stop libvirtd

Restart the libvirtd service:

sudo systemctl restart libvirtd

Reload the libvirtd service configuration without stopping it:

sudo systemctl reload libvirtd

Disable the libvirtd service so it does not start on boot:

sudo systemctl disable libvirtd

2. SysVinit

Enable the libvirtd service to start on boot:

sudo chkconfig libvirtd on

Start the libvirtd service:

sudo service libvirtd start

Check the status of the libvirtd service:

sudo service libvirtd status

Stop the libvirtd service:

sudo service libvirtd stop

Restart the libvirtd service:

sudo service libvirtd restart

Reload the libvirtd service configuration without stopping it:

sudo service libvirtd reload

Disable the libvirtd service so it does not start on boot:

sudo chkconfig libvirtd off

3. Upstart

Upstart is primarily used in older versions of Ubuntu (from 9.10 to 14.10) and some other distributions.

Start the libvirtd service:

sudo start libvirtd

Check the status of the libvirtd service:

sudo status libvirtd

Stop the libvirtd service:

sudo stop libvirtd

Restart the libvirtd service:

sudo restart libvirtd

Reload the libvirtd service configuration without stopping it:

sudo reload libvirtd

Summary of Commands

ActionSystemdSysVinitUpstart
Enable servicesystemctl enable libvirtdchkconfig libvirtd onN/A
Start servicesystemctl start libvirtdservice libvirtd startstart libvirtd
Check statussystemctl status libvirtdservice libvirtd statusstatus libvirtd
Stop servicesystemctl stop libvirtdservice libvirtd stopstop libvirtd
Restart servicesystemctl restart libvirtdservice libvirtd restartrestart libvirtd
Reload servicesystemctl reload libvirtdservice libvirtd reloadreload libvirtd
Disable servicesystemctl disable libvirtdchkconfig libvirtd offN/A

Keep reading

Install KVM and Virt-Manager on Arch Linux Virtualization Install KVM and Virt-Manager on Arch Linux Virsh Commands Cheatsheet for KVM Virtual Machine Management KVM Virsh Commands Cheatsheet for KVM Virtual Machine Management Install VirtIO Drivers on Windows Server 2025 / Windows 11 KVM Install VirtIO Drivers on Windows Server 2025 / Windows 11 ZFS RAID Levels on Proxmox VE: Stripe, Mirror, RAIDZ1/2/3 Proxmox ZFS RAID Levels on Proxmox VE: Stripe, Mirror, RAIDZ1/2/3 Build a 3-Node Hyperconverged Ceph Cluster on Proxmox VE Proxmox Build a 3-Node Hyperconverged Ceph Cluster on Proxmox VE Install VirtualBox 7.1 on Rocky Linux 10 / AlmaLinux 10 AlmaLinux Install VirtualBox 7.1 on Rocky Linux 10 / AlmaLinux 10

Leave a Comment

Press ESC to close