* [PATCH] imagetypes_vm: Use IMAGE_FULLNAME for OVA image filenames
@ 2025-05-21 11:26 'Badrikesh Prusty' via isar-users
2025-05-21 16:37 ` 'cedric.hombourger@siemens.com' via isar-users
0 siblings, 1 reply; 3+ messages in thread
From: 'Badrikesh Prusty' via isar-users @ 2025-05-21 11:26 UTC (permalink / raw)
To: isar-users; +Cc: Badrikesh Prusty
Obsering build failures for virtualbox/vmware images when OVA_NAME is set in
local.conf instead of the default IMAGE_FULLNAME. The ownership of the .ova file,
generated during the do_image_ova task, is updated with ${IMAGE_FULLNAME}.ova
instead of ${OVA_NAME}.ova
Logs:
| pxe-boot-server-ipc-bookworm.ovf
| pxe-boot-server-ipc-bookworm.mf
| pxe-boot-server-industrial-virtualbox-disk001.vmdk
| Removing /etc/schroot/isar-builder-88786470-74dc-4172-8907-531a0306c699-2655
| Removing /etc/schroot/chroot.d/isar-builder-88786470-74dc-4172-8907-531a0306c699-2655
| chown: cannot access '/build/tmp-pxe-boot-server-virtualbox/deploy/images/virtualbox-ipc/pxe-boot-server-industrial-virtualbox.ova': No such file or directory
ERROR: Task (mc:pxe-boot-server:/build/../work/meta-isar-pxeboot/recipes-core/images/pxe-boot-server.bb:do_image_ova) failed with exit code '1'
NOTE: Tasks Summary: Attempted 449 tasks of which 448 didn't need to be rerun and 1 failed.
To resolve this, VM images (.ova, .ovf, and .mf files) will now be generated
using IMAGE_FULLNAME.
Since OVA_NAME is embedded within the VirtualBox/VMware VM description files,
the imported image will retain the name set by OVA_NAME, regardless of the VM
image filenames.
Signed-off-by: Badrikesh Prusty <badrikesh.prusty@siemens.com>
---
meta/classes/imagetypes_vm.bbclass | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/meta/classes/imagetypes_vm.bbclass b/meta/classes/imagetypes_vm.bbclass
index b20a8e04..4057361e 100644
--- a/meta/classes/imagetypes_vm.bbclass
+++ b/meta/classes/imagetypes_vm.bbclass
@@ -70,9 +70,9 @@ IMAGE_CMD:ova() {
if [ ! ${VIRTUAL_MACHINE_IMAGE_TYPE} = "vmdk" ]; then
exit 0
fi
- rm -f '${DEPLOY_DIR_IMAGE}/${OVA_NAME}.ova'
- rm -f '${DEPLOY_DIR_IMAGE}/${OVA_NAME}.ovf'
- rm -f '${DEPLOY_DIR_IMAGE}/${OVA_NAME}.mf'
+ rm -f '${DEPLOY_DIR_IMAGE}/${IMAGE_FULLNAME}.ova'
+ rm -f '${DEPLOY_DIR_IMAGE}/${IMAGE_FULLNAME}.ovf'
+ rm -f '${DEPLOY_DIR_IMAGE}/${IMAGE_FULLNAME}.mf'
export PRIMARY_MAC=$(macgen)
export LAST_CHANGE=$(date -u "+%Y-%m-%dT%H:%M:%SZ")
@@ -85,16 +85,16 @@ IMAGE_CMD:ova() {
export DISK_UUID=$(uuidgen)
export VM_UUID=$(uuidgen)
# create ovf
- cat ${PP_WORK}/${OVF_TEMPLATE_STAGE2} | envsubst > ${PP_DEPLOY}/${OVA_NAME}.ovf
- tar -cvf ${PP_DEPLOY}/${OVA_NAME}.ova -C ${PP_DEPLOY} ${OVA_NAME}.ovf
+ cat ${PP_WORK}/${OVF_TEMPLATE_STAGE2} | envsubst > ${PP_DEPLOY}/${IMAGE_FULLNAME}.ovf
+ tar -cvf ${PP_DEPLOY}/${IMAGE_FULLNAME}.ova -C ${PP_DEPLOY} ${IMAGE_FULLNAME}.ovf
# VirtualBox needs here a manifest file. VMware does accept that format.
if [ "${VMDK_SUBFORMAT}" = "monolithicSparse" ]; then
- echo "SHA${OVA_SHA_ALG}(${VIRTUAL_MACHINE_IMAGE_FILE})=$(sha${OVA_SHA_ALG}sum ${PP_DEPLOY}/${VIRTUAL_MACHINE_IMAGE_FILE} | cut -d' ' -f1)" >> ${PP_DEPLOY}/${OVA_NAME}.mf
- echo "SHA${OVA_SHA_ALG}(${OVA_NAME}.ovf)=$(sha${OVA_SHA_ALG}sum ${PP_DEPLOY}/${OVA_NAME}.ovf | cut -d' ' -f1)" >> ${PP_DEPLOY}/${OVA_NAME}.mf
- tar -uvf ${PP_DEPLOY}/${OVA_NAME}.ova -C ${PP_DEPLOY} ${OVA_NAME}.mf
+ echo "SHA${OVA_SHA_ALG}(${VIRTUAL_MACHINE_IMAGE_FILE})=$(sha${OVA_SHA_ALG}sum ${PP_DEPLOY}/${VIRTUAL_MACHINE_IMAGE_FILE} | cut -d' ' -f1)" >> ${PP_DEPLOY}/${IMAGE_FULLNAME}.mf
+ echo "SHA${OVA_SHA_ALG}(${IMAGE_FULLNAME}.ovf)=$(sha${OVA_SHA_ALG}sum ${PP_DEPLOY}/${IMAGE_FULLNAME}.ovf | cut -d' ' -f1)" >> ${PP_DEPLOY}/${IMAGE_FULLNAME}.mf
+ tar -uvf ${PP_DEPLOY}/${IMAGE_FULLNAME}.ova -C ${PP_DEPLOY} ${IMAGE_FULLNAME}.mf
fi
- tar -uvf ${PP_DEPLOY}/${OVA_NAME}.ova -C ${PP_DEPLOY} ${VIRTUAL_MACHINE_IMAGE_FILE}
+ tar -uvf ${PP_DEPLOY}/${IMAGE_FULLNAME}.ova -C ${PP_DEPLOY} ${VIRTUAL_MACHINE_IMAGE_FILE}
EOIMAGER
}
IMAGE_CMD:ova[depends] = "${PN}:do_transform_template"
--
2.39.5
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20250521112633.25857-1-badrikesh.prusty%40siemens.com.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] imagetypes_vm: Use IMAGE_FULLNAME for OVA image filenames
2025-05-21 11:26 [PATCH] imagetypes_vm: Use IMAGE_FULLNAME for OVA image filenames 'Badrikesh Prusty' via isar-users
@ 2025-05-21 16:37 ` 'cedric.hombourger@siemens.com' via isar-users
2025-05-21 19:58 ` 'Prusty, Badrikesh' via isar-users
0 siblings, 1 reply; 3+ messages in thread
From: 'cedric.hombourger@siemens.com' via isar-users @ 2025-05-21 16:37 UTC (permalink / raw)
To: Prusty, Badrikesh, isar-users
On Wed, 2025-05-21 at 16:56 +0530, 'Badrikesh Prusty' via isar-users
wrote:
> Obsering build failures for virtualbox/vmware images when OVA_NAME is
Typo: Observing but I should also note that the imperative should be
used in git commit logs. For instance:
Fix ownership update in do_image_ova task for custom OVA names
Fix build failures for virtualbox/vmware images when OVA_NAME
is set in local.conf instead of default IMAGE_FULLNAME. Update
ownership handling to use ${OVA_NAME}.ova instead of
${IMAGE_FULLNAME}.ova
I however fear that it may not be an accurate description of the
changes. IIUC, Isar would use IMAGE_FULLNAME for the image files
regardless of the OVA_NAME setting hence any operations on the
generated files should really use IMAGE_FULLNAME and OVA_NAME is
really for the description embedded in the generated files (meta-data
files in particular)
> set in
> local.conf instead of the default IMAGE_FULLNAME. The ownership of
> the .ova file,
> generated during the do_image_ova task, is updated with
> ${IMAGE_FULLNAME}.ova
> instead of ${OVA_NAME}.ova
> Logs:
> > pxe-boot-server-ipc-bookworm.ovf
> > pxe-boot-server-ipc-bookworm.mf
> > pxe-boot-server-industrial-virtualbox-disk001.vmdk
> > Removing /etc/schroot/isar-builder-88786470-74dc-4172-8907-
> > 531a0306c699-2655
> > Removing /etc/schroot/chroot.d/isar-builder-88786470-74dc-4172-
> > 8907-531a0306c699-2655
> > chown: cannot access '/build/tmp-pxe-boot-server-
> > virtualbox/deploy/images/virtualbox-ipc/pxe-boot-server-industrial-
> > virtualbox.ova': No such file or directory
> ERROR: Task (mc:pxe-boot-server:/build/../work/meta-isar-
> pxeboot/recipes-core/images/pxe-boot-server.bb:do_image_ova) failed
> with exit code '1'
> NOTE: Tasks Summary: Attempted 449 tasks of which 448 didn't need to
> be rerun and 1 failed.
>
> To resolve this, VM images (.ova, .ovf, and .mf files) will now be
> generated
> using IMAGE_FULLNAME.
>
> Since OVA_NAME is embedded within the VirtualBox/VMware VM
> description files,
> the imported image will retain the name set by OVA_NAME, regardless
> of the VM
> image filenames.
>
> Signed-off-by: Badrikesh Prusty <badrikesh.prusty@siemens.com>
> ---
> meta/classes/imagetypes_vm.bbclass | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/meta/classes/imagetypes_vm.bbclass
> b/meta/classes/imagetypes_vm.bbclass
> index b20a8e04..4057361e 100644
> --- a/meta/classes/imagetypes_vm.bbclass
> +++ b/meta/classes/imagetypes_vm.bbclass
> @@ -70,9 +70,9 @@ IMAGE_CMD:ova() {
> if [ ! ${VIRTUAL_MACHINE_IMAGE_TYPE} = "vmdk" ]; then
> exit 0
> fi
> - rm -f '${DEPLOY_DIR_IMAGE}/${OVA_NAME}.ova'
> - rm -f '${DEPLOY_DIR_IMAGE}/${OVA_NAME}.ovf'
> - rm -f '${DEPLOY_DIR_IMAGE}/${OVA_NAME}.mf'
> + rm -f '${DEPLOY_DIR_IMAGE}/${IMAGE_FULLNAME}.ova'
> + rm -f '${DEPLOY_DIR_IMAGE}/${IMAGE_FULLNAME}.ovf'
> + rm -f '${DEPLOY_DIR_IMAGE}/${IMAGE_FULLNAME}.mf'
>
> export PRIMARY_MAC=$(macgen)
> export LAST_CHANGE=$(date -u "+%Y-%m-%dT%H:%M:%SZ")
> @@ -85,16 +85,16 @@ IMAGE_CMD:ova() {
> export DISK_UUID=$(uuidgen)
> export VM_UUID=$(uuidgen)
> # create ovf
> - cat ${PP_WORK}/${OVF_TEMPLATE_STAGE2} | envsubst >
> ${PP_DEPLOY}/${OVA_NAME}.ovf
> - tar -cvf ${PP_DEPLOY}/${OVA_NAME}.ova -C ${PP_DEPLOY}
> ${OVA_NAME}.ovf
> + cat ${PP_WORK}/${OVF_TEMPLATE_STAGE2} | envsubst >
> ${PP_DEPLOY}/${IMAGE_FULLNAME}.ovf
> + tar -cvf ${PP_DEPLOY}/${IMAGE_FULLNAME}.ova -C ${PP_DEPLOY}
> ${IMAGE_FULLNAME}.ovf
>
> # VirtualBox needs here a manifest file. VMware does accept
> that format.
> if [ "${VMDK_SUBFORMAT}" = "monolithicSparse" ]; then
> - echo
> "SHA${OVA_SHA_ALG}(${VIRTUAL_MACHINE_IMAGE_FILE})=$(sha${OVA_SHA_ALG}
> sum ${PP_DEPLOY}/${VIRTUAL_MACHINE_IMAGE_FILE} | cut -d' ' -f1)" >>
> ${PP_DEPLOY}/${OVA_NAME}.mf
> - echo
> "SHA${OVA_SHA_ALG}(${OVA_NAME}.ovf)=$(sha${OVA_SHA_ALG}sum
> ${PP_DEPLOY}/${OVA_NAME}.ovf | cut -d' ' -f1)" >>
> ${PP_DEPLOY}/${OVA_NAME}.mf
> - tar -uvf ${PP_DEPLOY}/${OVA_NAME}.ova -C ${PP_DEPLOY}
> ${OVA_NAME}.mf
> + echo
> "SHA${OVA_SHA_ALG}(${VIRTUAL_MACHINE_IMAGE_FILE})=$(sha${OVA_SHA_ALG}
> sum ${PP_DEPLOY}/${VIRTUAL_MACHINE_IMAGE_FILE} | cut -d' ' -f1)" >>
> ${PP_DEPLOY}/${IMAGE_FULLNAME}.mf
> + echo
> "SHA${OVA_SHA_ALG}(${IMAGE_FULLNAME}.ovf)=$(sha${OVA_SHA_ALG}sum
> ${PP_DEPLOY}/${IMAGE_FULLNAME}.ovf | cut -d' ' -f1)" >>
> ${PP_DEPLOY}/${IMAGE_FULLNAME}.mf
> + tar -uvf ${PP_DEPLOY}/${IMAGE_FULLNAME}.ova -C
> ${PP_DEPLOY} ${IMAGE_FULLNAME}.mf
> fi
> - tar -uvf ${PP_DEPLOY}/${OVA_NAME}.ova -C ${PP_DEPLOY}
> ${VIRTUAL_MACHINE_IMAGE_FILE}
> + tar -uvf ${PP_DEPLOY}/${IMAGE_FULLNAME}.ova -C ${PP_DEPLOY}
> ${VIRTUAL_MACHINE_IMAGE_FILE}
> EOIMAGER
> }
> IMAGE_CMD:ova[depends] = "${PN}:do_transform_template"
> --
> 2.39.5
>
--
Cedric Hombourger
Siemens AG
www.siemens.com
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/13a837996e3653650e060a0381dd334522fab8c3.camel%40siemens.com.
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] imagetypes_vm: Use IMAGE_FULLNAME for OVA image filenames
2025-05-21 16:37 ` 'cedric.hombourger@siemens.com' via isar-users
@ 2025-05-21 19:58 ` 'Prusty, Badrikesh' via isar-users
0 siblings, 0 replies; 3+ messages in thread
From: 'Prusty, Badrikesh' via isar-users @ 2025-05-21 19:58 UTC (permalink / raw)
To: cedric.hombourger, isar-users
Hi Cedric,
Thank you for the inputs, I'll update the commit description and send v2 of the patch.
-----Original Message-----
From: Hombourger, Cedric (FT FDS CES LX) <cedric.hombourger@siemens.com>
Sent: 21 May 2025 22:08
To: Prusty, Badrikesh (FT FDS CES LX PBU 2) <badrikesh.prusty@siemens.com>; isar-users@googlegroups.com
Subject: Re: [PATCH] imagetypes_vm: Use IMAGE_FULLNAME for OVA image filenames
On Wed, 2025-05-21 at 16:56 +0530, 'Badrikesh Prusty' via isar-users
wrote:
> Obsering build failures for virtualbox/vmware images when OVA_NAME is
Typo: Observing but I should also note that the imperative should be used in git commit logs. For instance:
Fix ownership update in do_image_ova task for custom OVA names
Fix build failures for virtualbox/vmware images when OVA_NAME
is set in local.conf instead of default IMAGE_FULLNAME. Update
ownership handling to use ${OVA_NAME}.ova instead of
${IMAGE_FULLNAME}.ova
I however fear that it may not be an accurate description of the changes. IIUC, Isar would use IMAGE_FULLNAME for the image files regardless of the OVA_NAME setting hence any operations on the generated files should really use IMAGE_FULLNAME and OVA_NAME is really for the description embedded in the generated files (meta-data files in particular)
> set in
> local.conf instead of the default IMAGE_FULLNAME. The ownership of the
> .ova file, generated during the do_image_ova task, is updated with
> ${IMAGE_FULLNAME}.ova instead of ${OVA_NAME}.ova
> Logs:
> > pxe-boot-server-ipc-bookworm.ovf
> > pxe-boot-server-ipc-bookworm.mf
> > pxe-boot-server-industrial-virtualbox-disk001.vmdk
> > Removing /etc/schroot/isar-builder-88786470-74dc-4172-8907-
> > 531a0306c699-2655
> > Removing /etc/schroot/chroot.d/isar-builder-88786470-74dc-4172-
> > 8907-531a0306c699-2655
> > chown: cannot access '/build/tmp-pxe-boot-server-
> > virtualbox/deploy/images/virtualbox-ipc/pxe-boot-server-industrial-
> > virtualbox.ova': No such file or directory
> ERROR: Task (mc:pxe-boot-server:/build/../work/meta-isar-
> pxeboot/recipes-core/images/pxe-boot-server.bb:do_image_ova) failed
> with exit code '1'
> NOTE: Tasks Summary: Attempted 449 tasks of which 448 didn't need to
> be rerun and 1 failed.
>
> To resolve this, VM images (.ova, .ovf, and .mf files) will now be
> generated using IMAGE_FULLNAME.
>
> Since OVA_NAME is embedded within the VirtualBox/VMware VM description
> files, the imported image will retain the name set by OVA_NAME,
> regardless of the VM image filenames.
>
> Signed-off-by: Badrikesh Prusty <badrikesh.prusty@siemens.com>
> ---
> meta/classes/imagetypes_vm.bbclass | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/meta/classes/imagetypes_vm.bbclass
> b/meta/classes/imagetypes_vm.bbclass
> index b20a8e04..4057361e 100644
> --- a/meta/classes/imagetypes_vm.bbclass
> +++ b/meta/classes/imagetypes_vm.bbclass
> @@ -70,9 +70,9 @@ IMAGE_CMD:ova() {
> if [ ! ${VIRTUAL_MACHINE_IMAGE_TYPE} = "vmdk" ]; then
> exit 0
> fi
> - rm -f '${DEPLOY_DIR_IMAGE}/${OVA_NAME}.ova'
> - rm -f '${DEPLOY_DIR_IMAGE}/${OVA_NAME}.ovf'
> - rm -f '${DEPLOY_DIR_IMAGE}/${OVA_NAME}.mf'
> + rm -f '${DEPLOY_DIR_IMAGE}/${IMAGE_FULLNAME}.ova'
> + rm -f '${DEPLOY_DIR_IMAGE}/${IMAGE_FULLNAME}.ovf'
> + rm -f '${DEPLOY_DIR_IMAGE}/${IMAGE_FULLNAME}.mf'
>
> export PRIMARY_MAC=$(macgen)
> export LAST_CHANGE=$(date -u "+%Y-%m-%dT%H:%M:%SZ") @@ -85,16
> +85,16 @@ IMAGE_CMD:ova() {
> export DISK_UUID=$(uuidgen)
> export VM_UUID=$(uuidgen)
> # create ovf
> - cat ${PP_WORK}/${OVF_TEMPLATE_STAGE2} | envsubst >
> ${PP_DEPLOY}/${OVA_NAME}.ovf
> - tar -cvf ${PP_DEPLOY}/${OVA_NAME}.ova -C ${PP_DEPLOY}
> ${OVA_NAME}.ovf
> + cat ${PP_WORK}/${OVF_TEMPLATE_STAGE2} | envsubst >
> ${PP_DEPLOY}/${IMAGE_FULLNAME}.ovf
> + tar -cvf ${PP_DEPLOY}/${IMAGE_FULLNAME}.ova -C ${PP_DEPLOY}
> ${IMAGE_FULLNAME}.ovf
>
> # VirtualBox needs here a manifest file. VMware does accept
> that format.
> if [ "${VMDK_SUBFORMAT}" = "monolithicSparse" ]; then
> - echo
> "SHA${OVA_SHA_ALG}(${VIRTUAL_MACHINE_IMAGE_FILE})=$(sha${OVA_SHA_ALG}
> sum ${PP_DEPLOY}/${VIRTUAL_MACHINE_IMAGE_FILE} | cut -d' ' -f1)" >>
> ${PP_DEPLOY}/${OVA_NAME}.mf
> - echo
> "SHA${OVA_SHA_ALG}(${OVA_NAME}.ovf)=$(sha${OVA_SHA_ALG}sum
> ${PP_DEPLOY}/${OVA_NAME}.ovf | cut -d' ' -f1)" >>
> ${PP_DEPLOY}/${OVA_NAME}.mf
> - tar -uvf ${PP_DEPLOY}/${OVA_NAME}.ova -C ${PP_DEPLOY}
> ${OVA_NAME}.mf
> + echo
> "SHA${OVA_SHA_ALG}(${VIRTUAL_MACHINE_IMAGE_FILE})=$(sha${OVA_SHA_ALG}
> sum ${PP_DEPLOY}/${VIRTUAL_MACHINE_IMAGE_FILE} | cut -d' ' -f1)" >>
> ${PP_DEPLOY}/${IMAGE_FULLNAME}.mf
> + echo
> "SHA${OVA_SHA_ALG}(${IMAGE_FULLNAME}.ovf)=$(sha${OVA_SHA_ALG}sum
> ${PP_DEPLOY}/${IMAGE_FULLNAME}.ovf | cut -d' ' -f1)" >>
> ${PP_DEPLOY}/${IMAGE_FULLNAME}.mf
> + tar -uvf ${PP_DEPLOY}/${IMAGE_FULLNAME}.ova -C
> ${PP_DEPLOY} ${IMAGE_FULLNAME}.mf
> fi
> - tar -uvf ${PP_DEPLOY}/${OVA_NAME}.ova -C ${PP_DEPLOY}
> ${VIRTUAL_MACHINE_IMAGE_FILE}
> + tar -uvf ${PP_DEPLOY}/${IMAGE_FULLNAME}.ova -C ${PP_DEPLOY}
> ${VIRTUAL_MACHINE_IMAGE_FILE}
> EOIMAGER
> }
> IMAGE_CMD:ova[depends] = "${PN}:do_transform_template"
> --
> 2.39.5
>
--
Cedric Hombourger
Siemens AG
www.siemens.com
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/SG2PR06MB5107F4FD7F2007C7AEB26664919EA%40SG2PR06MB5107.apcprd06.prod.outlook.com.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-05-21 19:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-21 11:26 [PATCH] imagetypes_vm: Use IMAGE_FULLNAME for OVA image filenames 'Badrikesh Prusty' via isar-users
2025-05-21 16:37 ` 'cedric.hombourger@siemens.com' via isar-users
2025-05-21 19:58 ` 'Prusty, Badrikesh' via isar-users
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox