# virt-spawn debian-8 --hostname jessie.local.lan ... # cat /etc/hosts 127.0.0.1 localhost 127.0.1.1 unassigned-hostname.unassigned-domain jessie.local.lan ... # hostname -f unassigned-hostname.unassigned-domain But expected is: # hostname -f jessie.local.lan The thing is that order matters in hosts, the FQDN should always be first on the line: 127.0.1.1 jessie.local.lan jessie alias2 alias3
Patch posted: https://www.redhat.com/archives/libguestfs/2016-September/msg00006.html
This is most likely now fixed, see: https://github.com/libguestfs/libguestfs/commit/cbb70f1deee861e71081349ee20bf8fe0601a615 https://github.com/libguestfs/libguestfs/commit/13e47b12187c2485101bb34030b10f2bbf9f9b9d In libguestfs >= 1.35.4 and >= 1.34.3.
*** Bug 1251499 has been marked as a duplicate of this bug. ***