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
Keywords:
Status: NEW
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
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:
Environment:
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
127.0.0.1	localhost
127.0.1.1	ibm-p8-kvm-03-guest-02.virt.pnr.lab.eng.rdu2.redhat.com	kmaster1.kuber.local
```

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

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

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

How reproducible:

100%

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 10.0.2.15
15.2.0.10.in-addr.arpa domain name pointer ibm-p8-kvm-03-guest-02.virt.pnr.lab.eng.rdu2.redhat.com.

But why is it using this address?  Because 10.0.2.x is the default user network
used by qemu (https://wiki.qemu.org/Documentation/Networking#User_Networking_.28SLIRP.29 )
and 10.0.2.15 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.