This guide assumes you already have a basic Ubuntu 24.04 VM running on Proxmox. If not, you should set that up first. The VM can be fairly minimal; for example, 8GB of storage and 1GB of RAM should suffice.
It also assumes you have a USB Storage device that you want to use for Time Machine backups
Mapping a USB drive via the Proxmox GUI is quick and easy, but the performance may be suboptimal because the driver is emulated. For better performance, it's recommended to use the virtio
driver, which is paravirtualized. Paravirtualization allows the guest VM to interact more directly with the hardware, improving I/O performance compared to emulated devices.
Before proceeding, you need to know the VM ID of your Ubuntu VM in Proxmox. Here's how to find it:
- Log into the Proxmox web interface.
- Navigate to the Virtual Machines section on the left sidebar.
- Select your VM, and you'll see its ID next to the VM name in parentheses (e.g.,
105
).
You will use this VM ID in the upcoming steps.
-
Plug in the USB drive, then open a shell on the Proxmox host and run:
ls -l /dev/disk/by-id/
You'll see output similar to this:
lrwxrwxrwx 1 root root 13 Oct 4 09:02 nvme-nvme.1987-3231343337393038303030313330333734303331-436f7273616972204d5036303020434f5245-00000001 -> ../../nvme0n1 lrwxrwxrwx 1 root root 15 Oct 4 09:02 nvme-nvme.1987-3231343337393038303030313330333734303331-436f7273616972204d5036303020434f5245-00000001-part1 -> ../../nvme0n1p1 lrwxrwxrwx 1 root root 9 Oct 5 18:15 usb-Seagate_Expansion_Desk_NAAAA32D-0:0 -> ../../sdb lrwxrwxrwx 1 root root 10 Oct 5 18:15 usb-Seagate_Expansion_Desk_NAAAA32D-0:0-part1 -> ../../sdb1
Identify your USB drive. In this example, the relevant entry is the last one.
-
Assign the USB drive to your VM using
virtio2
for optimal performance. Sincevirtio
is paravirtualized, it enables more direct communication between the virtual machine and the hardware, reducing overhead and improving performance. If your VM ID is105
, you would run:qm set 105 -virtio2 /dev/disk/by-id/usb-Seagate_Expansion_Desk_NAAAA32D-0:0-part1
Note: If you already have other
virtio
disks attached, you may need to adjust thevirtio
number (virtio3
,virtio4
, etc.) accordingly. -
Verify that the disk has been added to your VM by checking the configuration file:
cat /etc/pve/qemu-server/105.conf
Alternatively, you can check the Proxmox UI under the VM's hardware section.
-
List the block devices on the VM:
lsblk
The output should look something like this:
sda 8:0 0 10G 0 disk ├─sda1 8:1 0 1M 0 part ├─sda2 8:2 0 1.8G 0 part /boot └─sda3 8:3 0 8.2G 0 part └─ubuntu--vg-ubuntu--lv 252:0 0 8.2G 0 lvm / sr0 11:0 1 2.6G 0 rom vda 253:0 0 5.5T 0 disk
Here, the newly added drive is shown as
vda
. -
Mount the drive:
# Create a mount point if it doesn't already exist mkdir -p /media/timemachine mount /dev/vda /media/timemachine
-
Install Netatalk:
apt install netatalk
-
Edit the configuration file:
vim /etc/netatalk/afp.conf
-
Update the configuration by uncommenting and editing the relevant section:
; ; Netatalk 3.x configuration file ; [Global] ; Global server settings ; [Homes] ; basedir regex = /xxxx ; [My AFP Volume] ; path = /path/to/volume [Your Time Machine Volume] path = /media/timemachine # Set this to your mount point time machine = yes
-
Change the ownership of the mount point to your user:
chown <your-username>:<your-group> /media/timemachine
-
Restart Netatalk to apply the changes:
systemctl restart netatalk
That should complete the setup for Time Machine backups. On your Mac you can now connect to the share using Finder and go and set up Time Machine from System Preferences.