this instead.
mkdir -p /etc/vbox
chgrp vboxusers /etc/vbox
chmod 1775 /etc/vbox
cat <<"EOF" >>/etc/default/virtualbox
VBOXAUTOSTART_DB=/etc/vbox
VBOXAUTOSTART_CONFIG=/etc/vbox/autostart.cfg
EOF
cat <<"EOF" >/etc/vbox/autostart.cfg
default_policy = deny
attie = {
allow = true
}
EOF
systemctl enable vboxautostart-service
VBoxManage setproperty autostartdbpath /etc/vbox
VBoxManage modifyvm ${VM_UUID} --autostart-enabled on
VBoxManage modifyvm ${VM_UUID} --autostop-type acpishutdown