You need to install package qemu-user-static which provides
the emulation toolkit.

Signed-off-by: Dietmar Maurer <diet...@proxmox.com>
---
 src/PVE/LXC/Setup.pm | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/PVE/LXC/Setup.pm b/src/PVE/LXC/Setup.pm
index 1b89f28..7d522cc 100644
--- a/src/PVE/LXC/Setup.pm
+++ b/src/PVE/LXC/Setup.pm
@@ -285,7 +285,19 @@ sub pre_start_hook {
 
     return if !$self->{plugin}; # unmanaged
 
+    my $emul;
+    my $emul_data;
+    if ($self->{conf}->{arch} eq 'arm64') {
+       $emul = "/usr/bin/qemu-aarch64-static";
+       $emul_data = PVE::Tools::file_get_contents($emul, 10*1024*1024) if -f 
$emul;
+    }
+
     my $code = sub {
+
+       if ($emul && $emul_data) {
+           $self->{plugin}->ct_file_set_contents($emul, $emul_data, 0755);
+       }
+
        # Create /fastboot to skip run fsck
        $self->{plugin}->ct_file_set_contents('/fastboot', '');
 
-- 
2.11.0

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

Reply via email to