Skip to content

Instantly share code, notes, and snippets.

@nov05
Last active May 11, 2026 06:38
Show Gist options
  • Select an option

  • Save nov05/4463f61397b1d371558faa2fca7f4d18 to your computer and use it in GitHub Desktop.

Select an option

Save nov05/4463f61397b1d371558faa2fca7f4d18 to your computer and use it in GitHub Desktop.

⚠️ The original script can't pass Task 1 check.

https://github.com/nov05/gcp-skills-boost/tree/dev/Create%20a%20Virtual%20Machine

Welcome to Cloud Shell! Type "help" to get started, or type "gemini" to try prompting with Gemini CLI.
Your Cloud Platform project in this session is set to qwiklabs-gcp-01-f1fe7040de18.
Use `gcloud config set project [PROJECT_ID]` to change to a different project.
student_01_0969eef077e9@cloudshell:~ (qwiklabs-gcp-01-f1fe7040de18)$ curl -LO https://raw.githubusercontent.com/Itsabhishek7py/GoogleCloudSkillsboost/main/Create%20a%20Virtual%20Machine/gsp001.sh
sudo chmod +x gsp001.sh
./gsp001.sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3030  100  3030    0     0  67540      0 --:--:-- --:--:-- --:--:-- 68863
Starting Execution
Your active configuration is: [cloudshell-32620]
Created [https://www.googleapis.com/compute/v1/projects/qwiklabs-gcp-01-f1fe7040de18/zones/us-east1-c/instances/gcelab].
WARNING: Some requests generated warnings:
 - The resource 'projects/debian-cloud/global/images/debian-11-bullseye-v20241009' is deprecated. A suggested replacement is 'projects/debian-cloud/global/images/debian-11-bullseye-v20241112'.

NAME: gcelab
ZONE: us-east1-c
MACHINE_TYPE: e2-medium
PREEMPTIBLE: 
INTERNAL_IP: 10.142.0.2
EXTERNAL_IP: 34.148.166.45
STATUS: RUNNING
Created [https://www.googleapis.com/compute/v1/projects/qwiklabs-gcp-01-f1fe7040de18/zones/us-east1-c/instances/gcelab2].
NAME: gcelab2
ZONE: us-east1-c
MACHINE_TYPE: e2-medium
PREEMPTIBLE: 
INTERNAL_IP: 10.142.0.3
EXTERNAL_IP: 35.227.26.250
STATUS: RUNNING
WARNING: The private SSH key file for gcloud does not exist.
WARNING: The public SSH key file for gcloud does not exist.
WARNING: You do not have an SSH key for gcloud.
WARNING: SSH keygen will be executed to generate a key.
Generating public/private rsa key pair.
Your identification has been saved in /home/student_01_0969eef077e9/.ssh/google_compute_engine
Your public key has been saved in /home/student_01_0969eef077e9/.ssh/google_compute_engine.pub
The key fingerprint is:
SHA256:WdCE03oN50hWL2cAf5nbYD/bkcykMgaHgMcso0HUELo student_01_0969eef077e9@cs-81852633492-default
The key's randomart image is:
+---[RSA 3072]----+
|  o=+ +..=ooo    |
|  .. = ++.B..o o |
| .  o +  B.Bo X. |
|  ..    .o= o*==.|
| E      S. + ..*o|
|          . o   =|
|               ..|
|                 |
|                 |
E: The repository 'https://deb.debian.org/debian bullseye-backports Release' no longer has a Release file.
Creating firewall...working..Created [https://www.googleapis.com/compute/v1/projects/qwiklabs-gcp-01-f1fe7040de18/global/firewalls/allow-http].                                               
Creating firewall...done.                                                                                                                                                                     
NAME: allow-http
NETWORK: default
DIRECTION: INGRESS
PRIORITY: 1000
ALLOW: tcp:80
DENY: 
DISABLED: False

**************************************************
*      πŸŽ‰ CONGRATULATIONS FOR COMPLETING THE LAB! πŸŽ‰      *
**************************************************
*    πŸ‘ DON'T FORGET TO SUBSCRIBE TO MY CHANNEL! πŸ‘    *
**************************************************
          πŸ”— https://www.youtube.com/@drabhishek.5460 πŸ”—          

student_01_0969eef077e9@cloudshell:~ (qwiklabs-gcp-01-f1fe7040de18)$ 
@nov05

nov05 commented May 11, 2026

Copy link
Copy Markdown
Author

βœ… The new script passed all the lab checks.

nov05/gcp-skills-boost@90d2fd7

Welcome to Cloud Shell! Type "help" to get started, or type "gemini" to try prompting with Gemini CLI.
Your Cloud Platform project in this session is set to qwiklabs-gcp-02-d30a2a5518d7.
Use `gcloud config set project [PROJECT_ID]` to change to a different project.
student_04_3dedbc53799d@cloudshell:~ (qwiklabs-gcp-02-d30a2a5518d7)$ rm -f nov05_GSP001.sh
curl -LO https://raw.githubusercontent.com/nov05/gcp-skills-boost/refs/heads/dev/Create%20a%20Virtual%20Machine/nov05_GSP001.sh
sudo chmod +x nov05_GSP001.sh
./nov05_GSP001.sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2050  100  2050    0     0   8868      0 --:--:-- --:--:-- --:--:--  8836

============================================
           Starting Execution
============================================

Your active configuration is: [cloudshell-23646]
Creating firewall...working..Created [https://www.googleapis.com/compute/v1/projects/qwiklabs-gcp-02-d30a2a5518d7/global/firewalls/allow-http].                                               
Creating firewall...done.                                                                                                                                                                     
NAME: allow-http
NETWORK: default
DIRECTION: INGRESS
PRIORITY: 1000
ALLOW: tcp:80
DENY: 
DISABLED: False
Created [https://www.googleapis.com/compute/v1/projects/qwiklabs-gcp-02-d30a2a5518d7/zones/us-east4-c/instances/gcelab].
NAME: gcelab
ZONE: us-east4-c
MACHINE_TYPE: e2-medium
PREEMPTIBLE: 
INTERNAL_IP: 10.150.0.2
EXTERNAL_IP: 136.107.87.135
STATUS: RUNNING
VM gcelab Current status: RUNNING
Generating public/private rsa key pair.
Your identification has been saved in /home/student_04_3dedbc53799d/.ssh/google_compute_engine
Your public key has been saved in /home/student_04_3dedbc53799d/.ssh/google_compute_engine.pub
The key fingerprint is:
SHA256:wQs+WnWhi28p5s/wR77quu2QI5UE2L+QVb7Gu0T7B+Y student_04_3dedbc53799d@cs-793056175176-default
The key's randomart image is:
+---[RSA 3072]----+
|   o.  .. .      |
|  . ...o . .     |
|     +o * .      |
|    oo.* *       |
|     .B.S        |
|     +.* ++      |
|    o B B= .     |
|     + @ oE .    |
|      +*Xooo     |
+----[SHA256]-----+
Waiting for gcelab SSH readiness...
ready
Get:1 file:/etc/apt/mirrors/debian.list Mirrorlist [30 B]
Get:5 file:/etc/apt/mirrors/debian-security.list Mirrorlist [39 B]
Hit:2 https://deb.debian.org/debian bookworm InRelease
Get:3 https://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
Get:4 https://deb.debian.org/debian bookworm-backports InRelease [59.4 kB]
Get:6 https://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:7 https://packages.cloud.google.com/apt google-compute-engine-bookworm-stable InRelease [1321 B]
Get:8 https://deb.debian.org/debian bookworm-backports/main Sources.diff/Index [63.3 kB]
Get:9 https://deb.debian.org/debian bookworm-backports/main amd64 Packages.diff/Index [63.3 kB]
Get:10 https://deb.debian.org/debian bookworm-backports/main Translation-en.diff/Index [63.3 kB]
Get:11 https://deb.debian.org/debian bookworm-backports/main Sources T-2026-05-11-0202.39-F-2026-05-01-2023.32.pdiff [30.8 kB]
Get:12 https://deb.debian.org/debian bookworm-backports/main amd64 Packages T-2026-05-10-2000.41-F-2026-05-02-0803.20.pdiff [7967 B]
Get:12 https://deb.debian.org/debian bookworm-backports/main amd64 Packages T-2026-05-10-2000.41-F-2026-05-02-0803.20.pdiff [7967 B]
Get:11 https://deb.debian.org/debian bookworm-backports/main Sources T-2026-05-11-0202.39-F-2026-05-01-2023.32.pdiff [30.8 kB]
Get:13 https://deb.debian.org/debian bookworm-backports/main Translation-en T-2026-05-10-1400.48-F-2026-05-02-0803.20.pdiff [5321 B]
Get:14 https://packages.cloud.google.com/apt cloud-sdk-bookworm InRelease [1656 B]
Get:13 https://deb.debian.org/debian bookworm-backports/main Translation-en T-2026-05-10-1400.48-F-2026-05-02-0803.20.pdiff [5321 B]
Get:15 https://deb.debian.org/debian-security bookworm-security/main Sources [199 kB]
Get:16 https://deb.debian.org/debian-security bookworm-security/main amd64 Packages [303 kB]
Get:17 https://deb.debian.org/debian-security bookworm-security/main Translation-en [186 kB]
Get:18 https://packages.cloud.google.com/apt cloud-sdk-bookworm/main amd64 Packages [4767 kB]
Get:19 https://packages.cloud.google.com/apt cloud-sdk-bookworm/main all Packages [2027 kB]
Fetched 7883 kB in 2s (4863 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  nginx-common
Suggested packages:
  fcgiwrap nginx-doc ssl-cert
The following NEW packages will be installed:
  nginx nginx-common
0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded.
Need to get 641 kB of archives.
After this operation, 1696 kB of additional disk space will be used.
Get:1 file:/etc/apt/mirrors/debian-security.list Mirrorlist [39 B]
Get:2 https://deb.debian.org/debian-security bookworm-security/main amd64 nginx-common all 1.22.1-9+deb12u4 [113 kB]
Get:3 https://deb.debian.org/debian-security bookworm-security/main amd64 nginx amd64 1.22.1-9+deb12u4 [528 kB]
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7, <> line 2.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin: 
Fetched 641 kB in 0s (6572 kB/s)
Selecting previously unselected package nginx-common.
(Reading database ... 58616 files and directories currently installed.)
Preparing to unpack .../nginx-common_1.22.1-9+deb12u4_all.deb ...
Unpacking nginx-common (1.22.1-9+deb12u4) ...
Selecting previously unselected package nginx.
Preparing to unpack .../nginx_1.22.1-9+deb12u4_amd64.deb ...
Unpacking nginx (1.22.1-9+deb12u4) ...
Setting up nginx-common (1.22.1-9+deb12u4) ...
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Created symlink /etc/systemd/system/multi-user.target.wants/nginx.service β†’ /lib/systemd/system/nginx.service.
Setting up nginx (1.22.1-9+deb12u4) ...
Upgrading binary: nginx.
Processing triggers for man-db (2.11.2-2) ...
student+     912  0.0  0.0   4352  3048 ?        Ss   06:30   0:00 bash -c sudo apt-get update && sudo apt-get install -y nginx && ps auwx | grep nginx
root        1364  0.0  0.1  10376  6728 ?        S    06:30   0:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
www-data    1367  0.0  0.2  25576  8940 ?        S    06:30   0:00 nginx: worker process
www-data    1368  0.0  0.2  25576  8924 ?        S    06:30   0:00 nginx: worker process
student+    1378  0.0  0.0   3752  1816 ?        S    06:30   0:00 grep nginx
Created [https://www.googleapis.com/compute/v1/projects/qwiklabs-gcp-02-d30a2a5518d7/zones/us-east4-c/instances/gcelab2].
NAME: gcelab2
ZONE: us-east4-c
MACHINE_TYPE: e2-medium
PREEMPTIBLE: 
INTERNAL_IP: 10.150.0.3
EXTERNAL_IP: 34.186.100.170
STATUS: RUNNING

============================================
Task 2. Install an NGINX web server
============================================

πŸ‘‰ Check http://136.107.87.135
A default web page should open that says: Welcome to nginx!
student_04_3dedbc53799d@cloudshell:~ (qwiklabs-gcp-02-d30a2a5518d7)$ 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment