Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

balena config inject not working on windows #2759

Open
smiccoli opened this issue Apr 25, 2024 · 1 comment
Open

balena config inject not working on windows #2759

smiccoli opened this issue Apr 25, 2024 · 1 comment

Comments

@smiccoli
Copy link

smiccoli commented Apr 25, 2024

Expected Behavior

I want to update the device UUID in the config.json file of an image for generic-amd64 device type previously flashed on a USB stick running balena config inject .\config.json --drive \\.\PhysicalDrive1 as documented to save time instead of flashing the new image for each device

Actual Behavior

balena config inject .\config.json --drive \\.\PhysicalDrive1
File is a directory: undefined

Additional information may be available with the `--debug` flag.

For further help or support, visit:
https://www.balena.io/docs/reference/balena-cli/#support-faq-and-troubleshooting

Steps to Reproduce the Problem

The usb stick is recognized

PS C:\balena> balena util available-drives
DEVICE             SIZE     DESCRIPTION
\\.\PhysicalDrive1 125.2 GB SanDisk SanDisk 3.2 Gen1 USB Device

And the previous config.json is read properly

PS C:\balena> balena config read --drive \\.\PhysicalDrive1
applicationId:         <omitted-app-id>
deviceType:            generic-amd64
userId:                <omitted-user-id>
appUpdatePollInterval: 600000
listenPort:            48484
vpnPort:               443
apiEndpoint:           https://api.balena-cloud.com
vpnEndpoint:           cloudlink.balena-cloud.com
registryEndpoint:      registry2.balena-cloud.com
deltaEndpoint:         https://delta.balena-cloud.com
mixpanelToken:         <omitted-panel-token>
logsEndpoint:          https://logs.balena-cloud.com
deviceApiKey:          <omitted-device-api-key>
registered_at:         1714038105
deviceId:              <omitted-device-id>
uuid:                  <omitted-uuid>
files:
  network/network.config:
    """
      [service_home_ethernet]
      Type=ethernet
      Nameservers=8.8.8.8,8.8.4.4
    """

New config.json is generated

balena config generate --device <omitted-new-device-id> --version 5.1.50+rev1 --dev --output config.json

When trying to inject the new configuration the command fail as below

PS C:\balena> balena config inject .\config.json --drive \\.\PhysicalDrive1 --debug
[debug] new argv=[C:\Program Files\balena-cli\client\bin\node.exe,C:\Program Files\balena-cli\client\bin\run,config:inject,.\config.json,--drive,\\.\PhysicalDrive1] length=6
[debug] Deprecation check: 0.07967 days since last npm registry query for next major version release date.
[debug] Will not query the registry again until at least 7 days have passed.
File is a directory: undefined

Error: EISDIR: illegal operation on a directory, fstat

For further help or support, visit:
https://www.balena.io/docs/reference/balena-cli/#support-faq-and-troubleshooting


[debug] Event tracking error: Timeout awaiting 'response' for 0ms

Specifications

  • balena CLI version: 18.2.1
  • Cloud backend: balenaCloud
  • Operating system version: Windows 11
  • 32/64 bit OS and processor: 64bit
  • Install method: executable installer
@smiccoli
Copy link
Author

same issue with other commands such as

balena config write --drive \\.\PhysicalDrive1 hostname custom-hostname

i also tried with

balena config write --drive "\\.\PhysicalDrive1" hostname custom-hostname

but didnt make a difference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant