Virtual Machines 3 (TestTrack Unplugged)

I’ll assume you read the first post in the series or saw the list of all of the scenarios.

Virtual Machines 3

Things to note:

  • “noticed several snapshots on the datastore for the VM named Snapshot” = note no GUI reference, wonder if it doesn’t show in the GUI?
  • “Recover the Revision 1.3 environment” = DevOps by snapshot. Whoo hoo!
  • “Remove all snapshots” x2 = Ok, good marhcing orders.

Step 1: Check Snapshot VM

Who names these things?  Oh, me. Right.

Hey wait, there are no snapshots.  Cool, we must be done!

Or are we?  The description says the noticed on the datastore, I wonder…

Oops, there they are.  There are a few ways to fix it, but the fastest is probably via the GUI

Step 2: Consolidate 

Ok, so lets consolidate …

Hmm, I could have sworn there was a consolidate option available?

Ah, fat client to the rescue.  You could also create a snap in the WebClient and then use Delete All in Snapshot Manager.

Step 3: DevApp set to 1.3  

Ok, so time to revert DevApp to a prior state.  Only the prior state doesn’t seem to be an option.

until you twirl Version 1.1

Ok, select that and hit “Revert to” then watch the progress in the background

However, at this point you’ll hear a ding, notice the task has paused and an “!” has appeared on the VM name.

Closing the Snapshot Manager and looking at the VM summary we see

which says:
The features supported by the processors in this machine are different from the features supported by the processors in the machine on which the virtual machine state was saved.
Resume on a machine with similar processors.
An error occurred while restoring the CPU state from file "/vmfs/volumes/blah/,vm name>/<vm name>-Snapshot19.vmsn".
An error caused the restore operation to fail. Cancel the restore operation and correct the error, or discard the snapshot's state and power off. The saved snapshot will not be affected.
and gives us two options, cancel or discard.

Step 4: Answer the question 

The issue is because we captured a snapshot with memory of a running VM when the VM was running on a different host with a different CPU instruction set.

The only option to meet the stated requirements is to “discard” and get a crash-consistent state instead of a live one.

Step 5: Answer the question 

Don’t forget to go back into Snapshot Manager and delete all the other snapshots!

Scoring

Were the snaps consolidated on Snapshot?
if (Get-Datastore -name iSCSISharedVMs | get-harddisk |where {$_.filename -eq "[iSCSISharedVMs] Snapshot/Snapshot-000001.vmdk"}) {} Else {$VM3Snapshot = 1}

Was the correct snap set on DevApp?
if ((get-vm devapp).MemoryGB -eq .75) {$VM3DevApp1 = 1}

Were all other snaps deleted on DevApp?
if (!(get-snapshot -vm devapp)) {$VM3DevApp2 = 1}

Bonus round:
Note the scoring on the second point. The VM had .5GB of RAM for every snapshot except for 1.3 where RAM was changed to .75. That is a very simple way to verify that the correct snap was selected.

This entry was posted in Certification, PowerShell, Scripting, Virtualization, VMware. Bookmark the permalink.

Leave a Reply