# Verified seeding nocloud from URL sets hostname properly from seed.
url=https://git.launchpad.net/~smoser/cloud-init/+git/sru-info/plain/bugs/lp-1691772/;
for release in xenial zesty; do
get-proposed-cloudimg $release;
img=$release-server-cloudimg-amd64-proposed.img;
qemu-system-x86_64 -snapshot -enable-kvm -m 512 \
-device virtio-net-pci,netdev=net00 -netdev type=user,id=net00 \
-drive "file=$img,if=virtio" \
-smbios "type=1,serial=ds=nocloud-net;seedfrom=$url" \
-nographic;
# login ubuntu:passw0rd
hostname;
cat /run/cloud-init/result.json;
grep CODENAME /etc/lsb-release;
dpkg-query --show cloud-init ;
done
-- xenial seed test
ubuntu@nocloud-guest:~$ hostname
nocloud-guest
ubuntu@nocloud-guest:~$ cat /run/cloud-init/result.json
{
"v1": {
"datasource": "DataSourceNoCloudNet
[seed=dmi,https://git.launchpad.net/~smoser/cloud-init/+git/sru-info/plain/bugs/lp-1691772/][dsmode=net]",
"errors": []
}
}
ubuntu@nocloud-guest:~$ grep -i code /etc/lsb-release
DISTRIB_CODENAME=xenial
ubuntu@nocloud-guest:~$ dpkg-query --show cloud-init
cloud-init 0.7.9-233-ge586fe35-0ubuntu1~16.04.1
ubuntu@nocloud-guest:~$ sudo shutdown -h now
...
-- zesty test
http://cloud-images.ubuntu.com/daily/server/zesty/current/zesty-server-cloudimg-amd64.img
...
ubuntu@nocloud-guest:~$ hostname
nocloud-guest
ubuntu@nocloud-guest:~$ cat /run/cloud-init/result.json
{
"v1": {
"datasource": "DataSourceNoCloudNet
[seed=dmi,https://git.launchpad.net/~smoser/cloud-init/+git/sru-info/plain/bugs/lp-1691772/][dsmode=net]",
"errors": []
}
}
ubuntu@nocloud-guest:~$ grep CODENAME /etc/lsb-release
DISTRIB_CODENAME=zesty
ubuntu@nocloud-guest:~$ dpkg-query --show cloud-init
cloud-init 0.7.9-233-ge586fe35-0ubuntu1~17.04.1
** Tags removed: verification-needed verification-needed-xenial
verification-needed-zesty
** Tags added: verification-done-xenial verification-done-zesty
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1691772
Title:
provide a way to seed NoCloud from network without image modification.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1691772/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs