[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 4/9] automation: Add Arm containers to containerize script


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Mon, 26 Sep 2022 14:33:38 +0100
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Michal Orzel <michal.orzel@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Doug Goldstein <cardoe@xxxxxxxxxx>
  • Delivery-date: Mon, 26 Sep 2022 13:33:56 +0000
  • Ironport-data: A9a23:Gc/vPK/j4x5rCqb0bqI0DrUDnn6TJUtcMsCJ2f8bNWPcYEJGY0x3m mseXm2COvneamemett2boqzoxgHvZTTnNY1SVA5pSA8E34SpcT7XtnIdU2Y0wF+jyHgoOCLy +1EN7Es+ehtFie0Si+Fa+Sn9z8kvU2xbuKUIPbePSxsThNTRi4kiBZy88Y0mYctitWia++3k YqaT/b3ZRn0gFaYDkpOs/jZ8EI14qyr0N8llgdWic5j7Qe2e0Y9VPrzFYnpR1PkT49dGPKNR uqr5NlVKUuAon/Bovv8+lrKWhViroz6ZGBiuVIPM0SWuTBQpzRa70oOHKF0hXG7Kdm+t4sZJ N1l7fRcQOqyV0HGsLx1vxJwS0mSMUDakVNuzLfWXcG7liX7n3XQL/pGU083GbA8pMpLPkZD1 uIVGAA3ZSiGvrfjqF67YrEEasULKcDqOMUUu216zCGfBvEjKXzBa/yUv5kChm52350QW6aFD yYaQWMHgBDoahtTOlARGdQmkf2hnHXXeDxEslOF46Ew5gA/ySQhieC1YIqMJ7RmQ+1prByfl lr31li+PQ42GcTclwW57H2j07qncSTTB9tJSezQGuRRqE2ewCkfBQMbUXO/oOKlkQiuVtRHM UsW9yEy668o+ySDRdDnUxq1iHWNpBIbVpxbFOhSwBqW1qPe7gKdB24FZj1MctorsIkxXzNC/ lqIlNPgAXpoqq+YTVqU87vSpjS3URX5NkdbO3VCF1FcpYC+/sdj1XojU+qPDobqgNzRJBWu7 wy1iyUdmbgjvfQA76CCqAWvby2XmrDFSQs85wPyV22j7x9kaIPNW7FE+WQ3/t4bct/HEwDpU Gws3pHHsbtQVc3leDmlGr1lIV2/2xqS3NQwa3ZLFoJpyTmi8mXLkWt4sGAnfxcB3irplFbUj K7vVeF5vsU70JiCN/Ufj2eN5yMCk8Dd+SzNDKy8Uza3SsEZmPW71C9vf1WM+GvmjVIhl6oyU b/CL5jwVC1CWPw2l2PqLwv47VPM7nFW+I8ubcqjk0TPPUS2PRZ5tovpwHPRN7tkvctoUS3e8 spFNtvi9iizpNbWO3CPmbP/2HhQchDX87iq9JEMHgNCSyI6cFwc5wj5nOlwKtE0wfQK/goKl 1nkMnJlJJPErSWvAW23hrpLMdsDgb4XQaoHABER
  • Ironport-hdrordr: A9a23:vGVAaqtRohzbWMjPCpHNk+3w7skDdtV00zEX/kB9WHVpmszxra 6TddAgpHvJYVcqKRQdcL+7VZVoLUmxyXcx2/h3AV7AZniFhILLFuFfBOLZqlWKcREWtNQttp uIG5IObuEYZmIasS+V2maFL+o=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Fri, Sep 23, 2022 at 03:23:26PM -0700, Stefano Stabellini wrote:
> On Fri, 23 Sep 2022, Michal Orzel wrote:
> > Hi Anthony,
> > 
> > On 23/09/2022 15:56, Anthony PERARD wrote:
> > > 
> > > 
> > > On Thu, Sep 22, 2022 at 03:40:53PM +0200, Michal Orzel wrote:
> > >> Script automation/scripts/containerize makes it easy to build Xen within
> > >> predefined containers from gitlab container registry. However, it is
> > >> currently not possible to use it with Arm containers because they are not
> > >> listed in the script. Populate the necessary entries.
> > > 
> > > FYI, those entry are just helper/shortcut/aliases, you can use any
> > > arbitrary container with the script, it just more annoying.
> > > 
> > > Your patch here allows to write:
> > >     CONTAINER=unstable-arm64v8 automation/scripts/containerize
> > > but you could write the following instead, for the same result:
> > >     CONTAINER=registry.gitlab.com/xen-project/xen/debian:unstable-arm64v8 
> > > automation/scripts/containerize
> > > 
> > > I wonder if the script could select the right container base on the
> > > architecture of the host, because "alpine" and "alpine-arm64v8" will not
> > > both work on the same machine. It might be nice to just choose "alpine"
> > > and the script would select the x86 or arm container automagically. Just
> > > an idea, no need to do anything about it.
> > I'm not in favor of adding the automatic selection based on the host.
> > The reason is that on x86 you can run both x86 and e.g. Arm containers.
> > You just need to use register qemu-user-static [1] to perform emulation.
> > This is something widely used and I use that to test Arm images/containers 
> > on x86 host.
> > So you can run both alpine and alpine-arm64v8 on the same machine.
> 
> Yeah and modern Docker sets up qemu-user-static automatically without
> the user having to do anything. Anthony, you can try it yourself: you
> should be able to just:
> 
>   docker run -it registry.gitlab.com/xen-project/xen/debian:unstable-arm64v8
> 
> on your x86 host if you have a docker new enough

No, it isn't so easy, there is at least one step that might be needed,
actually having qemu-user-static on the machine.

But thanks to both of you, I've learned about qemu-user-static, and that
it isn't necessarily complicated to setup. It is actually very easy to
setup once we know what to look for, I've just had to install a packaged
called "qemu-user-static" and that's all that was needed for the above
command line to work. Installing that package worked on two different
Linux distribution for me (on a derivative of Debian stable and on Arch
Linux) so it's likely to work in many cases, at least on x86.

Cheers,

-- 
Anthony PERARD



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.