首页 > 系统服务 > 详细

在Mac上自动启动VirutalBox中的虚拟机 (Auto start VirtualBox VM in mac OSX)

时间:2020-03-24 12:51:46      阅读:183      评论:0      收藏:0      [点我收藏+]

 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)

原文:https://www.cnblogs.com/xxzpjzy/p/12557887.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!