[Unit]
Description=qemu for xen dom0 disk backend
Requires=proc-xen.mount xenstored.service
After=proc-xen.mount xenstored.service xenconsoled.service
Before=xendomains.service libvirtd.service libvirt-guests.service
RefuseManualStop=true
ConditionPathExists=/proc/xen/capabilities

[Service]
Type=simple
PIDFile=@XEN_RUN_DIR@/qemu-dom0.pid
ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities
ExecStartPre=/bin/mkdir -p @XEN_RUN_DIR@
ExecStart=@qemu_xen_systemd@ -xen-domid 0 \
	-xen-attach -name dom0 -nographic -M xenpv -daemonize \
	-monitor /dev/null -serial /dev/null -parallel /dev/null \
	-nodefaults -no-user-config \
	-pidfile @XEN_RUN_DIR@/qemu-dom0.pid

[Install]
WantedBy=multi-user.target
