Building ubuntu focal live image behind a proxy

17 views
Skip to first unread message

SveWo

unread,
Jan 13, 2023, 4:53:57 AMJan 13
to kiwi
Hello,
I'm currently trying to build the cloud-init enabled VM Images for our local Hyper-V based Virtualisation environment with kiwi-ng.
For SLES based Images I have done it succesfully based on the jeOS descriptions. Now I wanted to give Ubuntu images a try.

I'm working on a SLES 15 SP4 system with KIWI v9.24.55 behind a corporate Proxy. I first tried to build the virtual Image based on the description provided by the kiwi-ng descriptions on github.
This did not work because of the obs:// link in the repository definition seems to cause problems with kiwi-ng and the proxy, so I had to use the http:// link that was translated by kiwi-ng.

This together with the use of a more local mirror location worked right until after the debootstrap phase.
As soon as  KIWI starts entering the chroot step, apt is unable to locate the desired packages. I'm guessing it is due to a connection issue and or the proxy settings.
I attached my current configuration as well as the log file of the preparation phase of the kiwi-ng call "sudo kiwi-ng --debug --logfile ubuntu_prepare.log --profile Virtual system prepare --description ./ubuntu/ubuntu-focal --root ./build".

Is there a way to get more debug information or to at least see the contents of apt-get configuration file used by KIWI? The configuration file that is used during the chroot step is only temporary available and not viewable during the prepare phase.

I'm thankful for any hint.

Regards

Sven
ubuntu_prepare.log
config.xml

Sven Wölfel

unread,
Jan 16, 2023, 3:14:04 AMJan 16
to kiwi
Ok I managed to identify the Problem and opened a Issue on Github for it.

Turns out the kiwi generated apt configuration file is not generated with the proxy used by the build host.
If the necessary lines are inserted during the build process, the build works.

I hope this helps if somebody finds himself in a similar situation.

Regards

Marcus Schäfer

unread,
Jan 16, 2023, 9:24:44 AMJan 16
to kiwi-...@googlegroups.com
Hi,

> Ok I managed to identify the Problem and opened a [1]Issue on Github
> for it.

Thanks for digging into this.

> Turns out the kiwi generated apt configuration file is not generated
> with the proxy used by the build host.

I remember there is code which uses /etc/sysconfig/proxy from the
host during build time of the image to bring in the proxy settings
from the host to work within the chroot operations. Obviously
it's not enough/incomplete/broken. I take a look

> If the necessary lines are inserted during the build process, the build
> works.

Great, thanks

> I hope this helps if somebody finds himself in a similar situation.

It will.

Best regards,
Marcus
--
Public Key available via: https://keybase.io/marcus_schaefer/key.asc
keybase search marcus_schaefer
-------------------------------------------------------
Marcus Schäfer Brunnenweg 18
Tel: +49 7562 905437 D-88260 Argenbühl
Germany
-------------------------------------------------------
signature.asc
Reply all
Reply to author
Forward
0 new messages