I'm managing an Ubuntu 16.04-based VM (running KVM/libvirt). The server hosts a few VMs that are used internally in our department.
All of the VMs use our company's Samba server for storing various bits and pieces of data.
During a power outage last night, I discovered that the machines boot much faster than the Samba server that they need, and which causes a bunch of services on the VMs to fail.
Rather than patch it on a VM-by-VM basis, I'd like to be able to just instruct my VM host to wait for the CIFS server before starting all of the VMs after reboot (basically, I'd like to make libvirt-guests.service depend on mnt-SHARENAME.mount).
I know that I could add a dependence in /lib/systemd/system/libvirt-guests.service, but I'm not sure if that's the systemd-approved method. Is there any other way to express the dependency?