Skip to content

Commit

Permalink
image: add kubevirt image build
Browse files Browse the repository at this point in the history
As Ignition supports KubeVirt, add a custom oem for it and also the
required parts to be able to build an image in .qcow2 format that
is already using internal .qcow2 gzip compression.

Fixes: flatcar/Flatcar#1358

Signed-off-by: Adrian Vladu <avladu@cloudbasesolutions.com>
  • Loading branch information
ader1990 committed Apr 29, 2024
1 parent 7664955 commit 886e948
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 1 deletion.
10 changes: 10 additions & 0 deletions build_library/vm_image_util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ VALID_IMG_TYPES=(
hyperv
hyperv_vhdx
iso
kubevirt
openstack
openstack_mini
packet
Expand Down Expand Up @@ -51,6 +52,7 @@ VALID_OEM_PACKAGES=(
gce
hetzner
hyperv
kubevirt
openstack
packet
qemu
Expand Down Expand Up @@ -315,6 +317,14 @@ IMG_scaleway_OEM_USE=scaleway
IMG_scaleway_OEM_SYSEXT=oem-scaleway
IMG_scaleway_DISK_EXTENSION=qcow2

## kubevirt
IMG_kubevirt_DISK_FORMAT=qcow2
IMG_kubevirt_DISK_LAYOUT=vm
IMG_kubevirt_OEM_PACKAGE=common-oem-files
IMG_kubevirt_OEM_USE=kubevirt
IMG_kubevirt_OEM_SYSEXT=oem-kubevirt
IMG_kubevirt_DISK_EXTENSION=qcow2

###########################################################

# Print the default vm type for the specified board
Expand Down
1 change: 1 addition & 0 deletions changelog/changes/2024-04-29-kubevirt-images.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Added KubeVirt qcow2 image for amd64/arm64 ([flatcar/scripts#1962](https://github.com/flatcar/scripts/pull/1962))
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ ConditionKernelCommandLine=|flatcar.oem.id=scaleway

ConditionKernelCommandLine=|flatcar.oem.id=hetzner

ConditionKernelCommandLine=|flatcar.oem.id=kubevirt

Description=Flatcar Metadata Agent

[Service]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ COMMON_OEMIDS=(
packet
qemu
scaleway
kubevirt
)

ARM64_ONLY_OEMIDS=(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
</pkgmetadata>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright (c) 2013 CoreOS, Inc.. All rights reserved.
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DESCRIPTION="OEM suite for KubeVirt"
HOMEPAGE="https://kubevirt.io/"
SRC_URI=""

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 arm64"
IUSE=""

OEM_NAME="KubeVirt"
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CROS_WORKON_REPO="https://github.com"
if [[ "${PV}" == 9999 ]]; then
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
else
CROS_WORKON_COMMIT="78d94b311ddb047b280c5ee180410b48ec04ea39" # flatcar-master
CROS_WORKON_COMMIT="8da532c809c89a9c434ada0fa9532a1c1bf49f4c" # flatcar-master
KEYWORDS="amd64 arm arm64 x86"
fi

Expand Down

0 comments on commit 886e948

Please sign in to comment.