diff --git a/cron-callback.sh b/cron-callback.sh index 0d6541302c69459ec6cf9ad6024b3ddf2c833ba4..87387ea6cfab482d5a630858d8cc92bc90dbeb0d 100755 --- a/cron-callback.sh +++ b/cron-callback.sh @@ -62,12 +62,12 @@ function create_vm_if_not_exist () { # Check if disk img already exists. [[ -f "vm/$name/disk.img" ]] && return - download_cloud_img_if_not_exist "$cloudimg" || return $? rm -rf "vm/$name" ; mkdir -p "vm/$name" echo2 "+ Creating VM image $name with options $@..." - if [ -z "$disk" ]; then + if [ "$disk" != "" ]; then # create from cloudimg + download_cloud_img_if_not_exist "$cloudimg" || return $? generate_metadata "$name" > "vm/$name/meta-data" || return $? generate_userdata "$username" "$password" "$name" > "vm/$name/user-data" || return $? ( cd "vm/$name" ; genisoimage -output initimg.iso -volid cidata -joliet -rock user-data meta-data ) || return $? diff --git a/init.settings b/init.settings index 5f09d42f6d8033936359f247060779c130babd2d..9fbb53f00ad109bb14e54bfb22452938c085c4b1 100644 --- a/init.settings +++ b/init.settings @@ -1,8 +1,9 @@ ## init VM from cloudimg # name;cloudimg;disk;username;password (space will be trimmed) -instance1;focal-server-cloudimg-amd64.img;60G;r;1 -gitlab-ci;Arch-Linux-x86_64-cloudimg.qcow2;40G;r;1 +ndpa-build ;focal-server-cloudimg-amd64.img;60G;r;1 +gitlab-ci-ms;focal-server-cloudimg-amd64.img;50G;r;1 ## or init VM from pre-deployed backing image (please put it into data/base/) # name;existing_img_fname -devbox;win10pro-22h2-virtio-uefi.qcow2 +ubuntucorp ;ubuntu-intune.qcow2 +devbox ;win10pro-22h2-virtio-uefi.qcow2 diff --git a/runtime.settings b/runtime.settings index 5204307df0ff63506cd0984889f9ac9d106e1680..85b6ee8bb5293dcc9920ff632cfc229fb3f74abd 100644 --- a/runtime.settings +++ b/runtime.settings @@ -1,4 +1,5 @@ # 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,hostfwd=tcp::30474-:8080 -devbox ;-m 6G -smp 6 -vnc :13 -net user,hostfwd=tcp::30475-:3389 -cpu host,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time +ubuntucorp ;-m 2G -smp 2 -vnc :10 -net user,hostfwd=tcp::30471-:22 +ndpa-build ;-m 8G -smp 4 -vnc :11 -net user,hostfwd=tcp::30472-:22 +gitlab-ci-ms;-m 4G -smp 3 -vnc :12 -net user,hostfwd=tcp::30473-:22 +devbox ;-m 8G -smp 8 -vnc :13 -cpu host,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time -nic tap,ifname=vnic0,script=no,downscript=no,mac=10:11:11:11:11:10 -chardev socket,id=chrtpm,path=/tmp/mytpm.sock -tpmdev emulator,id=tpm0,chardev=chrtpm -device tpm-tis,tpmdev=tpm0