<div dir="ltr"><div><div><div>Thanks Rich for the fast response.<br></div>I think I will add some comment also to the ubuntu bug tracker.<br><br></div>In the mean while I will try to build from source.<br><br></div><div>Thanks,</div><div>Gabriele<br></div><div><div><div><div><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 19, 2018 at 9:00 PM Richard W.M. Jones <<a href="mailto:rjones@redhat.com">rjones@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, Sep 19, 2018 at 10:32:24AM +0200, Gabriele Baldoni wrote:<br>
> Sorry for bothering you in this dev mailing list, I'm using libguestfs to<br>
> customize some vm using as bases the ubuntu cloud images.<br>
> But I noticed that it takes a lot and then fails when trying to install a<br>
> packet.<br>
> Same behaviour on Ubuntu 18.04 and Centos 7.5<br>
> <br>
> Ubuntu:<br>
> virt-customize 1.36.13<br>
> libvirtd (libvirt) 4.0.0<br>
> Centos:<br>
> virt-customize 1.36.10rhel=7,release=6.el7_5.2,libvirt<br>
> libvirtd (libvirt) 3.9.0<br>
> <br>
> This is the command I run:<br>
> virt-customize --hostname ato_test --uninstall cloud-init --install<br>
> ifupdown --run-command 'useradd -p $(openssl passwd -1 pass) fos -s<br>
> /bin/bash && mkdir /home/fos && adduser fos sudo' -a test.img<br>
> If I run using --no-network is faster, but the install obviously does not<br>
> work.<br>
<br>
The network/--no-network thing is a bug in Ubuntu's DHCP support.  I<br>
think it's this one:<br>
<br>
  <a href="https://bugs.launchpad.net/ubuntu/+source/libguestfs/+bug/1632405" rel="noreferrer" target="_blank">https://bugs.launchpad.net/ubuntu/+source/libguestfs/+bug/1632405</a><br>
<br>
>From the log it also looks like packages can't be installed because<br>
name resolution isn't working, which could be related to the above.<br>
<br>
This should however all work fine on CentOS since that's one of our<br>
primary development platforms.<br>
<br>
I'm not sure what else to say.  If you wanted to investigate this<br>
further then you might try compiling from source.  With the package<br>
built from source you could explore changing appliance/init to try to<br>
fix the DHCP problem.<br>
<br>
Make sure to read this first:<br>
<br>
  <a href="http://libguestfs.org/guestfs-building.1.html" rel="noreferrer" target="_blank">http://libguestfs.org/guestfs-building.1.html</a><br>
<br>
Rich.<br>
<br>
-- <br>
Richard Jones, Virtualization Group, Red Hat <a href="http://people.redhat.com/~rjones" rel="noreferrer" target="_blank">http://people.redhat.com/~rjones</a><br>
Read my programming and virtualization blog: <a href="http://rwmj.wordpress.com" rel="noreferrer" target="_blank">http://rwmj.wordpress.com</a><br>
virt-df lists disk usage of guests without needing to install any<br>
software inside the virtual machine.  Supports Linux and Windows.<br>
<a href="http://people.redhat.com/~rjones/virt-df/" rel="noreferrer" target="_blank">http://people.redhat.com/~rjones/virt-df/</a><br>
</blockquote></div></div></div></div></div></div>