You can use post deployment action using token to pass hostname to software packages directly. This way you can get hostname into BSA software packages.
If your logic is too custom then you can use BAO post callout on VirtualGuest operations and get the details in BAO & send it to BSA as per you logic(you can use custom BSA properties to populate those value & your deployment job will take it further from there)
In 3.1 first option is more appropriate as second options we used in 2.1 times.
Many thanks for your reply! That is very helpful.
With the correct keyword "token" I now also found the correct place in the manuals :-)