Hello @Sibeesh Venu , Thanks for reaching out to us!.
Below is the same thread:
Related to: https://github.com/Azure/iotedge/issues/3353
Are you able to debug your module on your Dev Machine before deploying it?
So before we deploy our module, we make sure it is working properly, for this, we have tools provided by Microsoft that need to be installed on VS2019 or VS Code.
Please follow this document, I always make use of this,
Use Visual Studio 2019 to develop and debug modules for Azure IoT Edge
Use Visual Studio Code to develop and debug modules for Azure IoT Edge
Below is my sample VS2019 IDE snap, where I have the SendTelemetry module, always do debug before deploying it on my Raspberry Pi 3.
Update 08/07/2020
Thanks to Sibeesh Venu who posted the entire resolution from his research on this issue, worked with the Microsoft team, and posted the complete resolution on Stackoverflow.
Below is the Quote:
There were a couple of issues where I was doing wrong. First thing is that I was trying to build an arm64 image in my 64 bit Windows Dev Machine and then deploy the image to the arm32 Raspbian OS, which will never work. You can see the version and other details by running the below commands.
enter image description here
If it says aarch64 then it is 64 bit. If it says armv7l then it is 32 bit. In my case, it is arm71. So now I had to build an arm32 container images on my 64 bit Windows Host machine and use it on my Raspberry Pi 4. According to this doc, it is definitely possible.
You can build ARM32 and ARM64 images on x64 machines, but you will not be able to run them
Running was not my problem, as I just had to build the image and I will use it in my Raspberry Pi. To make it work, I had to change my Dockerfile.arm32v7, specifically the first line where we pull the base image
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build-env
WORKDIR /app
COPY *.csproj ./
RUN dotnet restore
COPY . ./
RUN dotnet publish -c Release -o out
FROM mcr.microsoft.com/dotnet/core/runtime:3.1-buster-slim-arm32v7
WORKDIR /app
COPY --from=build-env /app/out ./
RUN useradd -ms /bin/bash moduleuser
USER moduleuser
ENTRYPOINT ["dotnet", "SendTelemetry.dll"]
The "build-env" image should be the same architecture as the host OS, the final image should be the target OS architecture. Once I made the changes to the docker file, I changed the version in the module.json file inside my module folder so that the new image with a new tag will be added to the Container Registry when I use the option Build and Push IoT Edge Solution after right-clicking deployment.template.json, and then I used Create Deployment for Single Device option after right-clicking on the device name in Visual Studio Code. And then when I monitor the device (Start Monitoring Built-in Event Endpoint option), I am getting this output.