[pve-devel] [PATCH v2 container 02/11] Move LXC-specific architecture translation here
Stefan Reiter
s.reiter at proxmox.com
Mon Oct 28 12:59:14 CET 2019
This is the only time we need to do this translation, moving it here
allows reuse of the PVE::Tools function.
Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
---
src/PVE/LXC/Setup.pm | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/PVE/LXC/Setup.pm b/src/PVE/LXC/Setup.pm
index 845aced..ca6fc4f 100644
--- a/src/PVE/LXC/Setup.pm
+++ b/src/PVE/LXC/Setup.pm
@@ -293,6 +293,15 @@ sub pre_start_hook {
my $host_arch = PVE::Tools::get_host_arch();
+ # containers use different architecture names
+ if ($host_arch eq 'x86_64') {
+ $host_arch = 'amd64';
+ } elsif ($host_arch eq 'aarch64') {
+ $host_arch = 'arm64';
+ } else {
+ die "unsupported host architecture '$host_arch'\n";
+ }
+
my $container_arch = $self->{conf}->{arch};
$container_arch = 'amd64' if $container_arch eq 'i386'; # always use 64 bit version
--
2.20.1
More information about the pve-devel
mailing list