Move cros_start_vm and cros_stop_vm to src/scripts.

cros_start_vm and cros_stop_vm are only wrapper around
src/scripts/lib/cros_vm_lib.sh that live in src/platform/dev/host. They
are not installed on the chroot and are always called from the symlink
in src/scripts/bin. We don't need to have them live in
src/platform/dev/host.

BUG=None
TEST=manual: Can start and stop a vm from src/scripts/bin.
TEST=trybot run on *-generic-paladin.

Change-Id: I7290cd1a4030e51d89c2c64e84bb2cb39812877f
Reviewed-on: https://chromium-review.googlesource.com/274123
Trybot-Ready: Bertrand Simonnet <bsimonnet@chromium.org>
Tested-by: Bertrand Simonnet <bsimonnet@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Sheng-liang Song <ssl@chromium.org>
diff --git a/bin/cros_start_vm b/bin/cros_start_vm
deleted file mode 120000
index c5a8a0a..0000000
--- a/bin/cros_start_vm
+++ /dev/null
@@ -1 +0,0 @@
-../../platform/dev/host/cros_start_vm
\ No newline at end of file
diff --git a/bin/cros_start_vm b/bin/cros_start_vm
new file mode 100755
index 0000000..04877c5
--- /dev/null
+++ b/bin/cros_start_vm
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+#
+# Simple wrapper script to start a vm using the vm lib.
+. "$(dirname "$0")/../common.sh" || exit 1
+
+assert_outside_chroot
+
+. "${SCRIPTS_DIR}/lib/cros_vm_lib.sh" || die "Unable to load cros_vm_lib.sh"
+. "${SCRIPTS_DIR}/lib/cros_vm_constants.sh" || \
+  die "Unable to load cros_vm_constants.sh"
+
+DEFINE_string board "${DEFAULT_BOARD}" \
+    "Board for VM image (unnecessary if path given)"
+DEFINE_string image_path "" "Full path of the VM image"
+
+set -e
+
+# Parse command line.
+FLAGS "$@" || exit 1
+eval set -- "${FLAGS_ARGV}"
+
+# Use latest if not specified.
+if [ -z "${FLAGS_image_path}" ]; then
+  LATEST_IMAGE="$(${SCRIPTS_DIR}/get_latest_image.sh \
+          --board=${FLAGS_board})/${DEFAULT_QEMU_IMAGE}"
+  info "Using latest vm image ${LATEST_IMAGE}"
+  FLAGS_image_path=${LATEST_IMAGE}
+fi
+
+[ -e "${FLAGS_image_path}" ] || die "Image ${FLAGS_image_path} does not exist."
+
+start_kvm "${FLAGS_image_path}" "${FLAGS_board}"
+
+echo "ssh root@${HOSTNAME} -p ${FLAGS_ssh_port} -o StrictHostKeyChecking=no"
diff --git a/bin/cros_stop_vm b/bin/cros_stop_vm
deleted file mode 120000
index ba70171..0000000
--- a/bin/cros_stop_vm
+++ /dev/null
@@ -1 +0,0 @@
-../../platform/dev/host/cros_stop_vm
\ No newline at end of file
diff --git a/bin/cros_stop_vm b/bin/cros_stop_vm
new file mode 100755
index 0000000..093cf14
--- /dev/null
+++ b/bin/cros_stop_vm
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+#
+# Simple wrapper script to stop a vm specified from a pid file.
+. "$(dirname "$0")/../common.sh" || exit 1
+
+assert_outside_chroot
+
+. "${SCRIPTS_DIR}/lib/cros_vm_lib.sh" || die "Unable to load cros_vm_lib.sh"
+
+set -e
+
+# Parse command line.
+FLAGS "$@" || exit 1
+eval set -- "${FLAGS_ARGV}"
+
+# Requires pid file to be set.
+if [ -z "${FLAGS_kvm_pid}" ]; then
+  die "Must specify file with pid of kvm to kill."
+fi
+
+KVM_PID_FILE="${FLAGS_kvm_pid}"
+stop_kvm