You need to create a copy of a custom Compute Engine virtual machine (VM) to facilitate an expected increase in application traffic due to a business acquisition. What should you do?
A.
Create a Compute Engine snapshot of your base VM. Create your images from that snapshot.
B.
Create a Compute Engine snapshot of your base VM. Create your instances from that snapshot.
C.
Create a custom Compute Engine image from a snapshot. Create your images from that image.
D.
Create a custom Compute Engine image from a snapshot. Create your instances from that image.
Correct Answer is (D):
Preparing your instance for an image
You can create an image from a disk even while it is attached to a running VM instance. However, your image will be more reliable if you put the instance in a state that is easier for the image to capture. Use one of the following processes to prepare your boot disk for the image:
Stop the instance so that it can shut down and stop writing any data to the persistent disk.
If you can't stop your instance before you create the image, minimize the amount of writes to the disk and sync your file system.
Pause apps or operating system processes that write data to that persistent disk.
Run an app flush to disk if necessary. For example, MySQL has a FLUSH statement. Other apps might have similar processes.
Stop your apps from writing to your persistent disk.
Run sudo sync.
After you prepare the instance, create the image.
https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#prepare_instance_for_image
B:
we just need to make 'a copy' of the VM, B works well for that.
not D: Had the question mentioned more copies, we would need to go the way of images...templates etc. D will work but not needed here.
The correct algorithm is:
1. gcloud compute snapshots create
2. gcloud compute images create
3. gcloud compute instances create
Now, decide which one sounds more accurate for you:
- B. Create a Compute Engine snapshot of your base VM. Create your instances from that snapshot.
- D. Create a custom Compute Engine image from a snapshot. Create your instances from that image.
For me, D sounds more accurate, even though we assume we already have a snapshot.
Compute Engine snapshot? What is that?
There are snapshots of disks, or there are disk image from disk snapshots...
but here we need the VM image. Not the disks...
You can create custom images from source disks, images, snapshots, or images stored in Cloud Storage and use these images to create virtual machine (VM) instances. Custom images are ideal for situations where you have created and modified a persistent boot disk or specific image to a certain state and need to save that state for creating VMs.
You need to create image from the snapshot, so answer is D
https://cloud.google.com/compute/docs/images/create-custom#:~:text=You%20can%20create%20custom%20images,virtual%20machine%20(VM)%20instances.
You cannot directly create Compute Engine instances from a snapshot. Instances are created from images, not snapshots. The snapshot needs to be converted into a custom image first.
Choosing D, assuming there is schedule snapshots taken and we are moving forward using those snapshot for creating image and using that image for creating new VM. It is indeed very confusing, as we need to assume few things.
B&D are creating instance, so A&C are eliminated.
We need snapshot first, so answer is B.
D is out as there is no mention of snapshot from where image will be created.
Correct answer must be B:
While Option D: will work, there is NO mention of a pre-created snapshot, you cannot assume you already have a snapshot. For Option D: to work, the answer should read: Create a snapshot, then create a custom image from the snapshot, then create instances from that image....
The correct answer is B.
D is talking about "creating image from a snapshot" but what snapshot! we don't have one yet. so the B is the only full answer.
Option D says, Create a custom Compute Engine image from a snapshot. For this we have to create a Snapshot first, we would not like to use an old snapshot. If we have to create a Snapshot, then we can directly use that Snapshot to create a VM, which is option B.
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.
ESP_SAP
Highly Voted 4 years, 3 months agopca2b
Highly Voted 3 years, 8 months agodjgodzilla
3 years, 5 months agowolfie09
2 years, 5 months agoyomi95
Most Recent 3 weeks, 6 days agoiooj
2 months, 2 weeks agoccpmad
6 months agosinh
10 months, 2 weeks agoBuenaCloudDE
4 months agoBagibo
10 months, 3 weeks agoKair
11 months, 1 week agoogerber
11 months, 3 weeks agoVijKall
1 year agoVijKall
1 year agogpais
1 year, 1 month agogpais
1 year, 1 month agoNoCrapEva
1 year, 2 months agoAhmed_Y
1 year, 2 months agoCVGCP
1 year, 5 months agoTarkik
1 year, 6 months ago