From: Fiona Ebner <f.ebner@proxmox.com>
To: Filip Schauer <f.schauer@proxmox.com>,
Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH qemu-server] Properly identify the CPU architecture of 32-bit VMs
Date: Thu, 14 Dec 2023 10:13:02 +0100 [thread overview]
Message-ID: <2bcdb6c7-bcff-4e65-8c7d-fbab100d2a6d@proxmox.com> (raw)
In-Reply-To: <7d2ebfc9-7172-410a-be4c-1fc681d07e43@proxmox.com>
Am 13.12.23 um 18:31 schrieb Filip Schauer:
> On 12/12/2023 12:48, Fiona Ebner wrote:
>> Am 12.12.23 um 11:39 schrieb Filip Schauer:
>>> It's actually not a different binary. qemu-system-i386 is a symlink that
>>> points to qemu-system-x86_64. But still this does indeed break migration
>>> between a node that has this patch applied and another node without the
>>> patch.
>>>
>> Oh, okay. But then that's a bit surprising. From a quick glance, we do
>> have some logic matching arch 'x86_64' specifically in CPUConfig.pm, so
>> that might be it. E.g.:
>>
>>> my $pve_forced_flags = {};
>>> $pve_forced_flags->{'enforce'} = {
>>> reason => "error if requested CPU settings not available",
>>> } if $cputype ne 'host' && $kvm && $arch eq 'x86_64';
>
>
> This check does not make any difference in my case since $kvm is not set
> when using a qemu32 CPU.
>
Well, that is just one example for such a flag, there are others ;)
From a quick look, if kvm is not explicitly turned off in the config and
if you are not using arch i386/aarch64 in the config, the $kvm option
will get set. It does not seem to depend on the CPU type:
> sub is_native($) {
> my ($arch) = @_;
> return get_host_arch() eq $arch;
> }
>
> sub get_vm_arch {
> my ($conf) = @_;
> return $conf->{arch} // get_host_arch();
> }
> sub config_to_command {
...
> my $kvm = $conf->{kvm};
> my $nodename = nodename();
>
> my $arch = get_vm_arch($conf);
...
> $kvm //= 1 if is_native($arch);
If you really want to know what causes the issue, you can compare the
QEMU commandline on source and target of the migration.
prev parent reply other threads:[~2023-12-14 9:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-11 14:12 Filip Schauer
2023-12-11 14:37 ` Fiona Ebner
2023-12-12 10:39 ` Filip Schauer
2023-12-12 11:48 ` Fiona Ebner
2023-12-13 17:31 ` Filip Schauer
2023-12-14 9:13 ` Fiona Ebner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2bcdb6c7-bcff-4e65-8c7d-fbab100d2a6d@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=f.schauer@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox