-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It allows settings the disk size of the VM image that is generated from a bootc container image. Also improve the default disk size by basing it on the container image size. Signed-off-by: Alberto Faria <[email protected]>
- Loading branch information
1 parent
1c63aee
commit 5c399d6
Showing
5 changed files
with
79 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# SPDX-License-Identifier: GPL-2.0-or-later | ||
|
||
image="${TEST_IMAGES[fedora-bootc]}" | ||
user="${TEST_IMAGES_DEFAULT_USER[fedora-bootc]}" | ||
|
||
__run() { | ||
__engine run --detach --name bootc-disk-size "$image" --bootc-disk-size "$1" | ||
} | ||
|
||
! RUST_LIB_BACKTRACE=0 __run 0 | ||
__engine rm bootc-disk-size | ||
|
||
for size in 1K 1M; do | ||
__run "$size" | ||
! __engine exec bootc-disk-size --as "$user" | ||
__engine rm --force bootc-disk-size | ||
done | ||
|
||
for size in 1G 1T 1024T; do | ||
__run "$size" | ||
__engine exec bootc-disk-size --as "$user" | ||
__engine rm --force bootc-disk-size | ||
done |