question

lchenliang avatar image
1 Vote"
lchenliang asked ·

vm created in the sandbox cannot reach https://dot.net

I am working on the following lab:

https://docs.microsoft.com/en-us/learn/modules/host-build-agent/4-create-build-agent

the step to get dontnet-install.sh is not working:

Install .NET as the sudo (non-root) user

sudo -i -u $SUDO_USER bash << EOF
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -c Current -v $DOTNET_VERSION
EOF

azureuser@MyLinuxAgent:~$ curl -sSL https://dot.net/v1/dotnet-install.sh
curl: (7) Failed to connect to dotnet.microsoft.com port 443: Connection timed out

azure-virtual-machines
· 1
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Is there any update? If the answer provided below helped you, please mark it as answer, so that it can help others in the community, looking for help on the same.

0 Votes 0 ·
elvinbaghele-3920 avatar image
1 Vote"
elvinbaghele-3920 answered ·

run below command

wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb

then edit it

vi build-tools.sh

go to insert mode and add following commands

sudo apt-get update

sudo apt-get install apt-transport-https

sudo apt-get update

sudo apt-get install dotnet-sdk-3.0

sudo apt-get update

sudo apt-get install dotnet-runtime-3.0


how it look

save the file : Press Esc then :wq + Enter

Then run below commands

chmod u+x build-tools.sh

sudo ./build-tools.sh



capture.png (22.2 KiB)
·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JhonnatanPulgarin-8173 avatar image
0 Votes"
JhonnatanPulgarin-8173 answered ·

I just used my account, not the sandbox, and there it worked ok, I don't know why the sandbox has that problem connecting to dotnet.microsoft.com, cause in my case that was the error, cannot curl that url, but from my azure account directly creating the VM there, the lab worked.

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.