diff --git a/bin/generate-systemd-vms.py b/bin/generate-systemd-vms.py index b4d672f..d8b09fc 100755 --- a/bin/generate-systemd-vms.py +++ b/bin/generate-systemd-vms.py @@ -54,7 +54,7 @@ def WriteVMFile(content,hosttype,hostclass): vmfile.write('[Service]\n') vmfile.write('ExecStart=/usr/sbin/qemu-system-x86_64 -name AniNIX/' + host + ' -machine type=pc,accel=kvm') if 'uefi' in content['all']['children'][hosttype]['children'][hostclass]['hosts'][host].keys(): vmfile.write(' -bios /usr/share/edk2-ovmf/x64/OVMF.fd') - vmfile.write(' -cpu qemu64 -smp ' + cores + ' ' + disks + ' -net nic,macaddr=' + mac + ',model=virtio -net bridge,br=' + bridge + ' -vga std -nographic -vnc :' + str(vnc) + ' -m size=' + str(memory) + 'G -device virtio-rng-pci\n') + vmfile.write(' -cpu host -smp ' + cores + ' ' + disks + ' -net nic,macaddr=' + mac + ',model=virtio -net bridge,br=' + bridge + ' -vga std -nographic -vnc :' + str(vnc) + ' -m size=' + str(memory) + 'G -device virtio-rng-pci\n') vmfile.write('ExecReload=/bin/kill -HUP $MAINPID\n') vmfile.write('KillMode=process\n') vmfile.write('Restart=always\n') diff --git a/roles/Node/templates/vm.service.j2 b/roles/Node/templates/vm.service.j2 deleted file mode 100644 index dabb51d..0000000 --- a/roles/Node/templates/vm.service.j2 +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=AniNIX/{{ inventory_hostname }} -After=network.target - -[Service] -ExecStart=/usr/sbin/qemu-system-x86_64 -name AniNIX/{{ inventory_hostname }} -machine type=pc,accel=kvm -bios /usr/share/edk2-ovmf/x64/OVMF.fd -cpu host -smp {{ cores }} {{ disks }} -net nic,macaddr={{ mac }},model=virtio -net bridge,br={{ bridge }} -vga std -nographic -vnc :{{ vnc }} -m size={{ memory }}G -device virtio-rng-pci -ExecReload=/bin/kill -HUP $MAINPID -KillMode=process -Restart=always -User=root -Group=root - -[Install] -WantedBy=multi-user.target