Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable vhd on more releases #6115

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion provider/bootc_image_builder/bootc_image_build_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ def create_config_toml_file(params):
"rootpw --lock --iscrypted locked\n"
"sshkey --username %s \"%s\"\ntext --non-interactive\nzerombr\n"
"clearpart --all --initlabel --disklabel=gpt\nautopart --noswap --type=lvm\n"
"network --bootproto=dhcp --device=eno1 --activate --onboot=on\n reboot" % (username, password, username, key_value)
"network --bootproto=dhcp --device=link --activate --onboot=on\n reboot" % (username, password, username, key_value)
}
if params.get("fips_enable") == "yes":
fips_content = f"""
Expand Down Expand Up @@ -930,6 +930,9 @@ def virt_install_vm(params):
if disk_image_type in ["anaconda-iso"]:
if os.path.exists(iso_install_path):
os.remove(iso_install_path)
check_squashfs = params.get("check_squashfs") == "yes"
if check_squashfs:
check_image_filesystem(params)
cmd = ("virt-install --name %s"
" --disk path=%s,bus=virtio,format=qcow2,size=12"
" --vcpus 3 --memory 3096"
Expand Down Expand Up @@ -960,6 +963,21 @@ def virt_install_vm(params):
process.run(cmd, shell=True, verbose=True, ignore_status=True)


def check_image_filesystem(params):
"""
Check image file system

@param params: one dictionary containing parameters
"""
disk_path = params.get("vm_disk_image_path")
mount_cmd = f"mount {disk_path} /mnt"
process.run(mount_cmd, shell=True, verbose=True, ignore_status=False)
check_squashfs_cmd = "file /mnt/images/install.img"
ret = process.run(check_squashfs_cmd, verbose=True, ignore_status=False, shell=True).stdout_text
if "Squashfs" not in ret:
raise exceptions.TestFail(f"Squashfs is not enabled")


def verify_in_vm_internal(vm, params):
"""
Verify something by login Vm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
local_container = "yes"
- centos10:
container_url = "quay.io/centos-bootc/centos-bootc:stream10"
only upstream_bib..use_config_json..tls_verify_enable, rhel_9.5_nightly_bib..use_config_json..tls_verify_enable, rhel_9.6_nightly_bib..use_config_json..tls_verify_enable, rhel_9.4_nightly_bib..use_config_json..tls_verify_enable
only upstream_bib..use_config_json..tls_verify_enable, rhel_10.0_bib..use_config_json..tls_verify_enable, rhel_9.6_nightly_bib..use_config_json..tls_verify_enable, rhel_9.4_nightly_bib..use_config_json..tls_verify_enable
roofs = "xfs"
rhel_9.4_nightly_bib..use_config_json..tls_verify_enable:
roofs = ""
Expand Down Expand Up @@ -220,10 +220,10 @@
output_sub_folder = "vpc"
output_name = "disk.vhd"
no s390-virtio
only upstream_bib, rhel_9.5_nightly_bib
only upstream_bib, rhel_9.6_nightly_bib, rhel_10.0_bib
- gce:
disk_image_type = "gce"
output_sub_folder = "gce"
output_name = "image.tar.gz"
no s390-virtio
only upstream_bib, rhel_9.5_nightly_bib
only upstream_bib, rhel_9.6_nightly_bib, rhel_10.0_bib
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@
- centos10:
container_url = "quay.io/centos-bootc/centos-bootc:stream10"
only efi
only upstream_bib, rhel_9.5_nightly_bib, rhel_9.6_nightly_bib, rhel_9.4_nightly_bib
only upstream_bib, rhel_10.0_bib, rhel_9.6_nightly_bib, rhel_9.4_nightly_bib
roofs = "ext4"
rhel_9.4_nightly_bib:
roofs = ""
anaconda-iso..upstream_bib:
check_squashfs = "yes"
- fedora:
variants fedora_bootc_image:
- fedora_40:
Expand Down Expand Up @@ -228,10 +230,10 @@
output_sub_folder = "vpc"
output_name = "disk.vhd"
no s390-virtio
only upstream_bib, rhel_9.5_nightly_bib
only upstream_bib, rhel_9.6_nightly_bib, rhel_10.0_bib
- gce:
disk_image_type = "gce"
output_sub_folder = "gce"
output_name = "image.tar.gz"
no s390-virtio
only upstream_bib, rhel_9.5_nightly_bib
only upstream_bib, rhel_9.6_nightly_bib, rhel_10.0_bib