verified as shown in template. $ printf "#cloud-config\napt_mirror: ''\n" > user-data $ n=x1 $ lxc delete --force $n $ lxc launch ubuntu-daily:xenial $n $ sleep 10 $ lxc exec $n -- sh -c ' p=/etc/apt/sources.list.d/proposed.list echo deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc)-proposed main > "$p" && apt-get update -q && apt-get -qy install cloud-init' </dev/null
$ lxc file push - $n/etc/cloud/cloud.cfg.d/mirror.cfg < user-data
## clean it out so next is first boot. $ lxc exec $n -- sh -c ' cd /var/lib/cloud && for d in *; do [ "$d" = "seed" ] || rm -Rf "$d"; done rm -Rf /var/log/cloud-init*'
$ lxc exec $n reboot $ lxc exec $n -- tail -f /var/log/cloud-init-output.log $ lxc exec $n grep ^deb /etc/apt/sources.list | head -n 3 deb http://archive.ubuntu.com/ubuntu xenial main restricted deb-src http://archive.ubuntu.com/ubuntu xenial main restricted deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted
$ lxc exec $n -- dpkg-query --show cloud-init cloud-init 0.7.8-1-g3705bb5-0ubuntu1~16.04.1
verified as shown in template. config\ napt_mirror: ''\n" > user-data etc/apt/ sources. list.d/ proposed. list archive. ubuntu. com/ubuntu $(lsb_release -sc)-proposed main > "$p" &&
$ printf "#cloud-
$ n=x1
$ lxc delete --force $n
$ lxc launch ubuntu-daily:xenial $n
$ sleep 10
$ lxc exec $n -- sh -c '
p=/
echo deb http://
apt-get update -q && apt-get -qy install cloud-init' </dev/null
$ lxc file push - $n/etc/ cloud/cloud. cfg.d/mirror. cfg < user-data
## clean it out so next is first boot. cloud-init* '
$ lxc exec $n -- sh -c '
cd /var/lib/cloud && for d in *; do [ "$d" = "seed" ] || rm -Rf "$d"; done
rm -Rf /var/log/
$ lxc exec $n reboot cloud-init- output. log sources. list | head -n 3 archive. ubuntu. com/ubuntu xenial main restricted archive. ubuntu. com/ubuntu xenial main restricted archive. ubuntu. com/ubuntu xenial-updates main restricted
$ lxc exec $n -- tail -f /var/log/
$ lxc exec $n grep ^deb /etc/apt/
deb http://
deb-src http://
deb http://
$ lxc exec $n -- dpkg-query --show cloud-init g3705bb5- 0ubuntu1~ 16.04.1
cloud-init 0.7.8-1-