cros_vm_lib: Only stop KVM if the process is actually running.

Currently, if the KVM process dies, but the given kvm pid file is
correct, we try to send a command via the kvm monitor. This hangs
forever since the monitor is a pipe with no-one on the other side.

BUG=chromium:725620
TEST=cros_stop_vm after killing the qemu process manually.

Change-Id: I978198e9f9c5fdcc3fdd3893f37e9e1df1c79fc5
Reviewed-on: https://chromium-review.googlesource.com/802234
Commit-Ready: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
1 file changed