# launch an instance on azure of yakkety and of xenial
$ azure vm create --vm-size=Basic_A0 \
--vm-name=smoser0413y "--location=East US" \
--<email address hidden> --no-ssh-password --ssh=22 \
smoser0413y b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu_DAILY_BUILD-yakkety-16_10-amd64-server-20170412-en-us-30GB smoser
## on each system
% git clone https://git.launchpad.net/~smoser/cloud-init/+git/sru-info
% sudo ./sru-info/bin/enable-proposed
% sudo apt-get -q update
% sudo apt-get install -qy cloud-init
## this just sets the hostname back to the stock 'ubuntu'
## so the code will think it needs to re-publish it
## as it only publishes if it differs from the existing.
% echo "ubuntu" | sudo tee /etc/hostname
% sudo ./sru-info/bin/do-reboot clean save=orig
# reconnect and verify yakkety
$ cat /etc/cloud/build.info
build_name: server
serial: 20170412
# launch an instance on azure of yakkety and of xenial name=smoser0413 y "--location=East US" \ 2b05eac6a62ebad 85__Ubuntu_ DAILY_BUILD- yakkety- 16_10-amd64- server- 20170412- en-us-30GB smoser
$ azure vm create --vm-size=Basic_A0 \
--vm-
--<email address hidden> --no-ssh-password --ssh=22 \
smoser0413y b39f27a8b8c64d5
$ azure vm create --vm-size=Basic_A0 \ name=smoser0413 y "--location=East US" \ 2b05eac6a62ebad 85__Ubuntu_ DAILY_BUILD- yakkety- 16_10-amd64- server- 20170412- en-us-30GB smoser
--vm-
--<email address hidden> --no-ssh-password --ssh=22 \
smoser0413y b39f27a8b8c64d5
## on each system /git.launchpad. net/~smoser/ cloud-init/ +git/sru- info bin/enable- proposed bin/do- reboot clean save=orig
% git clone https:/
% sudo ./sru-info/
% sudo apt-get -q update
% sudo apt-get install -qy cloud-init
## this just sets the hostname back to the stock 'ubuntu'
## so the code will think it needs to re-publish it
## as it only publishes if it differs from the existing.
% echo "ubuntu" | sudo tee /etc/hostname
% sudo ./sru-info/
# reconnect and verify yakkety build.info
$ cat /etc/cloud/
build_name: server
serial: 20170412
$ dpkg-query --show cloud-init g61eb03fe- 0ubuntu1~ 16.10.1
cloud-init 0.7.9-90-
$ lsb_release -sc
yakkety
$ grep WARN /var/log/ cloud-init. log || echo no warn cloud-init. log .py[DEBUG] : pubhname: publishing hostname [hostname= smoser0413y policy=True interface=eth0]
no warn
$ grep --after-context=7 "pubhname" /var/log/
2017-04-13 20:52:40,641 - DataSourceAzure
2017-04-13 20:52:40,648 - util.py[DEBUG]: Reading from /proc/uptime (quiet=False)
2017-04-13 20:52:40,648 - util.py[DEBUG]: Read 11 bytes from /proc/uptime
2017-04-13 20:52:40,649 - util.py[DEBUG]: Running command ['sh', '-xc', 'i=$interface; x=0; ifdown $i || x=$?; ifup $i || x=$?; exit $x'] with allowed return codes [0] (shell=False, capture=False)
2017-04-13 20:52:45,982 - util.py[DEBUG]: Reading from /proc/uptime (quiet=False)
2017-04-13 20:52:45,982 - util.py[DEBUG]: Read 11 bytes from /proc/uptime
2017-04-13 20:52:45,982 - util.py[DEBUG]: publishing hostname took 5.334 seconds (5.34)
2017-04-13 20:52:45,983 - util.py[DEBUG]: Running command ['hostname', 'ubuntu'] with allowed return codes [0] (shell=False, capture=True)
$ cat /run/cloud- init/result. json
{
"v1": {
"datasource": "DataSourceAzureNet [seed=/dev/sr0]",
"errors": []
}
}
# reconnect and verify xenial g61eb03fe- 0ubuntu1~ 16.04.1 build.info cloud-init. log || echo no warn cloud-init. log || echo no warn cloud-init. log .py[DEBUG] : pubhname: publishing hostname [hostname= smoser0413x policy=True interface=eth0] init/result. json
$ dpkg-query --show cloud-init
cloud-init 0.7.9-90-
$ cat /etc/cloud/
build_name: server
serial: 20170412
$ lsb_release -sc
xenial
$ rep WARN /var/log/
The program 'rep' is currently not installed. You can install it by typing:
sudo apt install rep
no warn
$ ^C
$ grep WARN /var/log/
no warn
$ grep --after-context=7 "pubhname" /var/log/
2017-04-13 20:54:51,199 - DataSourceAzure
2017-04-13 20:54:51,199 - util.py[DEBUG]: Reading from /proc/uptime (quiet=False)
2017-04-13 20:54:51,199 - util.py[DEBUG]: Read 11 bytes from /proc/uptime
2017-04-13 20:54:51,207 - util.py[DEBUG]: Running command ['sh', '-xc', 'i=$interface; x=0; ifdown $i || x=$?; ifup $i || x=$?; exit $x'] with allowed return codes [0] (shell=False, capture=False)
2017-04-13 20:54:56,081 - util.py[DEBUG]: Reading from /proc/uptime (quiet=False)
2017-04-13 20:54:56,081 - util.py[DEBUG]: Read 11 bytes from /proc/uptime
2017-04-13 20:54:56,081 - util.py[DEBUG]: publishing hostname took 4.869 seconds (4.88)
2017-04-13 20:54:56,081 - util.py[DEBUG]: Running command ['hostname', 'ubuntu'] with allowed return codes [0] (shell=False, capture=True)
$ cat /run/cloud-
{
"v1": {
"datasource": "DataSourceAzureNet [seed=/dev/sr0]",
"errors": []
}
}