This is fixed in cloud-init trunk and in the ubuntu quantal package listed in comment 4.
I've tested this by:
* setup:
* have *some* way to add 'ubuntu-mirror' to the dns for kvm guests
I used dnsmasq on a server system, and can control this by adding entries
to /etc/hosts. You need to be able to configure your system such
that 'host ubuntu-mirror' returns something:
$ host ubuntu-mirror
ubuntu-mirror has address 192.168.1.1
* use make-seed-disk [1] to create a seed disk for cloud-init.
$ cat user-data.txt
#cloud-config
password: passw0rd
chpasswd: { expire: False }
ssh_pwauth: True
$ make-seed-disk seed.img user-data.txt
* verify issue in released version of precise or quantal alpha3:
* add 'ubuntu-mirror' entry to dns
* boot kvm guest
* check mirror in /etc/apt/sources by:
$ grep "^deb .*main$" /etc/apt/sources.list
* quantal-alpha3: ubuntu-mirror is selected
* precise 20120728: ubuntu-mirror is selected
* verify fix in quantal 20120804 or later:
* add 'ubuntu-mirror' entry to dns
* boot kvm guest of quantal 20120804 or later.
* check mirror in /etc/apt/sources by:
$ grep "^deb .*main$" /etc/apt/sources.list
* verify no regression:
* remove 'ubuntu-mirror' entry from dns, boot, check /etc/apt/sources.list
* verify explicit enablement works:
* add ubuntu-mirror
* create seed disk with 'apt_mirror_search_dns: True' in user-data
* verify that /etc/apt/sources.list shows ubuntu-mirror
This is fixed in cloud-init trunk and in the ubuntu quantal package listed in comment 4.
I've tested this by:
* setup:
* have *some* way to add 'ubuntu-mirror' to the dns for kvm guests
I used dnsmasq on a server system, and can control this by adding entries
to /etc/hosts. You need to be able to configure your system such
that 'host ubuntu-mirror' returns something:
$ host ubuntu-mirror
ubuntu-mirror has address 192.168.1.1
* use make-seed-disk [1] to create a seed disk for cloud-init.
$ cat user-data.txt
#cloud-config
password: passw0rd
chpasswd: { expire: False }
ssh_pwauth: True
$ make-seed-disk seed.img user-data.txt
* verify issue in released version of precise or quantal alpha3: sources. list
* add 'ubuntu-mirror' entry to dns
* boot kvm guest
* check mirror in /etc/apt/sources by:
$ grep "^deb .*main$" /etc/apt/
* quantal-alpha3: ubuntu-mirror is selected
* precise 20120728: ubuntu-mirror is selected
* verify fix in quantal 20120804 or later: sources. list sources. list search_ dns: True' in user-data sources. list shows ubuntu-mirror
* add 'ubuntu-mirror' entry to dns
* boot kvm guest of quantal 20120804 or later.
* check mirror in /etc/apt/sources by:
$ grep "^deb .*main$" /etc/apt/
* verify no regression:
* remove 'ubuntu-mirror' entry from dns, boot, check /etc/apt/
* verify explicit enablement works:
* add ubuntu-mirror
* create seed disk with 'apt_mirror_
* verify that /etc/apt/
* Notes, boot kvm with: img,if= virtio \ img,if= virtio
kvm -m 512 -curses -drive file=seed.
-drive file=disk.
-- smoser. brickies. net/git/ ?p=tildabin. git;a=blob; f=make- seed-disk; hb=HEAD
[1] http://