diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-11-01 12:07:59 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-11-01 12:07:59 -0200 |
commit | 1424d9116318e472874cc6df36d128db064d3f37 (patch) | |
tree | c2cf5b3b9704deb957e6ab1a7e52758a4a3f693f | |
parent | 083ae4169213e09218b1a354463dfc472922183b (diff) | |
download | kvmx-1424d9116318e472874cc6df36d128db064d3f37.tar.gz kvmx-1424d9116318e472874cc6df36d128db064d3f37.tar.bz2 |
Provision: start virtual machine if needed
-rwxr-xr-x | kvmx | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -184,7 +184,7 @@ function __kvmx_initialize { mkdir -p $STATE_DIR $LOG_DIR - if [ ! -e "$image" ] && [ "$ACTION" != "up" ] && [ "$ACTION" != "purge" ] \ + if [ ! -e "$image" ] && [ "$ACTION" != "up" ] && [ "$ACTION" != "provision" ] && [ "$ACTION" != "purge" ] \ && [ "$ACTION" != "destroy" ] && [ "$ACTION" != "install" ]; then echo "$BASENAME: file not found: $image" exit 1 @@ -966,8 +966,9 @@ function kvmx_purge { # Provision a machine function kvmx_provision { if ! kvmx_running; then - echo "$BASENAME: guest $VM is not running" - exit 1 + kvmx_up || exit 1 + #echo "$BASENAME: guest $VM is not running" + #exit 1 fi if [ -z "$provision_command" ]; then |