diff --git a/README.md b/README.md index 8140646..e66b29b 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ - 网络配置文件备份修改顺序,避免重复备份 - 增加已修改过的文件的备份 +- KVM虚拟机增加centos8-stream镜像源 [更新日志](CHANGELOG.md) diff --git a/scripts/buildvm.sh b/scripts/buildvm.sh index 09d0f0d..7a5bd74 100644 --- a/scripts/buildvm.sh +++ b/scripts/buildvm.sh @@ -1,7 +1,7 @@ #!/bin/bash # from # https://github.com/spiritLHLS/pve -# 2023.08.02 +# 2023.08.03 # ./buildvm.sh VMID 用户名 密码 CPU核数 内存 硬盘 SSH端口 80端口 443端口 外网端口起 外网端口止 系统 存储盘 @@ -108,6 +108,7 @@ if [ "$system_arch" = "x86" ]; then "alpinelinux_edge" "alpinelinux_stable" "rockylinux8" + "centos8-stream" ) for sys in ${systems[@]}; do if [[ "$system" == "$sys" ]]; then @@ -137,13 +138,18 @@ if [ "$system_arch" = "x86" ]; then break fi done - if [[ -n "$ver" ]]; then - url="${cdn_success_url}https://github.com/oneclickvirt/kvm_images/releases/download/${ver}/${system}.qcow2" + if [[ "centos8-stream" == "$system" ]]; then + url="https://git.ilolicon.dev/Ella-Alinda/images/raw/branch/main/centos8-stream.qcow2" curl -L -o "$file_path" "$url" else - _red "Unable to install corresponding system, please check https://github.com/oneclickvirt/kvm_images/ for supported system images " - _red "无法安装对应系统,请查看 https://github.com/oneclickvirt/kvm_images/ 支持的系统镜像 " - exit 1 + if [[ -n "$ver" ]]; then + url="${cdn_success_url}https://github.com/oneclickvirt/kvm_images/releases/download/${ver}/${system}.qcow2" + curl -L -o "$file_path" "$url" + else + _red "Unable to install corresponding system, please check https://github.com/oneclickvirt/kvm_images/ for supported system images " + _red "无法安装对应系统,请查看 https://github.com/oneclickvirt/kvm_images/ 支持的系统镜像 " + exit 1 + fi fi fi elif [ "$system_arch" = "arch" ]; then diff --git a/scripts/buildvm_extraip.sh b/scripts/buildvm_extraip.sh index 4add6b5..9a48fea 100644 --- a/scripts/buildvm_extraip.sh +++ b/scripts/buildvm_extraip.sh @@ -1,7 +1,7 @@ #!/bin/bash # from # https://github.com/spiritLHLS/pve -# 2023.08.02 +# 2023.08.03 # 自动选择要绑定的IPV4地址 @@ -105,6 +105,7 @@ if [ "$system_arch" = "x86" ]; then "alpinelinux_edge" "alpinelinux_stable" "rockylinux8" + "centos8-stream" ) for sys in ${systems[@]}; do if [[ "$system" == "$sys" ]]; then @@ -134,13 +135,18 @@ if [ "$system_arch" = "x86" ]; then break fi done - if [[ -n "$ver" ]]; then - url="${cdn_success_url}https://github.com/oneclickvirt/kvm_images/releases/download/${ver}/${system}.qcow2" + if [[ "centos8-stream" == "$system" ]]; then + url="https://git.ilolicon.dev/Ella-Alinda/images/raw/branch/main/centos8-stream.qcow2" curl -L -o "$file_path" "$url" else - _red "Unable to install corresponding system, please check https://github.com/oneclickvirt/kvm_images/ for supported system images " - _red "无法安装对应系统,请查看 https://github.com/oneclickvirt/kvm_images/ 支持的系统镜像 " - exit 1 + if [[ -n "$ver" ]]; then + url="${cdn_success_url}https://github.com/oneclickvirt/kvm_images/releases/download/${ver}/${system}.qcow2" + curl -L -o "$file_path" "$url" + else + _red "Unable to install corresponding system, please check https://github.com/oneclickvirt/kvm_images/ for supported system images " + _red "无法安装对应系统,请查看 https://github.com/oneclickvirt/kvm_images/ 支持的系统镜像 " + exit 1 + fi fi fi elif [ "$system_arch" = "arch" ]; then diff --git a/scripts/buildvm_manual_ip.sh b/scripts/buildvm_manual_ip.sh index 4b3a60e..8b504dc 100644 --- a/scripts/buildvm_manual_ip.sh +++ b/scripts/buildvm_manual_ip.sh @@ -1,7 +1,7 @@ #!/bin/bash # from # https://github.com/spiritLHLS/pve -# 2023.08.02 +# 2023.08.03 # 手动指定要绑定的IPV4地址 @@ -133,6 +133,7 @@ if [ "$system_arch" = "x86" ]; then "alpinelinux_edge" "alpinelinux_stable" "rockylinux8" + "centos8-stream" ) for sys in ${systems[@]}; do if [[ "$system" == "$sys" ]]; then @@ -162,13 +163,18 @@ if [ "$system_arch" = "x86" ]; then break fi done - if [[ -n "$ver" ]]; then - url="${cdn_success_url}https://github.com/oneclickvirt/kvm_images/releases/download/${ver}/${system}.qcow2" + if [[ "centos8-stream" == "$system" ]]; then + url="https://git.ilolicon.dev/Ella-Alinda/images/raw/branch/main/centos8-stream.qcow2" curl -L -o "$file_path" "$url" else - _red "Unable to install corresponding system, please check https://github.com/oneclickvirt/kvm_images/ for supported system images " - _red "无法安装对应系统,请查看 https://github.com/oneclickvirt/kvm_images/ 支持的系统镜像 " - exit 1 + if [[ -n "$ver" ]]; then + url="${cdn_success_url}https://github.com/oneclickvirt/kvm_images/releases/download/${ver}/${system}.qcow2" + curl -L -o "$file_path" "$url" + else + _red "Unable to install corresponding system, please check https://github.com/oneclickvirt/kvm_images/ for supported system images " + _red "无法安装对应系统,请查看 https://github.com/oneclickvirt/kvm_images/ 支持的系统镜像 " + exit 1 + fi fi fi elif [ "$system_arch" = "arch" ]; then