tools: nm-in-vm: fix error if pool folder doesn't exist yet

If libvirt's default pool folder doesn't exist yet (i.e. the user has
never installed a VM there), create it to avoid error and script exit.
This commit is contained in:
Íñigo Huguet 2023-09-06 12:38:07 +02:00
parent 0ec71289ed
commit 52c347677f

View File

@ -421,6 +421,7 @@ while (( $# > 0 )); do
done
# compute some values that depends on user selectable variables
mkdir -p "$BASEDIR_VM_IMAGE"
basedir_vm_image=$(readlink -f "$BASEDIR_VM_IMAGE")
vm_image_file="$VM.qcow2"
datadir="$BASEDIR_NM/tools/nm-guest-data"