Skip to contentSkip to conversation

automation: Information about running containers for a different arch

PATCH Superseded Anthony PERARD 4 participants 6 messages Sep 26, 2022 – Sep 29, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 automation: Information about running containers for a different arch

Adding pointer to 'qemu-user-static'.

---
 automation/build/README.md | 11 +++++++++++
 1 file changed, 11 insertions(+)
automation/build/README.md +11 -0
index 00305eed03..5d4734bc77 100644
@@ -102,3 +102,14 @@ make -C automation/build suse/opensuse-tumbleweed PUSH=1
 
 [registry]: https://gitlab.com/xen-project/xen/container_registry
 [registry help]: https://gitlab.com/help/user/project/container_registry
+
+
+Running container for a different architecture
+----------------------------------------------
+
+To run for example an Arm container on an x86 machine, simply install the
+package `qemu-user-static`, and that it. Then you can start an Arm container on
+x86 host like you would start an x86 container.
+
+If that doesn't work, you might find some information on
+[multiarch/qemu-user-static](https://github.com/multiarch/qemu-user-static).
Signature · 1 line
Anthony PERARD
#1 lore raw

Hi Anthony,

Quoted 14 lines · Anthony PERARD

Adding pointer to 'qemu-user-static'.

---
 automation/build/README.md | 11 +++++++++++
 1 file changed, 11 insertions(+)
automation/build/README.md +0 -0
index 00305eed03..5d4734bc77 100644

automation/build/README.md make -C automation/build suse/opensuse-tumbleweed PUSH=1 · line 107

Quoted 6 lines
automation/build/README.md +3 -0
@@ -102,3 +102,14 @@ make -C automation/build suse/opensuse-tumbleweed PUSH=1
 
 [registry]: https://gitlab.com/xen-project/xen/container_registry
 [registry help]: https://gitlab.com/help/user/project/container_registry
+
+
+Running container for a different architecture

We need qemu-user-static also when building a container for a different architecture. So this should be "Building/Running a container for a different architecture".

automation/build/README.md make -C automation/build suse/opensuse-tumbleweed PUSH=1 · line 111

Quoted 4 lines
automation/build/README.md +4 -0
+----------------------------------------------
+
+To run for example an Arm container on an x86 machine, simply install the
+package `qemu-user-static`, and that it. Then you can start an Arm container on

s/that/that's/

automation/build/README.md make -C automation/build suse/opensuse-tumbleweed PUSH=1 · line 115

Quoted 4 lines
automation/build/README.md +4 -0
+x86 host like you would start an x86 container.
+
+If that doesn't work, you might find some information on
+[multiarch/qemu-user-static](https://github.com/multiarch/qemu-user-static).

This is also missing quite important information that QEMU emulation using qemu-user-static only works for x86_64 host machines. This means that you cannot build/run e.g. x86 containers on an Arm host.

Quoted 3 lines

--
Anthony PERARD

~Michal

#2 lore raw

PATCH v2 1/1 automation: Information about running containers for a different arch

In reply to Anthony PERARD

Adding pointer to 'qemu-user-static'.

---

Notes:
v2:
- reword to point out that it's an x86 thing

 automation/build/README.md | 13 +++++++++++++
 1 file changed, 13 insertions(+)
automation/build/README.md +13 -0
index 00305eed03..4cc1acb6b4 100644
@@ -102,3 +102,16 @@ make -C automation/build suse/opensuse-tumbleweed PUSH=1
 
 [registry]: https://gitlab.com/xen-project/xen/container_registry
 [registry help]: https://gitlab.com/help/user/project/container_registry
+
+
+Building/Running container for a different architecture
+-------------------------------------------------------
+
+On a x86 host, it is possible to build and run containers for other arch (like
+running a container made for Arm) with docker taking care of running the
+appropriate software to emulate that arch. For this, simply install the package
+`qemu-user-static`, and that's it. Then you can start an Arm container on x86
+host like you would start an x86 container.
+
+If that doesn't work, you might find some information on
+[multiarch/qemu-user-static](https://github.com/multiarch/qemu-user-static).
Signature · 1 line
Anthony PERARD
#3 lore raw

Hi Anthony,

Quoted 8 lines

-----Original Message-----
From: Anthony PERARD <[email protected]>
Subject: [XEN PATCH v2] automation: Information about running containers for a different arch

Adding pointer to 'qemu-user-static'.

I didn't see the for-4.17 tag in the title but I assume you want this patch to go into the release since I am in the CC. Since this is a pure doc change and everyone can be benefited from this, so if this patch is acked/reviewed by CI maintainers, feel free to add my:

Kind regards,
Henry

Quoted 36 lines

---

Notes:
v2:
- reword to point out that it's an x86 thing

 automation/build/README.md | 13 +++++++++++++
 1 file changed, 13 insertions(+)
automation/build/README.md +0 -0
index 00305eed03..4cc1acb6b4 100644
@@ -102,3 +102,16 @@ make -C automation/build suse/opensuse-

tumbleweed PUSH=1

[registry]: https://gitlab.com/xen-project/xen/container_registry
[registry help]: https://gitlab.com/help/user/project/container_registry

automation/build/README.md +8 -0
+
+
+Building/Running container for a different architecture
+-------------------------------------------------------
+
+On a x86 host, it is possible to build and run containers for other arch (like
+running a container made for Arm) with docker taking care of running the
+appropriate software to emulate that arch. For this, simply install the

package
+qemu-user-static, and that's it. Then you can start an Arm container on x86

automation/build/README.md +4 -0
+host like you would start an x86 container.
+
+If that doesn't work, you might find some information on
+[multiarch/qemu-user-static](https://github.com/multiarch/qemu-user-

static).
--
Anthony PERARD