I’m using VirtualMachines for many development tasks, as I don’t want to mess my host system. To Access the files on my machines I’m using AFP which is pretty easy to use.
First of alle we need to install the required services:
sudo apt-get install netatalk avahi-daemon libnss-mdns
Then we disable legacy protocols for our file server (this step is optional): Uncomment the following lines in “/etc/default/netatalk”
ATALKD_RUN=no PAPD_RUN=no CNID_METAD_RUN=yes AFPD_RUN=yes TIMELORD_RUN=no A2BOOT_RUN=no
Add the Shares to “/etc/netatalk/AppleVolumes.default”
~/ "Home Directory" allow: cnidscheme:cdb options:usedots,upriv
Add mdns to host in “/etc/nsswitch.conf“
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 mdns
Add a new services File “/etc/avahi/services/afpd.service”
<?xml version="1.0" standalone='no'?><!--*-nxml-*--> <!DOCTYPE service-group SYSTEM "avahi-service.dtd"> <service-group> <name replace-wildcards="yes">%h</name> <service> <type>_afpovertcp._tcp</type> <port>548</port> </service> <service> <type>_device-info._tcp</type> <port>0</port> <txt-record>model=MacPro</txt-record> </service> </service-group>
If you want to change the Icon, just chaange the value of model to one of the following:
So then just restart the service or reboot your machine to get everything up.