Skip to content
Snippets Groups Projects
Commit dbb36f08 authored by Recolic's avatar Recolic :house_with_garden:
Browse files

.add new default base img, add flock

parent e6f90ea2
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,7 @@ Any of: aria2c / wget / curl
1. Download this repo to anywhere.
2. Modify `init.settings` and `runtime.settings`.
3. Add `*/2 * * * * cd /path/to/my/repo && ./cron-callback.sh` into your crontab.
3. Add `* * * * * cd /path/to/my/repo && flock -n /tmp/.vmm.lockfile ./cron-callback.sh` into your crontab.
## Supported cloudimg
......@@ -33,6 +33,15 @@ Any of: aria2c / wget / curl
|Ubuntu 2204 LTS |`focal-server-cloudimg-amd64.img` |
|Arch Linux Rolling|`Arch-Linux-x86_64-cloudimg.qcow2`|
## Supported back image
**Warning**: This is unofficial back image built by myself. It has preset username and password. **USE IT AT YOUR OWN RISK!!!**.
|||
| --- | --- |
|Windows 10 Pro 22H2|`win10pro-22h2-virtio-uefi.qcow2` |
|Tiny10 Minimal 21H2|`win10-tiny10-virtio-uefi.qcow2` |
## FAQ
### SSH not working for my new VM
......
......@@ -39,6 +39,8 @@ function download_cloud_img_if_not_exist () {
declare -A knowledge
knowledge["focal-server-cloudimg-amd64.img"]=https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img
knowledge["Arch-Linux-x86_64-cloudimg.qcow2"]=https://geo.mirror.pkgbuild.com/images/latest/Arch-Linux-x86_64-cloudimg.qcow2
knowledge["win10pro-22h2-virtio-uefi.qcow2"]=https://recolic.net/hms.php?/systems/win10pro-22h2-virtio-uefi.qcow2
knowledge["win10-tiny10-virtio-uefi.qcow2"]=https://recolic.net/hms.php?/systems/win10-tiny10-virtio-uefi.qcow2
[ ! "${knowledge[$cloudimg]+abc}" ] && echo2 "Unknown cloudimg $cloudimg. cannot download it." && return 1
echo2 "+ Downloading cloudimg $cloudimg..."
......@@ -75,6 +77,7 @@ function create_vm_if_not_exist () {
qemu-img resize "vm/$name/disk.img" "$disk" || return $?
else
# create from baseimg
download_cloud_img_if_not_exist "$cloudimg" || return $?
qemu-img create -f qcow2 -F qcow2 -b "../../base/$cloudimg" "vm/$name/disk.img" || return $?
fi
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment