Bug 953907

Summary: virt-sysprep does not correctly set the hostname on Debian/Ubuntu
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: acathrow, mbooth, ptoscano
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-13 15:10:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Richard W.M. Jones 2013-04-19 13:43:59 UTC
Description of problem:

See: http://wiki.debian.org/HowTo/ChangeHostname

You have to also edit /etc/hosts.

Currently (just editing /etc/hostname) results in strange
warning messages when using sudo:

sudo: unable to resolve host [new hostname]

Version-Release number of selected component (if applicable):

libguestfs 1.21.31

How reproducible:

100%

Steps to Reproduce:
1. Take a Debian/Ubuntu guest and use virt-sysprep --hostname ...

Comment 1 Pino Toscano 2014-02-13 15:10:41 UTC
This has been fixed with
https://github.com/libguestfs/libguestfs/commit/ab2df2e6598d421067d600f89a3d225162424d9b
which is in libguestfs >= 1.25.35.