VMAUWorker: change handling of VM disk images

This CL makes two changes to how we handle VM disk images:
- VMAUWorker takes responsibility for making a private copy of
  the VM disk image, instead of leaving that to cros_vm_lib.sh
- If the update failed, or if verification of the image failed,
  move the private copy of the VM disk image to the |fail_directory|.

These two changes work in concert with CL:175329, to archive VM
disk images when a VMTest fails.

The rationale for having VMAUWorker make the private copy is two-fold:
- If cros_vm_lib.sh makes the copy, then we need to communicate
  the disk image name back to VMAUWorker (so that the disk image
  can be archived properly).
- We eliminate a possible problem with "--persist" and copying.
  Previously, if we ran UpdateImage, and then stopped the VM
  before running VerifyImage, then VerifyImage would run with a
  fresh copy of the VM disk image. Now, we know that UpdateImage
  and VerifyImage will use the same disk image.

BUG=chromium:311837
CQ-DEPEND=CL:175329
TEST=See test stanza in CL:175329

Change-Id: Ia2040e6a2494cb21e73fc5ca2d60ce0b43aaa549
Reviewed-on: https://chromium-review.googlesource.com/177133
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
Commit-Queue: mukesh agrawal <quiche@chromium.org>
1 file changed