pve安装黑苹果实录

一、pve 从模板安装 ubuntu

下载Ubuntu 18.04 LXC模板

1. 从右上角创建CT

配置随意

2. ubuntu更新源:
sudo nano /etc/apt/sources.list

注释掉原有源,替换下面的:

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
3.更新系统,制作Monterey恢复镜像:
sudo apt-get update
sudo apt-get upgrade -y
apt install git qemu-utils make -y
git clone https://github.com/thenickdude/OSX-KVM.git
cd /root/OSX-KVM/scripts/monterey
make Monterey-recovery.img

将制作好的镜像拉出Ubuntu到pve:/var/lib/vz/template/iso/

pct pull 100 /root/OSX-KVM/scripts/monterey/Monterey-recovery.img /var/lib/vz/template/iso/Monterey-recovery.img
4. 进入ISO位置,下载OpenCore:

Shell

cd /var/lib/vz/template/iso/
wget https://github.com/thenickdude/KVM-Opencore/releases/download/v15/OpenCore-v15.iso.gz
gzip -d OpenCore-v15.iso.gz

避免循环引导:

echo "options kvm ignore_msrs=Y" >> /etc/modprobe.d/kvm.conf && update-initramfs -k all -u
5.创建VM

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

1、操作系统:
类别:other
ISO镜像:opencore

2、系统
显卡:Vmware兼容
Qemu代理:勾选
BIOS:UEFI
机器:q35

3、硬盘:
总线:VirtIO
缓存:Write Back(不安全)

4、CPU
核心数:2的次幂
类型:penryn
Numa启用

5、网络
模型:virtIO

添加虚拟机安装盘

6. VM配置地址:nano /etc/pve/qemu-server/103.conf

在这里插入图片描述

修改配置:
1、添加恢复镜像

2、添加参数:

intel:

args: -device isa-applesmc,osk="这里得自己找~" -smbios type=2 -device usb-kbd,bus=ehci.0,port=2 -global nec-usb-xhci.msi=off -cpu host,kvm=on,vendor=GenuineIntel,+kvm_pv_unhalt,+kvm_pv_eoi,+hypervisor,+invtsc

AMD:

args: -device isa-applesmc,osk="这里得自己找~" -smbios type=2 -device usb-kbd,bus=ehci.0,port=2 -global nec-usb-xhci.msi=off -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off -cpu Penryn,kvm=on,vendor=GenuineIntel,+kvm_pv_unhalt,+kvm_pv_eoi,+hypervisor,+invtsc,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+avx2,+aes,+fma,+fma4,+bmi1,+bmi2,+xsave,+xsaveopt,check

3、修改光驱属性

启动修改:
diskutil list
sudo dd if=/dev/dsikxxxx of=/dev/diskxxx

  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值