Exercise - Create an Azure virtual machine in this exercise after typing Run the following az vm extension set command to configure Nginx on your VM: then I got error saying ed-settings '{"commandToExecute": "./configure-nginx.sh"}' (VME

Saiprathap Margani 5 Reputation points
2023-12-01T07:37:55.9833333+00:00

I got errror after given az vm extension set saying

(VMExtensionProvisioningError) VM has reported a failure when processing extension 'customScript' (publisher 'Microsoft.Azure.Extensions' and type 'customScript'). Error message: "Enable failed: failed to execute command: command terminated with exit status=1
[stdout]
:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [109 kB]
Get:5 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [1002 kB]
Get:6 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [14.1 MB]
Get:7 http://security.ubuntu.com/ubuntu jammy-security/main Translation-en [193 kB]
Get:8 http://security.ubuntu.com/ubuntu jammy-security/main amd64 c-n-f Metadata [11.4 kB]
Get:9 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [1164 kB]
Get:10 http://security.ubuntu.com/ubuntu jammy-security/restricted Translation-en [189 kB]
Get:11 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 c-n-f Metadata [520 B]
Get:12 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [807 kB]
Get:13 http://security.ubuntu.com/ubuntu jammy-security/universe Translation-en [150 kB]
Get:14 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 c-n-f Metadata [16.8 kB]
Get:15 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [36.5 kB]
Get:16 http://security.ubuntu.com/ubuntu jammy-security/multiverse Translation-en [7060 B]
Get:17 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 c-n-f Metadata [260 B]
Get:18 http://archive.ubuntu.com/ubuntu jammy/universe Translation-en [5652 kB]
Get:19 http://archive.ubuntu.com/ubuntu jammy/universe amd64 c-n-f Metadata [286 kB]
Get:20 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [217 kB]
Get:21 http://archive.ubuntu.com/ubuntu jammy/multiverse Translation-en [112 kB]
Get:22 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 c-n-f Metadata [8372 B]
Get:23 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [1211 kB]
Get:24 http://archive.ubuntu.com/ubuntu jammy-updates/main Translation-en [253 kB]
Get:25 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 c-n-f Metadata [16.1 kB]
Get:26 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [1185 kB]
Get:27 http://archive.ubuntu.com/ubuntu jammy-updates/restricted Translation-en [192 kB]
Get:28 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 c-n-f Metadata [520 B]
Get:29 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1010 kB]
Get:30 http://archive.ubuntu.com/ubuntu jammy-updates/universe Translation-en [224 kB]
Get:31 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 c-n-f Metadata [22.1 kB]
Get:32 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [41.6 kB]
Get:33 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse Translation-en [9768 B]
Get:34 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 c-n-f Metadata [472 B]
Get:35 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 Packages [64.2 kB]
Get:36 http://archive.ubuntu.com/ubuntu jammy-backports/main Translation-en [10.5 kB]
Get:37 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 c-n-f Metadata [388 B]
Get:38 http://archive.ubuntu.com/ubuntu jammy-backports/restricted amd64 c-n-f Metadata [116 B]
Get:39 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [27.8 kB]
Get:40 http://archive.ubuntu.com/ubuntu jammy-backports/universe Translation-en [16.5 kB]
Get:41 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 c-n-f Metadata [644 B]
Get:42 http://archive.ubuntu.com/ubuntu jammy-backports/multiverse amd64 c-n-f Metadata [116 B]
Fetched 28.6 MB in 6s (4729 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  fontconfig-config fonts-dejavu-core libdeflate0 libfontconfig1 libgd3
  libjbig0 libjpeg-turbo8 libjpeg8 libnginx-mod-http-geoip2
  libnginx-mod-http-image-filter libnginx-mod-http-xslt-filter
  libnginx-mod-mail libnginx-mod-stream libnginx-mod-stream-geoip2 libtiff5
  libwebp7 libxpm4 nginx-common nginx-core
Suggested packages:
  libgd-tools fcgiwrap nginx-doc ssl-cert
<html><body><h2>Welcome to Azure! My name is my-vm.</h2></body></html>

[stderr]
 - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_jammy-security_universe_i18n_Translation-en - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_jammy-security_universe_binary-amd64_Packages - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_jammy-security_restricted_i18n_Translation-en - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_jammy-security_restricted_binary-amd64_Packages - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_jammy-security_main_i18n_Translation-en - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_jammy-security_main_binary-amd64_Packages - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-backports_universe_i18n_Translation-en - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-backports_universe_binary-amd64_Packages - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-backports_main_i18n_Translation-en - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-backports_main_binary-amd64_Packages - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-updates_multiverse_i18n_Translation-en - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-updates_multiverse_binary-amd64_Packages - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-updates_universe_i18n_Translation-en - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-updates_universe_binary-amd64_Packages - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-updates_restricted_i18n_Translation-en - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-updates_restricted_binary-amd64_Packages - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-updates_main_i18n_Translation-en - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-updates_main_binary-amd64_Packages - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy_multiverse_i18n_Translation-en - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy_multiverse_binary-amd64_Packages - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy_universe_i18n_Translation-en - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy_universe_binary-amd64_Packages - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy_restricted_i18n_Translation-en - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy_restricted_binary-amd64_Packages - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy_main_i18n_Translation-en - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy_main_binary-amd64_Packages - open (2: No such file or directory)
tee: /var/www/html/index.html: No such file or directory
". More information on troubleshooting is available at https://aka.ms/vmextensionlinuxtroubleshoot. 
Code: VMExtensionProvisioningError
Message: VM has reported a failure when processing extension 'customScript' (publisher 'Microsoft.Azure.Extensions' and type 'customScript'). Error message: "Enable failed: failed to execute command: command terminated with exit status=1
[stdout]
:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [109 kB]
Get:5 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [1002 kB]
Get:6 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [14.1 MB]
Get:7 http://security.ubuntu.com/ubuntu jammy-security/main Translation-en [193 kB]
Get:8 http://security.ubuntu.com/ubuntu jammy-security/main amd64 c-n-f Metadata [11.4 kB]
Get:9 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [1164 kB]
Get:10 http://security.ubuntu.com/ubuntu jammy-security/restricted Translation-en [189 kB]
Get:11 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 c-n-f Metadata [520 B]
Get:12 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [807 kB]
Get:13 http://security.ubuntu.com/ubuntu jammy-security/universe Translation-en [150 kB]
Get:14 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 c-n-f Metadata [16.8 kB]
Get:15 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [36.5 kB]
Get:16 http://security.ubuntu.com/ubuntu jammy-security/multiverse Translation-en [7060 B]
Get:17 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 c-n-f Metadata [260 B]
Get:18 http://archive.ubuntu.com/ubuntu jammy/universe Translation-en [5652 kB]
Get:19 http://archive.ubuntu.com/ubuntu jammy/universe amd64 c-n-f Metadata [286 kB]
Get:20 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [217 kB]
Get:21 http://archive.ubuntu.com/ubuntu jammy/multiverse Translation-en [112 kB]
Get:22 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 c-n-f Metadata [8372 B]
Get:23 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [1211 kB]
Get:24 http://archive.ubuntu.com/ubuntu jammy-updates/main Translation-en [253 kB]
Get:25 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 c-n-f Metadata [16.1 kB]
Get:26 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [1185 kB]
Get:27 http://archive.ubuntu.com/ubuntu jammy-updates/restricted Translation-en [192 kB]
Get:28 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 c-n-f Metadata [520 B]
Get:29 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1010 kB]
Get:30 http://archive.ubuntu.com/ubuntu jammy-updates/universe Translation-en [224 kB]
Get:31 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 c-n-f Metadata [22.1 kB]
Get:32 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [41.6 kB]
Get:33 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse Translation-en [9768 B]
Get:34 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 c-n-f Metadata [472 B]
Get:35 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 Packages [64.2 kB]
Get:36 http://archive.ubuntu.com/ubuntu jammy-backports/main Translation-en [10.5 kB]
Get:37 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 c-n-f Metadata [388 B]
Get:38 http://archive.ubuntu.com/ubuntu jammy-backports/restricted amd64 c-n-f Metadata [116 B]
Get:39 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [27.8 kB]
Get:40 http://archive.ubuntu.com/ubuntu jammy-backports/universe Translation-en [16.5 kB]
Get:41 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 c-n-f Metadata [644 B]
Get:42 http://archive.ubuntu.com/ubuntu jammy-backports/multiverse amd64 c-n-f Metadata [116 B]
Fetched 28.6 MB in 6s (4729 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  fontconfig-config fonts-dejavu-core libdeflate0 libfontconfig1 libgd3
  libjbig0 libjpeg-turbo8 libjpeg8 libnginx-mod-http-geoip2
  libnginx-mod-http-image-filter libnginx-mod-http-xslt-filter
  libnginx-mod-mail libnginx-mod-stream libnginx-mod-stream-geoip2 libtiff5
  libwebp7 libxpm4 nginx-common nginx-core
Suggested packages:
  libgd-tools fcgiwrap nginx-doc ssl-cert
<html><body><h2>Welcome to Azure! My name is my-vm.</h2></body></html>

[stderr]
 - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_jammy-security_universe_i18n_Translation-en - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_jammy-security_universe_binary-amd64_Packages - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_jammy-security_restricted_i18n_Translation-en - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_jammy-security_restricted_binary-amd64_Packages - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_jammy-security_main_i18n_Translation-en - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_jammy-security_main_binary-amd64_Packages - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-backports_universe_i18n_Translation-en - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-backports_universe_binary-amd64_Packages - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-backports_main_i18n_Translation-en - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-backports_main_binary-amd64_Packages - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-updates_multiverse_i18n_Translation-en - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-updates_multiverse_binary-amd64_Packages - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-updates_universe_i18n_Translation-en - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-updates_universe_binary-amd64_Packages - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-updates_restricted_i18n_Translation-en - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-updates_restricted_binary-amd64_Packages - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-updates_main_i18n_Translation-en - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-updates_main_binary-amd64_Packages - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy_multiverse_i18n_Translation-en - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy_multiverse_binary-amd64_Packages - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy_universe_i18n_Translation-en - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy_universe_binary-amd64_Packages - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy_restricted_i18n_Translation-en - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy_restricted_binary-amd64_Packages - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy_main_i18n_Translation-en - open (2: No such file or directory)
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy_main_binary-amd64_Packages - open (2: No such file or directory)
tee: /var/www/html/index.html: No such file or directory
". More information on troubleshooting is avai
Azure Azure Training
{count} vote

1 answer

Sort by: Most helpful
  1. RDash 2,495 Reputation points Microsoft External Staff
    2023-12-13T13:56:50.97+00:00

    Hi Saiprathap Margani ,

    We regret any inconvenience this may have caused.

    I've made multiple attempts to reproduce the issue, and I can confirm that the documented steps function correctly for me.

    Here's a brief rundown of the steps:

    1. Activate a new sandbox and create the VM as indicated in the Exercise (Step 1 under "Create a Linux VM and Install Nginx").
    2. After completing Step 1, Please activate new sandbox and create the VM as instructed in the exercise.
    3. After Task 1 finishes, make a note of the publicIpAddress that was assigned to the VM (e.g. 20.245.72.52). Start Task 2, and then when it errors out, follow steps below:

    Connect to the newly-created VM using ssh (in cloud shell). You will need to substitute the publicIpAddress you noted above for <VM public ip address> below:

    ssh azureuser@<VM public ip address>

    Enter yes when you are prompted.

    Copy and right-click -- paste the following three commands below in the cloud shell window. Wait for each to complete before pasting in the next command.

    sudo apt-get update
    
    sudo apt-get install -y nginx
    
    
    echo "<html><body><h2>Welcome to Azure! My name is $(hostname).</h2></body></html>" | sudo tee -a /var/www/html/index.html
    
    

    If the issue continues to persist, please do not hesitate to reach out to us.

    If you have found the answer provided to be helpful, please click on the "Accept answer" button so that it is useful for other members in the Microsoft Q&A community.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.