Skip to content

4.7: Allow for setting virtual_size per qemu variant#2042

Merged
openshift-merge-robot merged 2 commits intocoreos:rhcos-4.7from
ashcrow:4.7-qemu-variants-set-virtual-size
Feb 12, 2021
Merged

4.7: Allow for setting virtual_size per qemu variant#2042
openshift-merge-robot merged 2 commits intocoreos:rhcos-4.7from
ashcrow:4.7-qemu-variants-set-virtual-size

Conversation

@ashcrow
Copy link
Copy Markdown
Member

@ashcrow ashcrow commented Feb 12, 2021

Backport of #2041. Same local test was done.

Description

Add the ability to set the virtual size in the qemu variant configuration or via a switch in manual mode when using cmd-artifact-disk. This also sets the default virtual size for ibmcloud artifacts to 100G per request.

Test

Done via a local build off the main branch.

$ cosa build qemu
<snip/>
$ cosa buildextend-ibmcloud
<snip/>
$ cosa buildextend-openstack
<snip/>
[coreos-assembler]$ find . -name "*qcow2*"
./builds/.../rhcos-48...-qemu.x86_64.qcow2
./builds/.../rhcos-48...-ibmcloud.x86_64.qcow2
./builds/.../rhcos-48...-openstack.x86_64.qcow2
$ for x in `find . -name "*qcow2*"`; do echo -n `basename $x` " "; qemu-img info $x | grep "virtual size"; done
rhcos-48...-qemu.x86_64.qcow2      virtual size: 16 GiB (17179869184 bytes)
rhcos-48...-ibmcloud.x86_64.qcow2  virtual size: 100 GiB (107374182400 bytes)
rhcos-48...-openstack.x86_64.qcow2 virtual size: 16 GiB (17179869184 bytes)

When provided with a virtual_size directive we now resize the
qemu image before converting the image.

(cherry picked from commit 19cba94)
Images builds which symlink to cmd-artifact-disk can optionally
provide a virtual_size in their variant configuration. When in
manual mode the --virtual-size switch can be used directly.

(cherry picked from commit aa2ea67)
@ashcrow ashcrow requested review from jlebon and ravanelli February 12, 2021 22:04
@ashcrow ashcrow changed the base branch from master to rhcos-4.7 February 12, 2021 22:04
Copy link
Copy Markdown
Member

@ravanelli ravanelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ashcrow, ravanelli

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit a8293c8 into coreos:rhcos-4.7 Feb 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants