VMAuWorker: save VM memory in case of VMTest failure

Saving the memory will enable inspection of the run-time state
of the VM, at the time VMTest ended.

While there: capture VM state in a separate try block from
log files. We should try to capture VM state even if we have
some trouble with log files.

BUG=chromium:321855
TEST=Manual (see below)
CQ-DEPEND=CL:177476
CQ-DEPEND=CL:178625

Manual test
-----------
- Download and untar
  https://storage.cloud.google.com/chromeos-image-archive/trybot-amd64-generic-paladin/R33-5064.0.0-b684/attempt1_failed_SimpleTestVerify_1_autotest_tests_vm_state.tar
- cd vm_state
- cros_start_vm --ssh_port=9230 --image_path=$PWD/vm_disk.bin --mem_path=$PWD/vm_memory.bin
  you should see the login screen without first seeing the boot logo

Change-Id: Id3e9f7031b703ffee3ed1673454d17a2b92fc200
Reviewed-on: https://chromium-review.googlesource.com/178636
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Queue: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
1 file changed