这是我的Vagrantfile
:
Vagrant.configure("2") do |config|
config.vm.box = "ramsey/macos-catalina"
config.vm.define "macosx-test"
config.vm.box_version = "1.0.0"
## NFS needs host-only network
config.vm.network "private_network", ip: "192.168.56.100"
#Ranges: 192.168.56.0/21
config.vm.provider :virtualbox do |virtualbox|
virtualbox.name = "macosx-test"
virtualbox.memory = 4096
virtualbox.cpus = 2
# Show gui, incl. some power
virtualbox.gui = false
# Some needed OSX configs
virtualbox.customize ["modifyvm", :id, "--cpuid-set", "00000001", "000106e5", "00100800", "0098e3fd", "bfebfbff"]
virtualbox.customize ["setextradata", :id, "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct", "MacBookPro11,3"]
virtualbox.customize ["setextradata", :id, "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion", "1.0"]
virtualbox.customize ["setextradata", :id, "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct", "Iloveapple"]
virtualbox.customize ["setextradata", :id, "VBoxInternal/Devices/smc/0/Config/DeviceKey", "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"]
virtualbox.customize ["setextradata", :id, "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC", "1"]
# set resolution on OSX:
# 0,1,2,3,4,5 :: 640x480, 800x600, 1024x768, 1280x1024, 1440x900, 1920x1200
virtualbox.customize ["setextradata", :id, "VBoxInternal2/EfiGopMode", "4"]
end
end
当我跑步时vagrant up
,我得到:
如果我打开virtualbox
并打开display
,我会得到:
我怎样才能让它工作?
版本:
$ dpkg -l | grep -E 'vagrant|virtualbox'
ii ruby-vagrant-cloud 3.0.5-1 all Vagrant Cloud API Library
ii vagrant 2.2.19+dfsg-1ubuntu1 all Tool for building and distributing virtualized development environments
ii vagrant-libvirt 0.7.0-1 all Vagrant plugin that adds an Libvirt provider to Vagrant
ii virtualbox 6.1.38-dfsg-3~ubuntu1.22.04.1 amd64 x86 virtualization solution - base binaries
ii virtualbox-dkms 6.1.38-dfsg-3~ubuntu1.22.04.1 amd64 x86 virtualization solution - kernel module sources for dkms
ii virtualbox-qt 6.1.38-dfsg-3~ubuntu1.22.04.1 amd64 x86 virtualization solution - Qt based user interface
安装扩展包
解决方法是进行经典安装,然后尝试将所有东西连接在一起(Vagrant <-> VirtualBox)。
有帮助的链接:Make a Hackintosh in a Virtualbox。
在 VirtualBox 中创建 VM 后,您需要传递此脚本。
添加了CPU 行
"Intel Core i7-6700K"
,但不在archwiki上。没有这条线就卡住了
LOG:EXITBS:START
inTTY
。然后,您可以启动虚拟机。享受!?
编辑:
在无头模式下运行它的一种方法: