From 19b3e635a0f17a56bb36c891198fff815abb17a6 Mon Sep 17 00:00:00 2001 From: Alan Baghumian Date: Thu, 9 Nov 2023 14:32:48 -0800 Subject: [PATCH 1/4] Add a make example to build cloudimg based images. --- ubuntu/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ubuntu/README.md b/ubuntu/README.md index 0d73707a..25f976d7 100644 --- a/ubuntu/README.md +++ b/ubuntu/README.md @@ -39,6 +39,12 @@ packer build -var customize_script=my-changes.sh -var ubuntu_series=jammy \ the VM. For example, you can install packages using `apt-get`, call out to ansible, or whatever you want. +Building using make: + +```shell +sudo make custom-cloudimg.tar.gz SERIES=jammy +``` + #### Accessing external files from you script If you want to put or use some files in the image, you can put those in the `http` directory. From c9711b25885574fea1d5976deb617861034179b9 Mon Sep 17 00:00:00 2001 From: Alan Baghumian Date: Thu, 9 Nov 2023 14:46:48 -0800 Subject: [PATCH 2/4] Increase the base disk size from 4G to 6G preventing builds to fail. --- ubuntu/ubuntu-cloudimg.pkr.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubuntu/ubuntu-cloudimg.pkr.hcl b/ubuntu/ubuntu-cloudimg.pkr.hcl index 23f26627..d7d532cb 100644 --- a/ubuntu/ubuntu-cloudimg.pkr.hcl +++ b/ubuntu/ubuntu-cloudimg.pkr.hcl @@ -31,7 +31,7 @@ source "qemu" "cloudimg" { boot_wait = "2s" cpus = 2 disk_image = true - disk_size = "4G" + disk_size = "6G" format = "qcow2" headless = var.headless http_directory = var.http_directory From 4feb7fe735002de27ba4fa2cc625f844ef48f14c Mon Sep 17 00:00:00 2001 From: Alan Baghumian Date: Thu, 9 Nov 2023 14:52:14 -0800 Subject: [PATCH 3/4] Revert previous commit. --- ubuntu/ubuntu-cloudimg.pkr.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubuntu/ubuntu-cloudimg.pkr.hcl b/ubuntu/ubuntu-cloudimg.pkr.hcl index d7d532cb..23f26627 100644 --- a/ubuntu/ubuntu-cloudimg.pkr.hcl +++ b/ubuntu/ubuntu-cloudimg.pkr.hcl @@ -31,7 +31,7 @@ source "qemu" "cloudimg" { boot_wait = "2s" cpus = 2 disk_image = true - disk_size = "6G" + disk_size = "4G" format = "qcow2" headless = var.headless http_directory = var.http_directory From d5541a7baa00094a4993c418478ab8d1d757cbc6 Mon Sep 17 00:00:00 2001 From: Alan Baghumian Date: Tue, 14 Nov 2023 11:25:04 -0800 Subject: [PATCH 4/4] Removed sudo as it is not required. --- ubuntu/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubuntu/README.md b/ubuntu/README.md index 25f976d7..028f3ff9 100644 --- a/ubuntu/README.md +++ b/ubuntu/README.md @@ -42,7 +42,7 @@ ansible, or whatever you want. Building using make: ```shell -sudo make custom-cloudimg.tar.gz SERIES=jammy +make custom-cloudimg.tar.gz SERIES=jammy ``` #### Accessing external files from you script