[pve-devel] [PATCH qemu-server v2 03/18] move get_command_for_arch() helper to helpers module

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Jan 17 13:20:44 CET 2025


Am 16.01.25 um 12:50 schrieb Fiona Ebner:
> diff --git a/PVE/QemuServer/Helpers.pm b/PVE/QemuServer/Helpers.pm
> index 72a46a0a..d58bad2b 100644
> --- a/PVE/QemuServer/Helpers.pm
> +++ b/PVE/QemuServer/Helpers.pm
> @@ -19,6 +19,19 @@ windows_version
>  
>  my $nodename = PVE::INotify::nodename();
>  
> +my $Arch2Qemu = {
> +    aarch64 => '/usr/bin/qemu-system-aarch64',
> +    x86_64 => '/usr/bin/qemu-system-x86_64',
> +};
> +sub get_command_for_arch($) {
> +    my ($arch) = @_;
> +    return '/usr/bin/kvm' if get_host_arch() eq $arch; # i.e. native arch


This introduces a test/runtime error:

Undefined subroutine &PVE::QemuServer::Helpers::get_host_arch called at ../PVE/QemuServer/Helpers.pm line 28.

It's fixed again in 05/18 "move kvm_user_version() function to helpers module",
the import should be added here already.




More information about the pve-devel mailing list