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

Liang Chen 6 Reputation points

I am working on the following lab:


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

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
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,414 questions
{count} vote

2 answers

Sort by: Most helpful
  1. Elvin Rajesh Kumar Baghele 6 Reputation points

    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

    1 person found this answer helpful.
    0 comments No comments

  2. Jhonnatan Pulgarin 1 Reputation point

    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.

    0 comments No comments