diff --git a/README.en.md b/README.en.md
index 2cc5aea..e6c591f 100644
--- a/README.en.md
+++ b/README.en.md
@@ -299,7 +299,13 @@ Use `Dism++` File menu > Open Image File, select the iso to be installed to get
> For EFI machines without CSM enabled, Windows 7 (Server 2008 R2) cannot be installed.
> [!WARNING]
-> Supports installation of Windows 11 on ARM machines, limited to Hyper-V (Azure) only, not supported on KVM (Oracle Cloud).
+> Only some ARM machines support installing Windows 11:
+>
✔️ Azure (Hyper-V)
+>
✔️ Alibaba Cloud g8y c8y r8y (KVM)
+>
❌ Alibaba Cloud g6r c6r (KVM)
+>
❌ Oracle Cloud (KVM)
+>
❌ Google Cloud (KVM)
+>
❌ AWS (KVM)
> [!WARNING]
> In the Chinese version of Windows 10 LTSC 2021 ISO `zh-cn_windows_10_enterprise_ltsc_2021_x64_dvd_033b7312.iso`, the `wsappx` process may indefinitely consume CPU resources.
diff --git a/README.md b/README.md
index 04eeb7e..5e5cfdb 100644
--- a/README.md
+++ b/README.md
@@ -299,7 +299,13 @@ Windows Server 2022 SERVERDATACENTER
> 未开启 CSM 的 EFI 机器,无法安装 Windows 7 (Server 2008 R2)
> [!WARNING]
-> 支持 ARM 机器安装 Windows 11,仅限于 Hyper-V (Azure) ,不支持 KVM (甲骨文云)
+> 只有部分 ARM 机器支持安装 Windows 11
+>
✔️ Azure (Hyper-V)
+>
✔️ 阿里云 g8y c8y r8y (KVM)
+>
❌ 阿里云 g6r c6r (KVM)
+>
❌ 甲骨文云 (KVM)
+>
❌ 谷歌云 (KVM)
+>
❌ AWS (KVM)
> [!WARNING]
> Windows 10 LTSC 2021 中文版镜像 `zh-cn_windows_10_enterprise_ltsc_2021_x64_dvd_033b7312.iso` 的 `wsappx` 进程会长期占用 CPU
diff --git a/trans.sh b/trans.sh
index 96b43de..de5c37e 100644
--- a/trans.sh
+++ b/trans.sh
@@ -242,13 +242,14 @@ get_approximate_ram_size() {
echo "$ram_size"
}
-setup_nginx_if_enough_ram() {
+setup_web_if_enough_ram() {
total_ram=$(get_approximate_ram_size)
# 512内存才安装
if [ $total_ram -gt 400 ]; then
# lighttpd 虽然运行占用内存少,但安装占用空间大
# setup_lighttpd
setup_nginx
+ # setup_websocketd
fi
}
@@ -383,7 +384,17 @@ cache_dmi_and_virt() {
if [ -z "$_dmi" ] || [ -z "$_virt" ]; then
# virt-what 自动安装 dmidecode
apk add virt-what
+
+ # 区分 kvm 和 virtio,原因:
+ # 1. 阿里云 c8y virt-what 不显示 kvm
+ # 2. 不是所有 kvm 都需要 virtio 驱动,例如 aws nitro
+
+ # virt-what 不会检测 virtio
_virt=$(virt-what)
+ if [ -d /sys/bus/virtio ]; then
+ _virt=$({ echo "$_virt" && echo virtio; } | sort -u)
+ fi
+
_dmi=$(dmidecode | grep -E '(Manufacturer|Asset Tag|Vendor): ' | awk -F': ' '{print $2}')
apk del virt-what
fi
@@ -1313,7 +1324,7 @@ install_nixos() {
# TODO: 准确匹配网卡,添加 udev 或者直接配置 networkd 匹配 mac
create_nixos_network_config /tmp/nixos_network_config.nix
- cat <$pam_d/chpasswd
@@ -3653,20 +3663,21 @@ install_windows() {
vendor="$(get_cloud_vendor)"
- # 虚拟化驱动/通用驱动
- if is_virt_contains kvm; then
- # kvm
+ # virtio
+ if is_virt_contains virtio; then
if [ "$vendor" = aliyun ] && is_nt_ver_ge 6.1 && [ "$arch_wim" = x86_64 ]; then
- add_driver_aliyun_kvm
+ add_driver_aliyun_virtio
# 未测试是否需要专用驱动
elif false && [ "$vendor" = huawei ] && is_nt_ver_ge 6.0 && { [ "$arch_wim" = x86 ] || [ "$arch_wim" = x86_64 ]; }; then
- add_driver_huawei_kvm
+ add_driver_huawei_virtio
else
# 兜底
- add_driver_generic_kvm
+ add_driver_generic_virtio
fi
- elif is_virt_contains xen; then
- # xen
+ fi
+
+ # xen
+ if is_virt_contains xen; then
# generic_xen 兜底,但未签名,暂停使用
if is_nt_ver_ge 6.1 && [ "$arch_wim" = x86_64 ]; then
add_driver_aws_xen
@@ -3792,10 +3803,10 @@ install_windows() {
cp_drivers $drv/xen
}
- # kvm
+ # virtio
# https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/
- add_driver_generic_kvm() {
- info "Add drivers: Generic KVM"
+ add_driver_generic_virtio() {
+ info "Add drivers: Generic virtio"
# 要区分 win10 / win11 驱动,虽然他们的 NT 版本号都是 10.0,但驱动文件有区别
# https://github.com/virtio-win/kvm-guest-drivers-windows/commit/9af43da9e16e2d4bf4ea4663cdc4f29275fff48f
@@ -3893,8 +3904,8 @@ install_windows() {
fi
}
- add_driver_huawei_kvm() {
- info "Add drivers: Huawei KVM"
+ add_driver_huawei_virtio() {
+ info "Add drivers: Huawei virtio"
huawei_sys=$(
case "$(echo "$product_ver" | to_lower)" in
@@ -3919,8 +3930,8 @@ install_windows() {
cp_drivers $drv/huawei -ipath "*/upgrade/windows ${huawei_sys}_${arch_dd}/drivers/*"
}
- add_driver_aliyun_kvm() {
- info "Add drivers: Aliyun KVM"
+ add_driver_aliyun_virtio() {
+ info "Add drivers: Aliyun virtio"
# win7 旧驱动是 sha1 签名
if [ "$nt_ver" = 6.1 ]; then
@@ -4346,7 +4357,7 @@ trans() {
fi
if [ "$distro" != "alpine" ]; then
- setup_nginx_if_enough_ram
+ setup_web_if_enough_ram
# util-linux 包含 lsblk
# util-linux 可自动探测 mount 格式
apk add util-linux