# Copyright Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. # Systemd user service for libvirt session daemon # This runs in the hotstack user's session to provide isolated VM management # # Note: We run libvirtd as a persistent service (not socket-activated) because: # 1. Socket activation with custom configs can be problematic # 2. We need libvirtd to stay running for VM management # 3. The --timeout 0 setting keeps the daemon alive indefinitely [Unit] Description=Libvirt Session Daemon for HotStack Documentation=man:libvirtd(8) [Service] Type=notify # Use custom config from ~/.config/libvirt/libvirtd.conf and ~/.config/libvirt/qemu.conf # --timeout 0 means never timeout - keep daemon running ExecStart=/usr/sbin/libvirtd --config /var/lib/hotstack/.config/libvirt/libvirtd.conf --timeout 0 Restart=always RestartSec=5 [Install] WantedBy=default.target