Fix hostname setting also in Debian, part N

Port #2384 / #2383 for Debian guests.

This should really be DRY'ed up...