windows: 使用阿里云新版驱动

This commit is contained in:
bin456789 2024-09-09 00:19:11 +08:00
parent 75e5a04d41
commit 1b0667a271
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B

View File

@ -3879,6 +3879,9 @@ install_windows() {
add_driver_aliyun_kvm() {
info "Add drivers: Aliyun KVM"
# win7 旧驱动是 sha1 签名
if [ "$nt_ver" = 6.1 ]; then
# 旧驱动
aliyun_sys=$(
case "$nt_ver" in
6.1) echo 7 ;;
@ -3908,6 +3911,27 @@ install_windows() {
# 注意文件夹是 win7 Win8 win10 大小写不一致
cp_drivers $drv/aliyun -ipath "*/win${aliyun_sys}/${arch}/*"
else
# 新驱动
aliyun_sys=$(
case "$nt_ver" in
6.1) echo 2008R2 ;; # sha256
6.2 | 6.3) echo 2012R2 ;; # 实际上是 2012 的驱动
*) echo 2016 ;;
esac
)
region=cn-hangzhou
download https://windows-driver-$region.oss-$region.aliyuncs.com/virtio/AliyunVirtio_WIN$aliyun_sys.zip $drv/AliyunVirtio.zip
unzip -o -d $drv $drv/AliyunVirtio.zip
apk add innoextract
innoextract -d $drv/aliyun/ $drv/AliyunVirtio_*_WIN${aliyun_sys}_$arch_xdd.exe
apk del innoextract
cp_drivers $drv/aliyun -ipath "*/C$/Program Files/AliyunVirtio/*/drivers/*"
fi
}
# gcp