public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Henning Schild <henning.schild@siemens.com>
Cc: isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH 3/3] vm-img: Handle sparse files efficiently
Date: Mon, 7 Mar 2022 10:46:34 +0100	[thread overview]
Message-ID: <f2374094-aea8-0ffb-340c-d3ee16903a16@siemens.com> (raw)
In-Reply-To: <20220307100403.3ac04025@md1za8fc.ad001.siemens.net>

On 07.03.22 10:04, Henning Schild wrote:
> Am Sat, 5 Mar 2022 17:34:50 +0100
> schrieb Jan Kiszka <jan.kiszka@siemens.com>:
> 
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> Saves space in case the image contains any sparse files.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>>  meta/classes/vm-img.bbclass | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/meta/classes/vm-img.bbclass b/meta/classes/vm-img.bbclass
>> index 4bc977b9..27aedf12 100644
>> --- a/meta/classes/vm-img.bbclass
>> +++ b/meta/classes/vm-img.bbclass
>> @@ -93,15 +93,15 @@ do_create_ova() {
>>          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
>> +        tar -cvSf ${PP_DEPLOY}/${OVA_NAME}.ova -C ${PP_DEPLOY}
>> ${OVA_NAME}.ovf 
>>          # VirtualBox needs here a manifest file. VMware does accept
>> that format. if [ "${VMDK_SUBFORMAT}" = "monolithicSparse" ]; then
> 
> Not sure that already suggested it but we did not do it.
> 
>>              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
>> +            tar -uvSf ${PP_DEPLOY}/${OVA_NAME}.ova -C ${PP_DEPLOY}
>> ${OVA_NAME}.mf fi
>> -        tar -uvf ${PP_DEPLOY}/${OVA_NAME}.ova -C ${PP_DEPLOY}
>> ${VIRTUAL_MACHINE_IMAGE_FILE}
>> +        tar -uvSf ${PP_DEPLOY}/${OVA_NAME}.ova -C ${PP_DEPLOY}
>> ${VIRTUAL_MACHINE_IMAGE_FILE} EOSUDO
> 
> Did you get around to testing this on vmware and vbox? Do you think it
> would need to be tested? I could to that.
> 

That would be valuable. Just add a sparse file to the image (dd
if=/dev/zero of=sparse.file bs=1G seek=1 count=0) and check if that
bloats the files. And, of course, check if things still boot.

Thanks,
Jan

-- 
Siemens AG, Technology
Competence Center Embedded Linux

  reply	other threads:[~2022-03-07  9:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-05 16:34 [PATCH 0/3] Sparse tar generation Jan Kiszka
2022-03-05 16:34 ` [PATCH 1/3] sstate: Generate image packages using sparse Jan Kiszka
2022-05-24 19:03   ` Jan Kiszka
2022-03-05 16:34 ` [PATCH 2/3] targz-img: Handle sparse files efficiently Jan Kiszka
2022-03-07  9:02   ` Henning Schild
2022-03-07  9:43     ` Jan Kiszka
2022-03-05 16:34 ` [PATCH 3/3] vm-img: " Jan Kiszka
2022-03-07  9:04   ` Henning Schild
2022-03-07  9:46     ` Jan Kiszka [this message]
2022-03-07 14:09       ` Henning Schild
2022-03-07 14:41         ` Jan Kiszka
2022-03-07 14:53           ` Henning Schild
2022-04-21 16:05 ` [PATCH 0/3] Sparse tar generation Jan Kiszka
2022-04-25  6:04   ` Anton Mikanovich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f2374094-aea8-0ffb-340c-d3ee16903a16@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox