Running your VM's from VirtualBox from a command line system (read Ubuntu Server or similar) is quite a challenge. The problem being is that systemd only likes to run in a graphical system (init5)
Here is how to make it run in init 3 --> https://rudd-o.com/linux-and-free-software/how-to-make-pulseaudio-run-once-at-boot-for-all-your-users
Here is another source of info, not sure if it is applicable or not --> https://askubuntu.com/questions/1071532/systemd-disable-pulseaudio-system-mode
Another way to run system-wide --> https://raven4.cz/wp/pulseaudio-in-system-wide-mode/
Arch Wiki's page on pulseaudio --> https://wiki.archlinux.org/index.php/PulseAudio
This is closer to what I want --> http://serendipity.ruwenzori.net/index.php/2015/06/01/sending-an-audio-stream-across-the-network-to-a-remote-raspberry-pi-with-pulseaudio-the-easy-way
This is the source of the above --> http://possiblelossofprecision.net/?p=1956
This is to do with bluetooth --> https://github.com/davidedg/NAS-mod-config/blob/master/bt-sound/bt-sound-Bluez5_PulseAudio5.txt
How does pulseaudio start --> https://unix.stackexchange.com/questions/204522/how-does-pulseaudio-start
In the end of the day, all I did was disable /usr/bin/start-pulseaudio-x11 (by sudo chmod -x) and then added a line to my users .bashrc systemctl --user start pulseaudio No need to add user to any groups other than vboxusers
Mounting a hard drive in systemd requires creating a .mount file in /etc/systemd/system/ folder.
I followed the instructions here --> https://www.thegeekdiary.com/how-to-auto-mount-a-filesystem-using-systemd/
My mount file is below:
[Unit]
Description=Nextcloud Data Mount
[Mount]
What=/dev/disk/by-uuid/82F6A048F6A03DF3
Where=/media/nextcloud
Options=uid=33,gid=33,fmask=0007,dmask=0007
Type=ntfs-3g
[Install]
WantedBy=multi-user.target
I have been having problems with the Pi and networking. It seems Raspbian uses dhcpcd.conf to run the networking. While this is ok for the Pi while it is getting a DHCP address, it is no good for multiple ip addresses on the same interface. I decided to convert it to systemd.
I found this tutorial --> https://raspberrypi.stackexchange.com/questions/78787/howto-migrate-from-networking-to-systemd-networkd-with-dynamic-failover
What I did...Step 1, Step 2, skipped the rest.
I added all the ip addresses to the /etc/systemd/network/04-eth.network
[Match]
Name=e*
[Network]
#to use static ip (with your settings) toggle commenting in the next 8 lines.
Address=192.168.0.13/24
Address=192.168.0.14/24
Address=192.168.0.15/24
DNS=192.168.0.1
[Route]
Gateway=192.168.0.1
Metric=19
#DHCP=yes
#[DHCP]
#RouteMetric=10