[pve-devel] [PATCH container 02/11] Move LXC-specific architecture translation here

Fabian Grünbichler f.gruenbichler at proxmox.com
Mon Oct 28 11:54:45 CET 2019


On October 28, 2019 11:36 am, Stefan Reiter wrote:
> 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..ae42a10 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';

missing '='

> +    } 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
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 




More information about the pve-devel mailing list