cros_vm_lib: add support for copying image

We sometimes see failures where we are unable to log in to the VM
over ssh. In these cases, we can't fetch log files for the VM,
because we normally do that via ssh.

We could fall back to mounting the VM's filesystem image, if not
for the fact that we use "-snapshot", which saves deltas to temporary
files.

Add an option to cros_vm_lib, so that we can start VMs with private
copies of the image file, and persist filesystem changes to that
private copy.

BUG=chromium:212084
TEST=trybot on amd64-generic-paladin, x86-generic-paladin, daisy-paladin

Change-Id: I30da0d4ca034a35cba64c403b736ba8db107a513
Reviewed-on: https://gerrit.chromium.org/gerrit/63111
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
Commit-Queue: mukesh agrawal <quiche@chromium.org>
1 file changed