You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Manual DEV machine setup described in https://github.com/Azure/iotedgedev/blob/main/docs/environment-setup/manual-dev-machine-setup.md is not working as expected
#605
Open
emulic opened this issue
May 12, 2023
· 2 comments
The approach described in https://github.com/Azure/iotedgedev/blob/main/docs/environment-setup/manual-dev-machine-setup.md is not fully working on windows.
The executed command is according to the linked document: iotedgedev solution init --template csharp
Choosing to install VM to simulate Edge Device (Create a new Virtual Machine with IoTEdge? [y/N]: y) during the execution, ends up with the following error:
SSH Key file (must be located in ~/.ssh and will be created if it doesn't exist) [id_rsa_iotedgedev]:
Creating a new Virtual Machine in 'fits4u-dev' with ssh key file 'id_rsa_iotedgedev'...
Retrieving 'SOME_DEVICE_ID' connection string...
No SSH key found at ~/.ssh/id_rsa_iotedgedev.pub. Generating a new one...
Saving key "~/.ssh/id_rsa_iotedgedev" failed: No such file or directory
ERROR: [Errno 2] No such file or directory: 'C:\\Users\\SOMEUSER\\.ssh\\id_rsa_iotedgedev.pub'
ERROR: Error while executing command: iotedgedev iothub setup --update-dotenv. Command '['iotedgedev', 'iothub', 'setup', '--update-dotenv']' returned non-zero exit status 1.
The exception comes obviously from the line 574 of azurecli.py: os.system(f("ssh-keygen -t rsa -b 4096 -C \"iotedgedev-autogenerated\" -f ~/.ssh/{ssh_key_file} -q -N \"\""))
This seems to be known issue of ssh-keygen, where ~ can't be resolved as user profile folder under windows.
Expected behavior
The command iotedgedev solution init --template csharp is successfully executed until the end and VM with Edge Device simulation is created in Azure.
Actual behavior
Execution of the command iotedgedev solution init --template csharp fails with the following error, when chosen to create a VM:
Saving key "~/.ssh/id_rsa_iotedgedev" failed: No such file or directory
ERROR: [Errno 2] No such file or directory: 'C:\\Users\\SOMEUSER\\.ssh\\id_rsa_iotedgedev.pub'
ERROR: Error while executing command: iotedgedev iothub setup --update-dotenv. Command '['iotedgedev', 'iothub', 'setup', '--update-dotenv']' returned non-zero exit status 1.
No VM is created.
Steps to Reproduce
Execute following command on Windows 10: iotedgedev solution init --template csharp
Executing with Administrator privileges is also not working.
Environment
iotedgedev Version: 3.3.7
Python Version: 3.6.8
Pip Version: 21.3.1
Development machine OS Version: Windows 10 Enterprise 22H2
IoT Edge device OS Version: - (this is actually the issue, Edge Device VM is not created)
The text was updated successfully, but these errors were encountered:
@emulic thanks for letting us know of this issue. Do you have any pointers to the ssh-keygen known issue you mentioned? What are the suggested workarounds?
Also, what terminal are you running this command on? Does command prompt, Git bash and PowerShell all have this same symptom?
To just use file name without any path, this comment here is saying, the file will be by default saved to ~.ssh folder
I tried with command prompt and PowerShell, same issue on both.
Description
The approach described in https://github.com/Azure/iotedgedev/blob/main/docs/environment-setup/manual-dev-machine-setup.md is not fully working on windows.
The executed command is according to the linked document:
iotedgedev solution init --template csharp
Choosing to install VM to simulate Edge Device (
Create a new Virtual Machine with IoTEdge? [y/N]: y
) during the execution, ends up with the following error:The exception comes obviously from the line 574 of azurecli.py:
os.system(f("ssh-keygen -t rsa -b 4096 -C \"iotedgedev-autogenerated\" -f ~/.ssh/{ssh_key_file} -q -N \"\""))
This seems to be known issue of ssh-keygen, where ~ can't be resolved as user profile folder under windows.
Expected behavior
The command
iotedgedev solution init --template csharp
is successfully executed until the end and VM with Edge Device simulation is created in Azure.Actual behavior
Execution of the command
iotedgedev solution init --template csharp
fails with the following error, when chosen to create a VM:No VM is created.
Steps to Reproduce
Execute following command on Windows 10:
iotedgedev solution init --template csharp
Executing with Administrator privileges is also not working.
Environment
iotedgedev Version: 3.3.7
Python Version: 3.6.8
Pip Version: 21.3.1
Development machine OS Version: Windows 10 Enterprise 22H2
IoT Edge device OS Version: - (this is actually the issue, Edge Device VM is not created)
The text was updated successfully, but these errors were encountered: