Agent DVR VM fährt nicht runter

Hallo.
Ich habe bei mir für meine Netzwerkkameras DVR-Agent in einer VM laufen.
Diese hat per NFS einen Ordner gemountet auf dem Agent-DVR die Videos speichert.
Wenn ich jetzt diese VM neu starten oder herunterfahren möchte geht das nicht weil Agent-DVR ja noch auf dem NFS Mountpoint schreibt.
Habt ihr eine Idee wie ich es hin bekomme das ich diese VM herunterfahren kann?

Gruß Christian

DVR Dienst stoppen und dann Vm runterfahren

Ja wenn ich den DVR Agent stoppe fährt er runter.
Aber kann ich irgendwo was einstellen das er das auch macht wenn ich die VM über das Webinterface herunterfahre.

Immediately before executing the actual system halt/poweroff/reboot/kexec systemd-shutdown will run all executables in /usr/lib/systemd/system-shutdown/ and pass one arguments to them: either „halt“, „poweroff“, „reboot“ or „kexec“, depending on the chosen action. All executables in this directory are executed in parallel, and execution of the action is not continued before all executables finished.