diff options
-rwxr-xr-x | kvmx | 13 | ||||
-rw-r--r-- | kvmxfile | 8 |
2 files changed, 15 insertions, 6 deletions
@@ -342,8 +342,17 @@ function kvmx_purge { # Provision a machine function kvmx_provision { - echo "TODO: provision" - exit 1 + if ! kvmx_running; then + echo "$BASENAME: guest $VM is not running" + exit 1 + fi + + if [ -z "$provision_script" ]; then + echo "$BASENAME: error: parameter provision_script is not configured for $VM." + exit 1 + fi + + echo "sudo $provision_script" | kvmx_ssh } # Print guest image file name @@ -5,12 +5,12 @@ # Which base box you should use. Leave unconfigured to use kvmx-create instead. #basebox="stretch" -# Absolute or relative path for a provision script. -#provision_script="default" - # Set this is you want to be able to share folders between host and guest. shared_folder="." -shared_folder_mountpoint="/media/shared" +shared_folder_mountpoint="/home/user/$VM" + +# Absolute path for a provision script located inside the guest. +#provision_script="/home/user/$VM/provision" # Set this if you want to automatically attach an spice client when the machine # boots. |