mirror-env/roles/run-vm/tasks/vm.yml

19 lines
887 B
YAML

---
- name: "{{vm.name}} - Start VM"
async: 10000
poll: 0
shell:
cmd: "qemu-system-x86_64 \
-enable-kvm -boot order=d \
-drive file={{userdata}}/{{vm.name}}/drive1,if=virtio,id=a,media=disk,format=qcow2 \
-drive file={{userdata}}/{{vm.name}}/drive2,if=virtio,id=b,media=disk,format=qcow2 \
-drive file={{userdata}}/{{vm.name}}/drive3,if=virtio,id=c,media=disk,format=qcow2 \
-drive file={{userdata}}/{{vm.name}}/drive4,if=virtio,id=d,media=disk,format=qcow2 \
-drive file={{userdata}}/{{vm.name}}/drive5,if=virtio,id=e,media=disk,format=qcow2 \
-drive file={{userdata}}/{{vm.name}}/drive6,if=virtio,id=f,media=disk,format=qcow2 \
-drive file={{userdata}}/{{vm.name}}/seed.iso,if=virtio,format=raw \
-bios {{ovmf}} \
-m {{vm.ram}} \
-net user,hostfwd=tcp::{{vm.ssh_port}}-:22 \
-net nic"