Add the "${kernel_dir}/${kernel_name}" to VM_GENERATED_FILES so it is logged as an output and optionally uploaded.

Also this is shell, remember your quotes :)