aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/disk-image-builder/nested/image-patches/04-qemu-ga
diff options
context:
space:
mode:
authorCarsten Koester <ckoester@cisco.com>2016-06-13 06:39:40 -0400
committerDave Wallace <dwallacelf@gmail.com>2016-08-01 14:52:10 +0000
commitbb847371cf77f1fac6579d0444d6168b5b43c2a0 (patch)
treefd4b84edcda8535033b436d6f3f39cd432350107 /resources/tools/disk-image-builder/nested/image-patches/04-qemu-ga
parentec3512ff7f1405f2e7bc74bbfadf5691afc352c4 (diff)
CSIT-156: DPDK support for Nested VM image
Change-Id: Iefa9ec90d1b243c9e1108f63a182c3d9ef6e6474 Signed-off-by: Carsten Koester <ckoester@cisco.com>
Diffstat (limited to 'resources/tools/disk-image-builder/nested/image-patches/04-qemu-ga')
-rwxr-xr-xresources/tools/disk-image-builder/nested/image-patches/04-qemu-ga33
1 files changed, 33 insertions, 0 deletions
diff --git a/resources/tools/disk-image-builder/nested/image-patches/04-qemu-ga b/resources/tools/disk-image-builder/nested/image-patches/04-qemu-ga
new file mode 100755
index 0000000000..2897260d10
--- /dev/null
+++ b/resources/tools/disk-image-builder/nested/image-patches/04-qemu-ga
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+cat - > etc/init.d/S45qemu-ga <<"_EOF"
+#!/bin/sh
+#
+# Start QEMU guest agent
+#
+QEMU_GA_MODE="isa-serial"
+QEMU_GA_DEV="/dev/ttyS1"
+
+case "$1" in
+ start)
+ echo "Starting qemu guest agent..."
+ /usr/bin/qemu-ga -m $QEMU_GA_MODE -p $QEMU_GA_DEV -d
+ ;;
+ stop)
+ echo "Stopping quemu guest agent..."
+ killall qemu-ga
+ ;;
+ restart|reload)
+ "$0" stop
+ "$0" start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
+esac
+
+exit $?
+_EOF
+
+chown root.root etc/init.d/S45qemu-ga
+chmod 755 etc/init.d/S45qemu-ga