You have a virtual machine that is currently configured with 2 vCPUs and 4 GB of memory. It is running out of memory. You want to upgrade the virtual machine to have 8 GB of memory. What should you do?
A.
Rely on live migration to move the workload to a machine with more memory.
B.
Use gcloud to add metadata to the VM. Set the key to required-memory-size and the value to 8 GB.
C.
Stop the VM, change the machine type to n1-standard-8, and start the VM.
D.
Stop the VM, increase the memory to 8 GB, and start the VM.
D is correct. If you pay attention to the question, option C mentions n1-standard-8. That instance type has 8vCPUs and 30 GB RAM, and we only need 8GB. On top of that, it is possible to use custom machine type to adjust current VM RAM to the value we need. Got the answer from this course I did to prepare the exam: https://www.udemy.com/course/google-cloud-associate-engineer-exam-practice-tests/?couponCode=21CDE6A4C2B95F79BD97
good luck!
ANSWER D is correct because it is the correct process to follow to increase the memory of a virtual machine in the Google Cloud Platform.
To increase the memory of a virtual machine, you need to first stop the VM, since it is not possible to modify the memory of a running VM. Then, you can increase the memory of the VM by editing the machine type and selecting a machine type with more memory. Once you have made the change, you can start the VM again.
ANSWER A is not the best approach as it relies on live migration which can be a risky operation.
ANSWER B is incorrect because adding metadata to the VM will not change the amount of memory allocated to the VM.
ANSWER C is incorrect because changing the machine type to n1-standard-8 would also increase the number of vCPUs to 8, which may not be necessary and could result in overprovisioning of resources. In addition, changing the machine type would also affect the cost of the VM instance, which may not be desired. Since the primary concern in this scenario is to increase memory.
The reason A is not correct is because live migration simply moves an existing VM between hosts, no attributes or properties are changed otherwise. Hence, you cannot live migrate from 1 VM type to another.
https://cloud.google.com/compute/docs/instances/live-migration
To be exact... There is no "n1" option that has 2vCPU and 4GB. The closest would be n1-standard-2 with 2vCPU and 7.50GB RAM. This machine is already custom. So, option D.
We do not have the option to increase memory in GCP VM directly. Instead, machine type needs to be changed. However, given the choices, D is the best answer here.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
cesar7816
Highly Voted 4 years, 8 months agoiambatmanadarkknight
3 years, 1 month agospatidar2711
2 years, 4 months agochikorita
1 year, 7 months agoCarlS
Highly Voted 4 years, 7 months agoVeera_Venkata_Satyanarayana
2 years, 5 months agomartin2099
Most Recent 2 weeks, 4 days agoCaptain1212
1 year, 2 months agogpais
1 year, 3 months agosamrat46
1 year, 8 months agoBuruguduystunstugudunstuy
1 year, 9 months agocslince
1 year, 11 months agoleogor
2 years, 1 month agosanthu1039
2 years, 3 months agoharoldbenites
2 years, 5 months agoChiefArch
2 years, 7 months agomchaconr
2 years, 11 months agovishnukumartr
3 years agoJaira1256
3 years agoGpjha
3 years, 3 months agoYAS007
3 years, 3 months ago