diff options
author | Benjamin Cohen <bencoh@notk.org> | 2012-04-16 14:28:19 +0200 |
---|---|---|
committer | Benjamin Cohen <bencoh@notk.org> | 2012-04-16 14:28:19 +0200 |
commit | 51448c00f9f206ad66040b14655aa53300b1a3c6 (patch) | |
tree | bcb3dce745d2ee953a3be44f3d605204af3ed4c7 | |
parent | fd0d541b269588d57d5454fe513f717ca9792d0c (diff) |
- Change kvm process name
- Print help when wrong command/no VM name
-rwxr-xr-x | kvm-wrapper.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kvm-wrapper.sh b/kvm-wrapper.sh index 63f9089..ca86f33 100755 --- a/kvm-wrapper.sh +++ b/kvm-wrapper.sh @@ -456,7 +456,7 @@ function kvm_start_vm () KVM_SERIALDEV="-serial unix:$SERIAL_FILE,server,nowait" # Build kvm exec string - local EXEC_STRING="$KVM_BIN -name $VM_NAME -m $KVM_MEM -smp $KVM_CPU_NUM $KVM_NET $KVM_DRIVES $KVM_BOOTDEVICE $KVM_KEYMAP $KVM_OUTPUT $LINUXBOOT $KVM_MONITORDEV $KVM_SERIALDEV -pidfile $PID_FILE $KVM_ADDITIONNAL_PARAMS" + local EXEC_STRING="$KVM_BIN -name $VM_NAME,process="kvm-$VM_NAME" -m $KVM_MEM -smp $KVM_CPU_NUM $KVM_NET $KVM_DRIVES $KVM_BOOTDEVICE $KVM_KEYMAP $KVM_OUTPUT $LINUXBOOT $KVM_MONITORDEV $KVM_SERIALDEV -pidfile $PID_FILE $KVM_ADDITIONNAL_PARAMS" # More sanity checks : VM running, monitor socket existing, etc. if [[ -z "$FORCE" ]]; then @@ -994,6 +994,10 @@ case "$1" in ;; esac +if [[ $# -le 1 ]]; then + print_help + exit 0 +fi kvm_init_env "$2" test_nodename "$KVM_CLUSTER_NODE" && { run_remote $KVM_CLUSTER_NODE $ROOTDIR/kvm-wrapper.sh $@; exit $?; } |