[Unit]
Description=Initialize infrastructure for VMs
Wants=network.target vsm-init.service
After=network.target vms-init.service

[Service]
Type=simple
WorkingDirectory=/srv/vms
ExecStart=/usr/bin/qemu-system-x86_64 -machine accel=kvm -display none -serial unix:/srv/vms/amass-console.sock,server,nowait -m 4096 -smp 2 -drive file=amass-ubuntu.qcow2,if=virtio -boot order=c -net nic,macaddr=52:54:7d:40:00:01,model=virtio -net bridge,br=br_vms
ExecStop=/usr/bin/bash -c "/usr/bin/echo 'shutdown +0' | /usr/bin/socat -T120 -t120 UNIX-CONNECT:/srv/vms/amass-console.sock 'STDIN,ignoreeof!!STDERR'"
User=vms
Group=vms

[Install]
WantedBy=multi-user.target

