Skip to content
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
4 changes: 3 additions & 1 deletion images/capi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ OPENSTACK_BUILD_NAMES ?= openstack-ubuntu-2204 openstack-ubuntu-2404 openstack-

OSC_BUILD_NAMES ?= osc-ubuntu-2204 osc-ubuntu-2404 osc-ubuntu-2604

QEMU_BUILD_NAMES ?= qemu-ubuntu-2204 qemu-ubuntu-2204-cloudimg qemu-ubuntu-2404 qemu-ubuntu-2404-efi qemu-ubuntu-2604 qemu-ubuntu-2604-efi qemu-ubuntu-2204-efi qemu-centos-9 qemu-rhel-9 qemu-rockylinux-9 qemu-rockylinux-9-cloudimg qemu-flatcar
QEMU_BUILD_NAMES ?= qemu-ubuntu-2204 qemu-ubuntu-2204-cloudimg qemu-ubuntu-2404 qemu-ubuntu-2404-cloudimg qemu-ubuntu-2404-efi qemu-ubuntu-2604 qemu-ubuntu-2604-efi qemu-ubuntu-2204-efi qemu-centos-9 qemu-rhel-9 qemu-rockylinux-9 qemu-rockylinux-9-cloudimg qemu-flatcar

QEMU_KUBEVIRT_BUILD_NAMES := $(addprefix kubevirt-,$(QEMU_BUILD_NAMES))

Expand Down Expand Up @@ -820,6 +820,7 @@ build-qemu-ubuntu-2204: ## Builds Ubuntu 22.04 QEMU image
build-qemu-ubuntu-2204-cloudimg: ## Builds Ubuntu 22.04 QEMU image using cloud image
build-qemu-ubuntu-2204-efi: ## Builds Ubuntu 22.04 QEMU image that EFI boots
build-qemu-ubuntu-2404: ## Builds Ubuntu 24.04 QEMU image
build-qemu-ubuntu-2404-cloudimg: ## Builds Ubuntu 24.04 QEMU image using cloud image
build-qemu-ubuntu-2404-efi: ## Builds Ubuntu 24.04 QEMU image that EFI boots
build-qemu-ubuntu-2604: ## Builds Ubuntu 26.04 QEMU image
build-qemu-ubuntu-2604-efi: ## Builds Ubuntu 26.04 QEMU image that EFI boots
Expand Down Expand Up @@ -983,6 +984,7 @@ validate-qemu-ubuntu-2204: ## Validates Ubuntu 22.04 QEMU image packer config
validate-qemu-ubuntu-2204-cloudimg: ## Validates Ubuntu 22.04 QEMU image packer config using cloud image
validate-qemu-ubuntu-2204-efi: ## Validates Ubuntu 22.04 QEMU EFI image packer config
validate-qemu-ubuntu-2404: ## Validates Ubuntu 24.04 QEMU image packer config
validate-qemu-ubuntu-2404-cloudimg: ## Validates Ubuntu 24.04 QEMU image packer config using cloud image
validate-qemu-ubuntu-2404-efi: ## Validates Ubuntu 24.04 QEMU EFI image packer config
validate-qemu-ubuntu-2604: ## Validates Ubuntu 26.04 QEMU image packer config
validate-qemu-ubuntu-2604-efi: ## Validates Ubuntu 26.04 QEMU EFI image packer config
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#cloud-config
ssh_pwauth: true
users:
- name: builder
passwd: $ENCRYPTED_SSH_PASSWORD
groups: [adm, cdrom, dip, plugdev, lxd, sudo]
lock_passwd: false
sudo: ALL=(ALL) NOPASSWD:ALL
shell: /bin/bash
19 changes: 17 additions & 2 deletions images/capi/packer/qemu/packer.json.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,18 @@
}
],
"provisioners": [
{
"expect_disconnect": true,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is probably harmless but misleading, because this step doesn't reboot or disconnect as far as I'm aware.

"environment_vars": [
"WAIT_FOR_CLOUDINIT={{user `wait_for_cloudinit`}}"
],
"inline": [
"if [ \"$WAIT_FOR_CLOUDINIT\" != \"true\" ]; then exit 0; fi",
"cloud-init status --wait"
],
"inline_shebang": "/bin/bash -e",
"type": "shell"
},
{
"environment_vars": [
"PYPY_HTTP_SOURCE={{user `pypy_http_source`}}"
Expand Down Expand Up @@ -102,7 +114,8 @@
"sudo reboot now"
],
"inline_shebang": "/bin/bash -e",
"type": "shell"
"type": "shell",
"pause_after": "{{user `extra_reboot_timeout`}}s"
},
{
"pause_before": "30s",
Expand Down Expand Up @@ -228,6 +241,8 @@
"ssh_password": "$SSH_PASSWORD",
"ssh_username": "builder",
"vm_name": "{{user `build_name`}}-kube-{{user `kubernetes_semver`}}",
"vnc_bind_address": "127.0.0.1"
"vnc_bind_address": "127.0.0.1",
"wait_for_cloudinit": "false",
"extra_reboot_timeout": "1"
}
}
15 changes: 15 additions & 0 deletions images/capi/packer/qemu/qemu-ubuntu-2404-cloudimg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"build_name": "ubuntu-2404",
"cd_files": "./packer/qemu/linux/ubuntu/cloud-init/24.04/*",
"disk_image": "true",
"distribution_version": "2404",
"distro_name": "ubuntu",
"extra_reboot_timeout": "90",
"guest_os_type": "ubuntu-64",
"iso_checksum": "https://cloud-images.ubuntu.com/noble/current/SHA256SUMS",
"iso_checksum_type": "file",
"iso_url": "https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img",
"os_display_name": "Ubuntu 24.04",
"shutdown_command": "shutdown -P now",
"wait_for_cloudinit": "true"
}