When we were poking around under bug 1177432 we found that /etc/apt/sources.list that is built into the image does not match that of an installed system. This /etc/apt/sources.list is used if cloud-init did not re-write the file (such as woudl be used if you mounted the image directly and ran apt-get update).
Example showing the problem:
$ qemu-img create -f qcow2 -b wily/release-20151029/ubuntu-15.10-server-cloudimg-amd64-disk1.img /tmp/disk.img
$ sudo mount-image-callback /tmp/disk.img --read-only chroot _MOUNTPOINT_ cat /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu/ wily main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ wily-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ wily-security main restricted universe multiverse
What we'd like to see here is exactly what we just added to cloud-init.
For reference, as attached to bug 1177432, see trusty [1] and wily [2] examples.
When we were poking around under bug 1177432 we found that /etc/apt/ sources. list that is built into the image does not match that of an installed system. This /etc/apt/ sources. list is used if cloud-init did not re-write the file (such as woudl be used if you mounted the image directly and ran apt-get update).
Example showing the problem: 20151029/ ubuntu- 15.10-server- cloudimg- amd64-disk1. img /tmp/disk.img callback /tmp/disk.img --read-only chroot _MOUNTPOINT_ cat /etc/apt/ sources. list archive. ubuntu. com/ubuntu/ wily main restricted universe multiverse archive. ubuntu. com/ubuntu/ wily-updates main restricted universe multiverse security. ubuntu. com/ubuntu/ wily-security main restricted universe multiverse
$ qemu-img create -f qcow2 -b wily/release-
$ sudo mount-image-
deb http://
deb http://
deb http://
What we'd like to see here is exactly what we just added to cloud-init.
For reference, as attached to bug 1177432, see trusty [1] and wily [2] examples.
-- /launchpadlibra rian.net/ 224142290/ trusty- sources. list /launchpadlibra rian.net/ 224142308/ wily-sources. list
[1] https:/
[2] https:/
Related bugs:
* bug 1177432 [SRU] Enable backports in cloud-init archive template