# pve-win-mac **Repository Path**: e314521/pve-win-mac ## Basic Information - **Project Name**: pve-win-mac - **Description**: 路径 (请注意:仓库路径即仓库访问 URL 地址,更改仓库路径将导致原克隆地址不可用) - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-03-12 - **Last Updated**: 2024-07-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # * 下载工具 * [Ventoy](https://github.com/ventoy/Ventoy/releases) * [Ventoy 代理下载](https://mirror.ghproxy.com/https://github.com/ventoy/Ventoy/releases/download/v1.0.97/ventoy-1.0.97-windows.zip) * [虚拟机下载网址](https://pve.proxmox.com/wiki/Downloads) * [虚拟机中科大镜像](https://mirrors.ustc.edu.cn/proxmox/iso/) * [python 华为镜像](https://mirrors.huaweicloud.com/python/) * [git-for-windows 华为镜像](https://mirrors.huaweicloud.com/git-for-windows) * 阿里Debian源 ``` sed -i.bak "s#ftp.debian.org/debian#mirrors.aliyun.com/debian#g" /etc/apt/sources.list sed -i "s#security.debian.org#http://mirrors.ustc.edu.cn/debian-security#g" /etc/apt/sources.list sed -i "s#enterprise.proxmox.com#mirrors.ustc.edu.cn/proxmox#g" /etc/apt/sources.list.d/ceph.list ``` * 中科Debian源 ``` test -e /etc/apt/sources.list.bak && echo 文件存在 || cp -f /etc/apt/sources.list /etc/apt/sources.list.bak rm -f /etc/apt/sources.list.d/pve-enterprise.list echo ' deb http://mirrors.ustc.edu.cn/debian bookworm main contrib non-free-firmware deb http://mirrors.ustc.edu.cn/debian bookworm-updates main contrib non-free-firmware deb http://mirrors.ustc.edu.cn/debian-security bookworm-security main contrib non-free-firmware deb https://mirrors.ustc.edu.cn/proxmox/debian/pve bookworm pve-no-subscription ' >/etc/apt/sources.list test -e /etc/apt/sources.list.d/ceph.list.bak && echo 文件存在 || cp -f /etc/apt/sources.list.d/ceph.list /etc/apt/sources.list.d/ceph.list.bak sed -i "s#enterprise.proxmox.com/debian/ceph-quincy#mirrors.ustc.edu.cn/proxmox/debian/ceph-quincy#g" /etc/apt/sources.list.d/ceph.list apt update ``` * 安装pve脚本 ``` export LC_ALL=en_US.UTF-8 apt update && apt -y install git && git clone https://bgithub.xyz/ivanhao/pvetools.git cd pvetools ./pvetools.sh ``` ``` /bin/bash -c "$(curl -fsSL https://gitee.com/e314521/pve-win-mac/raw/master/start.sh)" ``` * 下载MAC文件 * 下载最新版本 ``` python ./macrecovery.py -b Mac-7BA5B2D9E42DDD94 -m 00000000000000000 -os latest download ``` * 下载其他版本 ``` # Lion (10.7): python3 macrecovery.py -b Mac-2E6FAB96566FE58C -m 00000000000F25Y00 download python3 macrecovery.py -b Mac-C3EC7CD22292981F -m 00000000000F0HM00 download # Mountain Lion (10.8): python3 macrecovery.py -b Mac-7DF2A3B5E5D671ED -m 00000000000F65100 download # Mavericks (10.9): python3 macrecovery.py -b Mac-F60DEB81FF30ACF6 -m 00000000000FNN100 download # Yosemite (10.10): python3 macrecovery.py -b Mac-E43C1C25D4880AD6 -m 00000000000GDVW00 download # El Capitan (10.11): python3 macrecovery.py -b Mac-FFE5EF870D7BA81A -m 00000000000GQRX00 download # Sierra (10.12): python3 macrecovery.py -b Mac-77F17D7DA9285301 -m 00000000000J0DX00 download # High Sierra (10.13) python3 macrecovery.py -b Mac-7BA5B2D9E42DDD94 -m 00000000000J80300 download python3 macrecovery.py -b Mac-BE088AF8C5EB4FA2 -m 00000000000J80300 download # Mojave (10.14) python3 macrecovery.py -b Mac-7BA5B2DFE22DDD8C -m 00000000000KXPG00 download # Catalina (10.15) python3 macrecovery.py -b Mac-00BE6ED71E35EB86 -m 00000000000000000 download # Big Sur (11) python3 macrecovery.py -b Mac-42FD25EABCABB274 -m 00000000000000000 download # Monterey (12) python3 macrecovery.py -b Mac-FFE5EF870D7BA81A -m 00000000000000000 download # Ventura (13) python3 macrecovery.py -b Mac-4B682C642B45593E -m 00000000000000000 download # Latest version # ie. Sonoma (14) python3 macrecovery.py -b Mac-937A206F2EE63C01 -m 00000000000000000 download ``` * 格式转换 ``` bin\qemu-img\qemu-img convert -O qcow2 BaseSystem.dmg BaseSystem.img bin\qemu-img\qemu-img.exe convert -O vhdx OpenCore-v20.iso OpenCore-v20.vhdx ``` * 设置代理 ``` export https_proxy="http://192.168.1.21:10811" ``` * 安装MAC ``` OSX-PROXMOX/setup ``` * 编辑虚拟机MAC ``` nano /etc/pve/qemu-server/101.conf ``` * github加速 ``` kkgithub.com ``` * 加载删除硬盘 ``` qm set 100 --scsi0 "local-lvm:vm-102-disk-1,cache=unsafe" qm set 100 --delete scsi0 mkfs.vfat -F 32 /dev/sdb1 -I mkdir ~/disk mount /dev/sdb1 ~/disk cd ~/disk ``` * 虚拟机执行 ``` fdisk /dev/sdb n 新建分区 mkfs.vfat -F 32 /dev/sdb1 -I mkdir ~/disk mount /dev/sdb1 ~/disk cd ~/disk ``` * 测试脚本 ``` umount /dev/sdb1 mount /dev/sdb1 ~/disk bash disk/pve-win-mac/start.sh ``` * 安装中文输入法 ``` sudo apt install ibus ibus-libpinyin ``` * 安装cloudflare-warp ``` curl -fsSL https://pkg.cloudflareclient.com/pubkey.gpg | sudo gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg sudo apt-get update && sudo apt-get install cloudflare-warp warp-cli connect warp-cli disconnect ``` * 使用WIFI * 安装工具 ``` apt-get install wireless-tools wpasupplicant ``` * 扫描网络 ``` iwlist scan ``` * 获取wpa-psk ``` wpa_passphrase "WLAN" "123123" ``` * 在线获取wpa-psk ``` https://www.wireshark.org/tools/wpa-psk.html ``` * 配置网络 ``` nano /etc/network/interfaces ``` * vmbr0配置 ``` auto vmbr0 iface vmbr0 inet static address 192.168.31.1/24 bridge-ports none bridge-stp off bridge-fd 0 mtu 1500 post-up echo 1 > /proc/sys/net/ipv4/ip_forward post-up iptables -t nat -A POSTROUTING -s '192.168.31.0/24' -o wlp0s20f3 -j MASQUERADE post-down iptables -t nat -D POSTROUTING -s '192.168.31.0/24' -o wlp0s20f3 -j MASQUERADE ``` * wlp0s20f3配置 ``` auto wlp0s20f3 iface wlp0s20f3 inet static address 192.168.30.6/24 gateway 192.168.30.1 wpa-ssid "AUDI-WLAN" wpa-psk "f4f7971f54ea4a1119143c31f3ab25d56e9fc8e3cf280bf191c05a04d4f5c26d" ```