After rebooting a VM with Azure IoT Edge 1.2.1, it seems that the containers cannot start.
Seeing the iotedge system logs there are the following messages
aziot-edged[1127]: 2021-08-25T05:15:01Z [WARN] - The daemon could not start up successfully: Could not retrieve device information
aziot-edged[1127]: 2021-08-25T05:15:01Z [WARN] - caused by: HTTP response error: [400 Bad Request] {"message":"device identity not found"}
aziot-identityd[1165]: 2021-08-25T05:15:01Z [INFO] - <-- POST /identities/device?api-version=2020-09-01 {"content-type": "application/json", "host": "2f72756e2f617a696f742f6964656e74697479642e736f636b:0", "content-length": "16"}
aziot-identityd[1165]: 2021-08-25T05:15:01Z [INFO] - !!! device identity not found
aziot-identityd[1165]: 2021-08-25T05:15:01Z [INFO] - --> 400 {"content-type": "application/json"}
aziot-edged[1127]: 2021-08-25T05:15:06Z [WARN] - Retrying getting edge device provisioning information.
aziot-edged[1127]: 2021-08-25T05:15:06Z [INFO] - Obtaining edge device provisioning data...
Everything returns to working fine if the command iotedge config apply run manually.
Any idea to solve this issue?