Auto-Launch Virtualbox VM at Login

Get list of VM’s on your machine

This command will list all of the VMs registered on your machine:

VBoxManage list vms

Example Output:

"vagrant_default_1470690945724_43235" {bcbb00cd-d427-4eac-829e-110941a96e1e}

"CentOS 7" {3c4e9624-1503-4577-9a6f-fd225febb311}

"Ubuntu_default_1474407668461_1068" {68640da7-8a53-4836-b241-c43547522043}

"Akomi v2.5" {368413ac-5b1f-4416-bc64-2c71b15c9074}

"default_1477497452794_77827" {e68656a9-dd85-4433-9d1e-1071dda99490}

Command to start VM:

VBoxManage startvm <UUID>

For example, to start the Akomi v2.5 VM, you would run:

VBoxManage startvm 368413ac-5b1f-4416-bc64-2c71b15c9074

Update and install LaunchAgent

  • Use the template below to create your com.northshore.akomi-vm.plist file.

  • Update the third string in the arguments array with the UUID for the VM you want to launch at login

  • Install the plist in ~/Library/LaunchAgents/

  • At next login the VM will launch autmatically

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">

<plist version="1.0">