Skip to content

Commit

Permalink
Utils: Update testing scripts
Browse files Browse the repository at this point in the history
Testing script 'update_iso' is using virt-install to test the built ISO.
With every run virt-install will create new virtual drive in
~/.local/share/libvirt/images. With 20G size of each it may lead to
filling up host HDD pretty fast.

This commit configures virt-install to reuse the same disk image
located in the main project directory. This way it saves the space
and makes it easy to remove if needed.
  • Loading branch information
elkoniu committed Dec 8, 2024
1 parent 2b94b40 commit ea2645e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/testing/update_iso
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ PROJECT_DIR = os.path.dirname(
)
)

# Virtual disk location
VIRT_DISK = os.path.join(PROJECT_DIR, "tmp_virt_disk.qcow2")

# Relative path to the ISO folder within the project
ISO_FOLDER = os.path.join(PROJECT_DIR, "result", "iso")

Expand Down Expand Up @@ -212,6 +215,7 @@ def get_virt_install_command_line():
"--name", "anaconda-updated-iso", "--os-variant=detect=on",
"--memory", "4096", "--graphics", "vnc,listen=127.0.0.2",
"--transient",
"--disk", VIRT_DISK + ",size=20",
"--location", UPDATED_ISO]
return cmd

Expand Down

0 comments on commit ea2645e

Please sign in to comment.