在Mac上自动启动VirutalBox中的虚拟机 (Auto start VirtualBox VM in mac OSX)
Posted xxzpjzy
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在Mac上自动启动VirutalBox中的虚拟机 (Auto start VirtualBox VM in mac OSX)相关的知识,希望对你有一定的参考价值。
Auto start VM in mac OSX(10.15)
1. Install VirtualBox(6.1.4)
2. Copy file "/Applications/VirtualBox.app/Contents/MacOS/org.virtualbox.vboxautostart.plist" to "/Library/LaunchDaemons"
3. Edit the file "/Library/LanchDaemons/org.virtualbox.vboxautostart.plist"
before
<key>Disabled</key>
after:
<key>Enabled</key>
4. Create one file /etc/vbox/autostart.cfg with following content
# Default policy is to deny starting a VM, the other option is "allow". default_policy = allow # Create an entry for each user allowed to run autostart myuserid = { allow = true }
5. Open the term and execute
sudo launchctl load /Library/LaunchDaemons/org.virtualbox.vboxautostart.plist
VBoxManage modifyvm "<vmname>" –autostart-enabled on VBoxManage modifyvm "<vmname>" --autostop-type acpishutdown
6. Restart the mac then open virtualbox GUI to verify
Debug:
if any error, use the command in plist file(like below) to debug
/Applications/VirtualBox.app/Contents/MacOS/VBoxAutostartDarwin.sh /etc/vbox
以上是关于在Mac上自动启动VirutalBox中的虚拟机 (Auto start VirtualBox VM in mac OSX)的主要内容,如果未能解决你的问题,请参考以下文章