Skip to content

Instantly share code, notes, and snippets.

@peng-hui
peng-hui / qemu-ubuntu-proxy.md
Created November 18, 2022 07:41
On-boot system-wide proxy for Ubuntu autoinstall error on QEMU

I was to install a VM on QEMU using Ubuntu 22.04 TLS autoinstall.

An error brought up about subiquity. Screenshot_20221117_174719 The root cause turned out to be network inaccessibility within the VM, because my host manchine was behind a proxy. At the installation time, the autoinstaller/cloud-init was not able to access Internet in the default NAT network protocol. After comprehending the bug, I was going to find a way to enable system-wide proxy at the very beginning of cloud-init. There was an urgen proposal for such a system-wide proxy. However, such an issue has so far not been introduced to cloud-init.

The above bug report mentioned several workarounds by specying the proxy using the user-data. However, the basic cloud-config based one could not take effect during the installat