don't reboot machine when create a running VM.
authorTim Abbott <tabbott@mit.edu>
Sat, 27 Oct 2007 20:55:25 +0000 (16:55 -0400)
committerTim Abbott <tabbott@mit.edu>
Sat, 27 Oct 2007 20:55:25 +0000 (16:55 -0400)
svn path=/trunk/packages/sipb-xen-remctl-auto/sipb-xen-remctl-auto/; revision=212

debian/changelog
files/usr/sbin/sipb-xen-vmcontrol

index 290807d..a536018 100644 (file)
@@ -1,3 +1,10 @@
+sipb-xen-remctl-auto (1.0.6) unstable; urgency=low
+
+  * get rid of old "vmboot" call
+  * make "create" not destroy running machines.
+
+ -- Tim Abbott <tabbott@sipb-xen-dev.mit.edu>  Sat, 27 Oct 2007 16:54:26 -0400
+
 sipb-xen-remctl-auto (1.0.5) unstable; urgency=low
 
   * move to common /usr/sbin/sipb-xen-* naming
 sipb-xen-remctl-auto (1.0.5) unstable; urgency=low
 
   * move to common /usr/sbin/sipb-xen-* naming
index bf72dbc..dbe3c36 100755 (executable)
@@ -17,8 +17,12 @@ case "$ACTION" in
     list|vcpu-list|destroy|uptime|shutdown)
         xm "$ACTION" "$MACHINE"
        ;;
     list|vcpu-list|destroy|uptime|shutdown)
         xm "$ACTION" "$MACHINE"
        ;;
-    reboot|create|vmboot)
-       xm destroy "$MACHINE" 2>/dev/null
+    create|reboot)
+       if [ "$ACTION" = "reboot" ]; then
+           xm destroy "$MACHINE" 2>/dev/null
+       else
+           xm list "$MACHINE" >/dev/null 2>/dev/null && echo "$MACHINE already exists" && exit 1
+       fi      
        if [ -n "$3" ]; then
            xm create sipb-database machine_name="$ORIGMACHINE" cdrom_image="$3"
        else
        if [ -n "$3" ]; then
            xm create sipb-database machine_name="$ORIGMACHINE" cdrom_image="$3"
        else