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.rei...@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@pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 

_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to