# Balena CLI (balena os configure not copying config.json to image)

**URL:** <https://forums.balena.io/t/balena-cli-balena-os-configure-not-copying-config-json-to-image/132098>\
**Category:** openBalena\
**Created:** [June 12, 2020, 7:29pm UTC](https://forums.balena.io/t/balena-cli-balena-os-configure-not-copying-config-json-to-image/132098 "2020-06-12T19:29:04Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![gerb0n](https://avatars.discourse-cdn.com/v4/letter/g/85e7bf/32.png) [@gerb0n](https://forums.balena.io/u/gerb0n)\
**Post date:** [June 12, 2020, 7:29pm UTC](https://forums.balena.io/t/balena-cli-balena-os-configure-not-copying-config-json-to-image/132098/1 "2020-06-12T19:29:04Z")

</div>

Balena-CLI does not seem to copy the correct config.json.

I downloaded the image [BalenaOS 2.51.1+rev1](https://files.balena-cloud.com/images/raspberrypi4-64/2.51.1%2Brev1.dev/image/balena.img.zip) for the Raspberry PI 4. After unzipping and running the command `balena os configure ./balena.img --app myApp --version 2.51.1` it does not actually configure anything I guess. I do see that the modified date is changed. But when I take a look inside the `.img` I see a very basic `config.json` which could explain why my device is not booting/showing up at `balena devices` (which is my actual problem I am struggling with).

Path to the config.json I’m checking: `\1\balena\overlay2\35ba0eff23c4f9ff7e4959702fb277f9e05dbca92f0106dbf1cee5649a9393fd\diff\resin-boot\config.json`

Content of config.json:  
`{ "deviceType": "raspberrypi4-64", "localMode": true, "persistentLogging": false }`

I expect it to have much more information like the content you get after running  
`balena os build-config ./balena.img --output config.json`

My guess apiEndpoint, vpnEndpoint and such is missing and therefore not able to notify my open-balena server that it’s up and running.

I didn’t get those problems before (like 5 months ago). Did the process change to add new devices?  
Balena-CLI version: 11.36.0  
My OS is Windows 10 with WSL (Ubuntu 20.04 LTS)  
Device: Raspberry PI 4

---

<div class="post-metadata">

**Author:** ![floion](https://avatars.discourse-cdn.com/v4/letter/f/45deac/32.png) [@floion](https://forums.balena.io/u/floion)\
**Post date:** [June 12, 2020, 7:34pm UTC](https://forums.balena.io/t/balena-cli-balena-os-configure-not-copying-config-json-to-image/132098/2 "2020-06-12T19:34:49Z")

</div>

Hi, the config.json to check is in the first partition. That is a FAT partition so you would be able to mount it on Windows. Can you check out there and see if it gets populated?

---

<div class="post-metadata">

**Author:** ![gerb0n](https://avatars.discourse-cdn.com/v4/letter/g/85e7bf/32.png) [@gerb0n](https://forums.balena.io/u/gerb0n)\
**Post date:** [June 12, 2020, 8:28pm UTC](https://forums.balena.io/t/balena-cli-balena-os-configure-not-copying-config-json-to-image/132098/3 "2020-06-12T20:28:03Z")

</div>

Yea it gets populated so it might not be the problem after all. However I’m out of ideas to whatever it could be. It won’t show up with `balena devices` so I can’t create a tunnel and see what’s going on inside the device.

When I run the `balena os configure` command on the windows CLI it tells me I need to use WSL. Has this changed recently? In my recollection I was able to use it on the windows CLI a couple of months back. It might be the only thing I’m doing differently compared to before.

---

<div class="post-metadata">

**Author:** ![bversluijs](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/bversluijs/32/3954_2.png) [@bversluijs](https://forums.balena.io/u/bversluijs)\
**Post date:** [June 12, 2020, 8:39pm UTC](https://forums.balena.io/t/balena-cli-balena-os-configure-not-copying-config-json-to-image/132098/4 "2020-06-12T20:39:52Z")

</div>

Hi,

After reading [open-balena-api v0.76.3 sql migrations](https://forums.balena.io/t/open-balena-api-v0-76-3-sql-migrations/120343) and [Device can't register with API](https://forums.balena.io/t/device-cant-register-with-api/120752/19), it seems like the supervisor after `balenaOS 2.49.0` isn’t compatible with the latest release of openBalena, [see this issue](https://github.com/balena-io/open-balena/issues/80). So the problem is noted, but there isn’t a fix (yet) unfortunately. I’m waiting for the fix myself, so let’s hope they’ll release a new (stable) version soon 🙂

---

<div class="post-metadata">

**Author:** ![gerb0n](https://avatars.discourse-cdn.com/v4/letter/g/85e7bf/32.png) [@gerb0n](https://forums.balena.io/u/gerb0n)\
**Post date:** [June 12, 2020, 8:44pm UTC](https://forums.balena.io/t/balena-cli-balena-os-configure-not-copying-config-json-to-image/132098/5 "2020-06-12T20:44:06Z")

</div>

Thanks for your reply. So If I understand correctly using an older BalenaOS version (like 2.48.0) will do the trick? Or do I need to revert my supervisor to a specific version aswell?

---

<div class="post-metadata">

**Author:** ![bversluijs](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/bversluijs/32/3954_2.png) [@bversluijs](https://forums.balena.io/u/bversluijs)\
**Post date:** [June 12, 2020, 8:53pm UTC](https://forums.balena.io/t/balena-cli-balena-os-configure-not-copying-config-json-to-image/132098/6 "2020-06-12T20:53:54Z")

</div>

As far as I can tell, they say that from 2.49.0 and on, the supervisor doesn’t work anymore with openBalena. So downgrading to balenaOS 2.48.0 should do the trick, which also reverts your supervisor to a compatible version. So that’s your best shot!

---

<div class="post-metadata">

**Author:** ![gerb0n](https://avatars.discourse-cdn.com/v4/letter/g/85e7bf/32.png) [@gerb0n](https://forums.balena.io/u/gerb0n)\
**Post date:** [June 12, 2020, 9:43pm UTC](https://forums.balena.io/t/balena-cli-balena-os-configure-not-copying-config-json-to-image/132098/10 "2020-06-12T21:43:15Z")

</div>

Cheers. Will do. Thanks alot

---

<div class="post-metadata">

**Author:** ![floion](https://avatars.discourse-cdn.com/v4/letter/f/45deac/32.png) [@floion](https://forums.balena.io/u/floion)\
**Post date:** [June 12, 2020, 10:55pm UTC](https://forums.balena.io/t/balena-cli-balena-os-configure-not-copying-config-json-to-image/132098/12 "2020-06-12T22:55:23Z")

</div>

Hi, indeed [https://github.com/balena-io/open-balena/issues/80](https://github.com/balena-io/open-balena/issues/80) seems to be the issue so watch that ticket for a resolution

---

<div class="post-metadata">

**Author:** ![JSReds](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/jsreds/32/2929_2.png) [@JSReds](https://forums.balena.io/u/JSReds)\
**Post date:** [October 28, 2020, 12:22pm UTC](https://forums.balena.io/t/balena-cli-balena-os-configure-not-copying-config-json-to-image/132098/16 "2020-10-28T12:22:49Z")

</div>

Hi there, we inform you that the issue have been solved as mentioned in the issue [https://github.com/balena-io/open-balena/issues/80](https://github.com/balena-io/open-balena/issues/80)
