Preparing your Anka Nodes

Prepare high availability macOS machines before connecting to the Anka Build Cloud Controller

Once the Anka Build Virtualization software has been installed onto a macOS machine, you'll typically want to ensure that the machine has high availability. This requires turning off sleep and several other default features that would cause the machine to become unavailable. Below are the preparatory steps we suggest:

  1. Enable automatic login for the current user: Go to Preferences > Users > enable automatic login. Or through your CLI:

    sudo defaults write /Library/Preferences/com.apple.loginwindow "autoLoginUser" '<USERNAME>'
    

    If using the CLI method, you must also XOR-encrypt the login password and add it to /etc/kcpassword. The /etc/kcpassword file must be owned by root:wheel with a mode of 0600. See the GitHub repository veertuinc/kcpassword for help generating the encrypted password string.

  2. Disable require password after screensaver has started: Go to Preferences > Security > under General > uncheck require password after screensave or sleep begins option.

  3. Disable all forms of sleep: Go to Preferences > Energy Saver > disable any sleep options.

    Alternatively, you can do this from the command-line:

    # Never go into computer sleep mode
    systemsetup -setcomputersleep Off
    # Disable standby
    pmset -a standby 0
    # Disable disk sleep
    sudo pmset -a disksleep 0
    # Hibernate mode is a problem on some mac minis; best to just disable
    sudo pmset -a hibernatemode 0
    
  4. Disable spotlight: sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

    If you cannot perform launchctl commands, you can execute these commands from the command-line:

    # Disable indexing volumes
    defaults write ~/.Spotlight-V100/VolumeConfiguration.plist Exclusions -array "/Volumes"
    defaults write ~/.Spotlight-V100/VolumeConfiguration.plist Exclusions -array "/Network"
    killall mds
    # Make sure indexing is DISABLED for the main volume
    mdutil -a -i off /
    mdutil -a -i off
    
  5. Reboot the host


Last modified October 1, 2020 : quick fix (b5fc2c6) by Nathan Pierce