Bug 1557042
Summary: | virt-sysprep 'customize' operation creates /etc/machine-id even if the machine-id operation just removed it | ||
---|---|---|---|
Product: | [Community] Virtualization Tools | Reporter: | Richard W.M. Jones <rjones> |
Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> |
Status: | NEW --- | QA Contact: | |
Severity: | urgent | Docs Contact: | |
Priority: | unspecified | ||
Version: | unspecified | CC: | ptoscano, tadej.j, yszhou4tech |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | 1554546 | Environment: | |
Last Closed: | 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
2018-03-15 20:40:23 UTC
Huh, this bug has really nasty consequences... I was building a custom Ubuntu 18.04 Vagrant libvirt box from an existing box (https://app.vagrantup.com/generic/boxes/ubuntu1804). The Vagrant libvirt provider calls virt-sysprep when the 'vagrant package' command is called (https://github.com/vagrant-libvirt/vagrant-libvirt#package-box-from-vm). So far so good. But when I tried to create a Vagrant environment with multiple machines sharing this custom libvirt Vagrant box, the libvirtd's dnsmasq-dhcp server would assign all the machines the same IP!? It turns out this is because they have the same /etc/macine-id: https://everythingshouldbevirtual.com/virtualization/Ubuntu-18.04-Templates-Duplicate-IPs/. A simple 'truncate -s 0 /etc/machine-id' fixes the problem, however, it is really, really hard to get to this root cause. I hope my story helps increasing the importance of this issue. @rjones, any update on this? Nothing has happened on this, but patches are welcome upstream. It's likely a very simple fix if you want to have a go. |