
Answer-first summary for fast verification
Answer: 1. Stop the VM. 2. Change the machine type to n1-standard-8. 3. Start the VM.
The correct approach is to stop the VM, change the machine type to n1-standard-8, and then start the VM. This is because the amount of RAM is tied to the machine type, and you cannot independently increase RAM without changing the machine type. Stopping the VM is necessary before changing the machine type, as required by the Compute Engine platform. Other options are incorrect because: - **A. Live Migration**: While useful for moving VMs, it doesn't directly address insufficient memory and still requires changing the machine type with some downtime. - **B. Updating Metadata**: VM metadata does not control RAM allocation; it's for storing key-value pairs. - **D. Increasing Memory Directly**: There's no option to directly increase memory on a running VM; changing the machine type is required, which necessitates a VM restart. For more details, refer to [Google Cloud documentation](https://cloud.google.com/compute/docs/instances/changing-machine-type-of-stopped-instance) and [Live Migration](https://cloud.google.com/compute/docs/instances/live-migration).
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
Your blogging website, hosted on a Compute Engine instance with 2 vCPUs and 4 GB of memory, has suddenly gained traffic after being featured in a popular technology magazine. This surge is causing the VM to run out of memory. How should you upgrade the VM to 8 GB of memory?
A
Execute a live migration to transfer the workload to a machine with more memory.
B
C
D
No comments yet.