instance-data.json not persisted across reboot.

Bug #1791781 reported by Chad Smith
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
Chad Smith

Bug Description

cloud-init v18.3 /run/cloud-init/instance-data.json does not persist across reboot.

Affects: Xenial series or later

Any attempt by services/consumers to re-use instance data after a machine reboots will fail.

To reproduce:

$ lxc launch ubuntu-daily:xenial test-xenial
Creating test-xenial
Starting test-xenial

$ lxc exec test-xenial cat /ruc/cloud-init/instance-data.json/cloud-init/instance-data.json
 "base64-encoded-keys": [

$ lxc exec test-xenial reboot
$ lxc exec test-xenial cat /ruc/cloud-init/instance-data.json

cat: /run/cloud-init/instance-data.json: No such file or directory

Note: cloud-init only writes instnace-data.json when processing meta-data on the 1st boot via DataSource.get_data call. We either need to persist this data somewhere else, or write it again per boot.

Related branches

Chad Smith (chad.smith)
Changed in cloud-init:
importance: Undecided → High
status: New → Confirmed
assignee: nobody → Chad Smith (chad.smith)
Scott Moser (smoser)
Changed in cloud-init:
status: Confirmed → In Progress
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

This bug is fixed with commit c7555762 to cloud-init on branch master.
To view that commit see the following URL:

Changed in cloud-init:
status: In Progress → Fix Committed
Revision history for this message
Scott Moser (smoser) wrote : Fixed in cloud-init version 18.4.

This bug is believed to be fixed in cloud-init in version 18.4. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in cloud-init:
status: Fix Committed → Fix Released
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.