Red Hat Bugzilla – Bug 890027
virt-sysprep: Setting hostname, domain name and pretty name on Fedora 18 correctly
Last modified: 2013-05-21 09:02:29 EDT
Created attachment 668479 [details]
Description of problem:
virt-sysprep cannot set the hostname on Fedora 18, since
Fedora 18 introduced a stupidly over-complicated way to set
Version-Release number of selected component (if applicable):
I ran the 'hostnamectl' command on a snapshot and diff'd the
two images to find out what it was doing. The diff is attached,
but note that it contains a lot of extraneous changes because
I rebooted the machine in between.
You should use noatime to get a relevant diff.
Looking at actual mtime changes and ignoring changes to /tmp, the affected files are hostname (for the "static" hostname), machine-info (for the "pretty" hostname) and resolv.conf (for the domain name).