<div dir="ltr">Hi,<div><br></div><div>Thank you very much for your suggestion.</div><div>I've tested it and it works fine.</div><div><br></div><div>Thanks,</div><div>Jo</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 16, 2019 at 8:53 AM Richard W.M. Jones <<a href="mailto:rjones@redhat.com">rjones@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Mon, Apr 15, 2019 at 10:52:40AM +0100, Ioanna Alifieraki wrote:<br>
> Hi,<br>
> <br>
> I am facing the following bug while runnign guestfish on Ubuntu Bionic<br>
> onward,<br>
> where the network cannot be configured :<br>
> <a href="https://bugs.launchpad.net/ubuntu/+source/supermin/+bug/1824236" rel="noreferrer" target="_blank">https://bugs.launchpad.net/ubuntu/+source/supermin/+bug/1824236</a><br>
> <br>
> The actual problem is the combination of (a) supermin and the fact that it<br>
> does chroot<br>
> and (b) a dhclient hook present in Bionic<br>
> (/etc/dhcp/dhclient-eneter-hooks.d/resolved)<br>
<br>
Does it work if you add this early on to appliance/init [1]:<br>
<br>
rm -f /etc/dhcp/dhclient-eneter-hooks.d/resolved<br>
<br>
There is no systemd in the appliance so anything that tries to run<br>
systemd service is going to fail anyway.<br>
<br>
Rich.<br>
<br>
[1] <a href="https://github.com/libguestfs/libguestfs/blob/master/appliance/init" rel="noreferrer" target="_blank">https://github.com/libguestfs/libguestfs/blob/master/appliance/init</a><br>
<br>
> that overwrites the make_resolv_conf function of dhclient_script with one<br>
> that<br>
> in the end restarts the systemd.resolved service.<br>
> Being, however in chroot, the new make_resolv_conf function fails with<br>
> "System has not been booted with systemd as init system (PID 1). Can't<br>
> operate."<br>
> and the network is left unconfigured.<br>
> <br>
> Although there is a workaround for this, I am seeking for a better solution.<br>
> I would like to ask you if this is the expected behaviour of supermin or<br>
> something<br>
> that needs fixing.<br>
> <br>
> Thank you in advance.<br>
> <br>
> Best,<br>
> Jo<br>
<br>
> _______________________________________________<br>
> Libguestfs mailing list<br>
> <a href="mailto:Libguestfs@redhat.com" target="_blank">Libguestfs@redhat.com</a><br>
> <a href="https://www.redhat.com/mailman/listinfo/libguestfs" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/libguestfs</a><br>
<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-builder quickly builds VMs from scratch<br>
<a href="http://libguestfs.org/virt-builder.1.html" rel="noreferrer" target="_blank">http://libguestfs.org/virt-builder.1.html</a><br>
</blockquote></div>