From 351f2475648d4621104eaf55a1b7bff7721d8a5b Mon Sep 17 00:00:00 2001 From: Recolic <git@me.recolic.net> Date: Mon, 15 Jan 2024 21:27:46 -0800 Subject: [PATCH] .sample --- cron-callback.sh | 3 ++- runtime.settings | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cron-callback.sh b/cron-callback.sh index ed218d9..7e884b4 100755 --- a/cron-callback.sh +++ b/cron-callback.sh @@ -87,7 +87,8 @@ function start_vm_if_not_running () { # start it [[ ! -f "vm/$name/disk.img" ]] && echo2 "In start_vm, disk image vm/$name/disk.img doesn't exist. Did init_vm fail?" && return 1 echo2 "+ Starting VM $name with options_txt '$options_txt' and uuid $uuid..." - nohup qemu-system-x86_64 --uuid "$uuid" -drive file="vm/$name/disk.img",if=virtio -cdrom "vm/$name/initimg.iso" -cpu host --enable-kvm -bios /usr/share/edk2-ovmf/x64/OVMF.fd -net nic,model=rtl8139 "${options[@]}" >> tmp/qemu.log 2>&1 & disown + [[ -f "vm/$name/initimg.iso" ]] && options+=(-cdrom "vm/$name/initimg.iso") + nohup qemu-system-x86_64 --uuid "$uuid" -drive file="vm/$name/disk.img",if=virtio -cpu host --enable-kvm -bios /usr/share/edk2-ovmf/x64/OVMF.fd -net nic,model=rtl8139 "${options[@]}" >> tmp/qemu.log 2>&1 & disown } function do_init () { diff --git a/runtime.settings b/runtime.settings index d1a31fd..f70f44d 100644 --- a/runtime.settings +++ b/runtime.settings @@ -1,4 +1,4 @@ # name;options (name will be trimmed, options will be passed as-is) instance1;-m 2G -smp 2 -vnc :11 -net user,hostfwd=tcp::30471-:22 gitlab-ci;-m 4G -smp 4 -vnc :12 -net user,hostfwd=tcp::30473-:22 -#httptest ;-m 1G -smp 1 -vnc :13 -net user,hostfwd=tcp::30474-:22 +#httptest ;-m 1G -smp 1 -vnc :13 -net user,hostfwd=tcp::30474-:22,hostfwd=tcp::30480-:80 -- GitLab