Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1684718 - virt-builder - Ubuntu 18.04: hardcoded alias in /etc/hosts
Summary: virt-builder - Ubuntu 18.04: hardcoded alias in /etc/hosts
Status: NEW
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Linux
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2019-03-01 22:41 UTC by Panagiotis Mavrogiorgos
Modified: 2019-04-09 09:49 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed:

Attachments (Terms of Use)

Description Panagiotis Mavrogiorgos 2019-03-01 22:41:25 UTC
Description of problem:

When creating an ubuntu 18.04 image using virt-builder, /etc/hosts contains a hardcoded alias that has nothing to do with the VM:

root@kmaster1:~# cat /etc/hosts	localhost	kmaster1.kuber.local

Just for comparison, if we create a Debian 9 VM:

root@debian9:~# cat /etc/hosts	localhost	debian9.test.local	debian9.test.local

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

How reproducible:


Steps to Reproduce:

Just create an image based on ubuntu 18.04

Comment 1 Richard W.M. Jones 2019-04-09 09:49:33 UTC
Fun fact, on the Red Hat internal network:

$ host domain name pointer

But why is it using this address?  Because 10.0.2.x is the default user network
used by qemu ( )
and is the default guest address.

Anyway yes this is a bug, but if it disturbs you it's simple to work around with
a trivial --edit option.

Note You need to log in before you can comment on or make changes to this bug.