update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup version 0.1.7.7
authorJens Kasten <jens@kasten-edv.de>
Tue, 10 Apr 2012 10:29:41 +0200
changeset 122 c8c86db080e3
parent 121 886baf99fea5
child 123 4787c238712b
update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
README.txt
docs/qemu-kvm.example
setup.py
--- a/README.txt	Tue Apr 10 08:48:32 2012 +0200
+++ b/README.txt	Tue Apr 10 10:29:41 2012 +0200
@@ -3,6 +3,17 @@
 =========
 A commandline script to use a simple domain(guest) configuration file.
 
+
+=====
+Usage
+=====
+### kvm-admin ####
+usage: kvm-admin [-h] [--debug] [--verbose]
+                 {boot,create,kill,modify,monitor,reboot,show,shutdown,status}
+                 ...
+kvm-admin: error: too few arguments
+
+### kvm-admin -h ###
 usage: kvm-admin [-h] [--debug]
                  {boot,create,kill,modify,monitor,reboot,show,shutdown,status}
                  ...
@@ -17,6 +28,44 @@
   {boot,create,kill,modify,monitor,reboot,show,shutdown,status}
                         additional help
 
+-----------------------------------------------------------------------------
+### kvm-admin status all ###
+List all running qemu-kvm domains
+
+-----------------------------------------------------------------------------
+Arguments with optional arguments:
+
+### kvm-admin status -h ###
+usage: kvm-admin status [-h] [--full] domain
+
+positional arguments:
+  domain      Show information about qemu-kvm domain(s).
+
+optional arguments:
+  -h, --help  show this help message and exit
+  --full      Display full status information for each running qemu-kvm
+              domain.
+
+#### kvm-admin shutdown -h ###
+usage: kvm-admin shutdown [-h] [--time-out 'in seconds']
+                          [--wait-to-send-enter 'in seconds']
+                          domain
+
+positional arguments:
+  domain                Shutdown a qemu-kvm domain. Its work for windows and
+                        linux guests, but not on linux when the Xserver is
+                        looked.
+
+optional arguments:
+  -h, --help            show this help message and exit
+  --time-out 'in seconds'
+                        Set the time out for waiting till the qemu-kvm domain,
+                        will be killed.
+  --wait-to-send-enter 'in seconds'
+                        Set this will send, after a given time in seconds, an
+                        enter signal to the qemu-kvm domain for the grafical
+                        shutdown dialog.
+
 
 =========
 Depencies
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/qemu-kvm.example	Tue Apr 10 10:29:41 2012 +0200
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+qemu_kvm_auto="/etc/kvm/auto"
+qemu_kvm_run="/var/run/kvm"
+
+# second to wait befor the qemu-kvm domain get killed
+TIME_OUT=30
+# retry if it fails to boot
+RETRY=2
+
+start() {
+        for i in `ls $qemu_kvm_auto`; do
+            ebegin "Starting ${i}"
+            kvm-admin boot $i
+            eend $?
+        done
+}
+
+stop() {
+        for i in `ls $qemu_kvm_auto`; do
+            ebegin "Stopping ${i}"
+            kvm-admin shutdown $i --time-out $TIME_OUT
+            eend $?
+        done
+}
+
+
--- a/setup.py	Tue Apr 10 08:48:32 2012 +0200
+++ b/setup.py	Tue Apr 10 10:29:41 2012 +0200
@@ -49,7 +49,7 @@
 
 setup(
     name = "kvmtools",
-    version = "0.1.7.5",
+    version = "0.1.7.6",
     keywords = ["kvm-admin", "kvmtools"],
     author = "Jens Kasten",
     author_email = "jens@kasten-edv.de",