Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Unified Diff: bin/cros_run_vm_update

Issue 3427011: Update scripts for vm's (Closed) Base URL: http://git.chromium.org/git/crosutils.git
Patch Set: Fix mem Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bin/cros_run_vm_test ('k') | image_to_live.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/cros_run_vm_update
diff --git a/bin/cros_run_vm_update b/bin/cros_run_vm_update
new file mode 100755
index 0000000000000000000000000000000000000000..98ffef0e92cf846f37f5a96d866ade369057834b
--- /dev/null
+++ b/bin/cros_run_vm_update
@@ -0,0 +1,34 @@
+#!/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.
+#
+# Updates an existing vm image with another image.
+
+. "$(dirname $0)/../common.sh"
+. "$(dirname $0)/../lib/cros_vm_lib.sh"
+
+DEFINE_string stateful_flags "" "Flags to pass to stateful update." s
+DEFINE_string update_image_path "" "Path of the image to update to." u
+DEFINE_string vm_image_path "" "Path of the VM image to update from." v
+
+set -e
+
+# Parse command line.
+FLAGS "$@" || exit 1
+eval set -- "${FLAGS_ARGV}"
+
+[ -n "${FLAGS_update_image_path}" ] || \
+ die "You must specify a path to an image to use as an update."
+[ -n "${FLAGS_vm_image_path}" ] || \
+ die "You must specify a path to a vm image."
+
+trap stop_kvm EXIT
+start_kvm "${FLAGS_vm_image_path}"
+
+$(dirname $0)/../image_to_live.sh \
+ --remote=${HOSTNAME} \
+ --ssh_port=${FLAGS_ssh_port} \
+ --stateful_update_flag=${stateful_flags} \
+ --image=$(readlink -f ${FLAGS_update_image_path})
« no previous file with comments | « bin/cros_run_vm_test ('k') | image_to_live.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698