iMega's Blog This notebook

Vagrant Boot2Docker Syslog

A short story about how to make work for yourself Syslog.

Start syslogd on mac

Convert plist to XML

$ sudo plutil -convert xml1 /System/Library/LaunchDaemons/
$ sudo vi /System/Library/LaunchDaemons/

Insert in dict of key “Sockets”


Conver xml to binary

$ sudo plutil -convert binary1 /System/Library/LaunchDaemons/

And reload syslogd

sudo launchctl unload /System/Library/LaunchDaemons/
sudo launchctl load /System/Library/LaunchDaemons/


$ cd /System/Library/LaunchDaemons
$ sudo /usr/libexec/PlistBuddy -c "add :Sockets:NetworkListener dict"
$ sudo /usr/libexec/PlistBuddy -c "add :Sockets:NetworkListener:SockServiceName string syslog"
$ sudo /usr/libexec/PlistBuddy -c "add :Sockets:NetworkListener:SockType string dgram"
$ sudo launchctl unload /System/Library/LaunchDaemons/
$ sudo launchctl load /System/Library/LaunchDaemons/

Thanks Gordon Davisson

Check syslog

$ netstat -an | grep udp | grep 514

Test remote syslogd

$ syslogd -R YOUR_IP
$ logger hello: bla-bla-bla

NFS on host

/Users/irvis/projects/ -alldirs -mapall=501:20 -network -mask




Vagrant.require_version ">= 1.7.0"

PROJECT_ROOT = File.expand_path(Dir.pwd + "/../..")

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| = "parallels/boot2docker"
  config.vm.synced_folder PROJECT_ROOT, PROJECT_ROOT, create: true, type: "nfs", mount_options: ["nolock", "vers=3", "udp"], id: "nfs-sync", nfs_export: false
  config.vm.provision "shell", inline: "sudo cp -rf /var/lib/boot2docker/tls " + PROJECT_ROOT + "/"
  config.vm.provision "shell", inline: "syslogd -R"
end is ip-addr my host in network of parallels.


export DOCKER_HOST_IP=$(cd ~/projects/imega/boot2docker;vagrant ssh-config | sed -n "s/[ ]*HostName[ ]*//gp")
export DOCKER_CERT_PATH="~/projects/tls"
export DOCKER_HOST="tcp://${DOCKER_HOST_IP}:2376"
iMega's Blog
iMega logo