mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
scripts/pvics: Fix virt-resize permission error
Although the script is to be run with root privileges virt-resize starts as user qemu under the hood which depending on image location may cause permission errors. To fix this use `LIBGUESTFS_BACKEND=direct`. Reviewed-by: Holger Dengler <dengler@linux.ibm.com> Signed-off-by: Finn Callies <fcallies@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
6689e25865
commit
dc42460d82
@@ -1329,7 +1329,7 @@ encrypt() {
|
||||
# Increase partition size by 32MiB as well, but not the file system, as the LUKS2 encryption is around the filesystem
|
||||
image_resized="${TEMP_DIR}/resized.qcow2"
|
||||
execute cp "${image}" "${image_resized}"
|
||||
execute virt-resize --expand "/dev/vda${ROOT_PARTNUM}" --no-expand-content "${image}" "${image_resized}"
|
||||
execute env -S LIBGUESTFS_BACKEND=direct virt-resize --expand "/dev/vda${ROOT_PARTNUM}" --no-expand-content "${image}" "${image_resized}"
|
||||
# Remove smaller image, as we already made a copy
|
||||
execute rm -f "${image}"
|
||||
image="${image_resized}"
|
||||
|
||||
Reference in New Issue
Block a user