public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: Jan Kiszka <jan.kiszka@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 15:53:35 +0100	[thread overview]
Message-ID: <20220307155335.6f706439@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <db5e5516-3499-56cc-dcfd-3e9f1a35c68b@siemens.com>

Am Mon, 7 Mar 2022 15:41:04 +0100
schrieb Jan Kiszka <jan.kiszka@siemens.com>:

> On 07.03.22 15:09, Henning Schild wrote:
> > Am Mon, 7 Mar 2022 10:46:34 +0100
> > schrieb Jan Kiszka <jan.kiszka@siemens.com>:
> >   
> >> 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.  
> > 
> > NACK, breaks ova import into both vmware and virtualbox. I compared
> > and it is really this patch which breaks both.
> > 
> > Did not check the vmware logs but vbox says
> > VERR_TAR_UNSUPPORTED_GNU_HDR_TYPE  
> 
> Amazingly primitive format, this OVO...

Not sure, the ova is just a tar of the disk image and an xml. That disk
image itself can itself be sparse.

see VMDK_SUBFORMAT

> > 
> > So this tarball does not support it because its consumers both do
> > not. 
> 
> OK, thanks for testing. We may then consider whether to take patch 2
> as well as it may surprise constrained consumers. Patch 1 is fine as
> it only targets Isar itself.

I think p2 can default to -S and maybe make the args configurable.

But i think Adriaan might have some generic remarks on the targz-img
anyways.

I usually use it for nfs so for me the S would add value. If i remember
to specify it on unpack ;).

Henning
 
> Jan
> 


  reply	other threads:[~2022-03-07 14:53 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
2022-03-07 14:09       ` Henning Schild
2022-03-07 14:41         ` Jan Kiszka
2022-03-07 14:53           ` Henning Schild [this message]
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=20220307155335.6f706439@md1za8fc.ad001.siemens.net \
    --to=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.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