[Unit] Description=Virt Cloud host virtualization agent After=network-online.target Wants=network-online.target [Service] Type=simple User=root Group=root ExecStart=/usr/local/sbin/virt-agent -config /etc/virt-agent/config.json Restart=on-failure RestartSec=5 UMask=0077 # UMask/StateDirectoryMode only harden newly created files; the binary does # not audit the owner, group, or mode of its readable JSON configuration. NoNewPrivileges=true PrivateTmp=true ProtectHome=true ProtectSystem=strict StateDirectory=virt-agent StateDirectoryMode=0700 # The Agent normally writes only its Bolt journal and traffic state. The # standard libvirt NVRAM directory is also writable so reconciliation can # remove a UUID-owned VARS file left after a domain definition disappeared. # The leading '-' keeps the unit portable when this distro path is absent. # If nvram_directory is configured elsewhere, replace this path in a drop-in. ReadWritePaths=/var/lib/virt-agent -/var/lib/libvirt/qemu/nvram LimitCORE=0 TimeoutStopSec=30 [Install] WantedBy=multi-user.target