Professional Cloud Architect Practice Questions

Google Cloud Professional Cloud Architect exam preparation

Professional Cloud Architect practice questions in English: 180 questions with explanations. The mock exam has 60 questions and 120 minutes.

Professional Cloud Architect free question 9 / 10 · Domain 5: Managing implementation

In Cloud Shell, you installed a CLI tool with apt into a system location and used it. When you opened Cloud Shell the next day, the tool was gone. You want it to be ready to use every time from now on. Which option matches How Cloud Shell works?

  1. Leave the session open so that the VM stays until the next day even when idle, so that the tool is ready to use every time
  2. Keep the Cloud Shell VM, tools included, as a VM in your own project and leave it running so that it is ready to use every time
  3. Install the tool under $HOME, or use an environment customization that installs it at VM start, so it is ready every time
  4. Expand the persistent disk so that tools in system locations are kept as well, so that the tool is ready to use every time
Show the answer and explanation

Answer: C

Why this is correct
The page says you can install additional software packages on the VM instance, but the installation will not persist after the instance terminates unless you install the software in your $HOME directory or create a custom environment. The $HOME directory is backed by 5 GB of free persistent disk storage, and everything you store there, including installed software, scripts, and user configuration files like .bashrc, persists between sessions. An environment customization script can also set up the environment when the VM starts.

Why the other options are wrong
"Keep the Cloud Shell VM, tools included, as a VM in your own project and leave it running so that it is ready to use every time" … The page says the Cloud Shell VM is owned and managed by Google Cloud and does not appear within any of your Google Cloud projects. You cannot keep it as a VM in your own project.
"Expand the persistent disk so that tools in system locations are kept as well, so that the tool is ready to use every time" … The page says that when using Cloud Shell you cannot expand persistent disk storage space. The persistent disk is mounted as your $HOME directory and is not a mechanism for keeping what you install in system locations. For more control over persistence and more storage space, the page points to Cloud Workstations.
"Leave the session open so that the VM stays until the next day even when idle, so that the tool is ready to use every time" … The page says the instance persists while your Cloud Shell session is active, but after an hour of inactivity the session terminates and its VM is discarded. Leaving the session open does not keep the VM until the next day if there is no activity.

Key point
Cloud Shell provisions a temporary Debian-based VM per user and session, and by default you work in a Docker container running on that VM. Ephemeral mode, which has no persistent disk, starts faster but loses the files you create at the end of the session. The container image is updated weekly, so the gcloud CLI and Docker are at their latest versions.

Go to the Professional Cloud Architect practice app (10 free questions; purchase unlocks all questions)

See the full practice set