https://github.com/nov05/gcp-skills-boost/tree/dev/Creating%20a%20Persistent%20Disk
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-03-df11d5f22b4b.
Use `gcloud config set project [PROJECT_ID]` to change to a different project.
student_04_da5e6ebc25be@cloudshell:~ (qwiklabs-gcp-03-df11d5f22b4b)$ curl -LO https://raw.githubusercontent.com/Itsabhishek7py/GoogleCloudSkillsboost/refs/heads/main/Creating%20a%20Persistent%20Disk/abhishek.sh
sudo chmod +x abhishek.sh
./abhishek.sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3677 100 3677 0 0 10785 0 --:--:-- --:--:-- --:--:-- 10910
╔════════════════════════════════════════════════════════╗
Welcome to Dr abhishek Cloud Tutorials...
╚════════════════════════════════════════════════════════╝
Enter ZONE: us-east4-c
========================== Setting the compute zone and region ==========================
Updated property [compute/zone].
Updated property [compute/region].
========================== Creating a compute instance 'gcelab' ==========================
Created [https://www.googleapis.com/compute/v1/projects/qwiklabs-gcp-03-df11d5f22b4b/zones/us-east4-c/instances/gcelab].
NAME: gcelab
ZONE: us-east4-c
MACHINE_TYPE: e2-standard-2
PREEMPTIBLE:
INTERNAL_IP: 10.150.0.2
EXTERNAL_IP: 34.85.142.34
STATUS: RUNNING
========================== Creating a disk 'mydisk' of 200GB ==========================
Created [https://www.googleapis.com/compute/v1/projects/qwiklabs-gcp-03-df11d5f22b4b/zones/us-east4-c/disks/mydisk].
NAME: mydisk
ZONE: us-east4-c
SIZE_GB: 200
TYPE: pd-standard
STATUS: READY
New disks are unformatted. You must format and mount a disk before it
can be used. You can find instructions on how to do this at:
For Linux: https://cloud.google.com/compute/docs/disks/format-mount-disk-linux
For Windows: https://cloud.google.com/compute/docs/disks/format-mount-disk-windows
========================== Attaching disk 'mydisk' to instance 'gcelab' ==========================
Updated [https://www.googleapis.com/compute/v1/projects/qwiklabs-gcp-03-df11d5f22b4b/zones/us-east4-c/instances/gcelab].
========================== Creating the 'prepare_disk.sh' script ==========================
========================== Transfering script 'prepare_disk.sh' to 'gcelab' instance ==========================
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_04_da5e6ebc25be/.ssh/google_compute_engine
Your public key has been saved in /home/student_04_da5e6ebc25be/.ssh/google_compute_engine.pub
The key fingerprint is:
SHA256:x6wS+kRzwsgcqe8aVW6QoO93PozPvdev1UqFmaqljZM student_04_da5e6ebc25be@cs-433647997079-default
The key's randomart image is:
+---[RSA 3072]----+
| . |
| . . o |
|. = . |
| . + B o + |
| o = O S + + .|
| . o + = o . o |
| o +o+ . oo o .|
| +.*oo E*.o . |
| ....=.oo+.ooo |
+----[SHA256]-----+
ssh: connect to host 34.85.142.34 port 22: Connection refused
/usr/bin/scp: Connection closed
ERROR: (gcloud.compute.scp) [/usr/bin/scp] exited with return code [255].
========================== Executing the 'prepare_disk.sh' script on 'gcelab' ==========================
ssh: connect to host 34.85.142.34 port 22: Connection refused
Recommendation: To check for possible causes of SSH connectivity issues and get
recommendations, rerun the ssh command with the --troubleshoot option.
gcloud compute ssh gcelab --project=qwiklabs-gcp-03-df11d5f22b4b --zone=us-east4-c --troubleshoot
Or, to investigate an IAP tunneling issue:
gcloud compute ssh gcelab --project=qwiklabs-gcp-03-df11d5f22b4b --zone=us-east4-c --troubleshoot --tunnel-through-iap
ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255].
╔════════════════════════════════════════════════════════╗
Lab Completed Successfully!
╚════════════════════════════════════════════════════════╝
Subscribe to Dr. Abhishek Cloud Tutorials: https://www.youtube.com/@drabhishek.5460/videos
✅ Created a new script
nov05_GSP004.shand it passed all the lab checks.