| View previous topic :: View next topic |
| Author |
Message |
pablocool n00b


Joined: 27 Jul 2017 Posts: 58
|
Posted: Tue Sep 08, 2020 8:53 pm Post subject: Problem with qemu after system upgrade |
|
|
Hi,
After system upgrade virt-manager/qemu stopped working. Neither existing VMs can be started nor new created:
| Code: | Nie można ukończyć instalacji: „internal error: qemu unexpectedly closed the monitor: 2020-09-08T20:51:07.282295Z qemu-system-x86_64: warning: host doesn't support requested feature: MSR(48BH).vmx-apicv-register [bit 8]
2020-09-08T20:51:07.282346Z qemu-system-x86_64: warning: host doesn't support requested feature: MSR(48BH).vmx-apicv-vid [bit 9]
2020-09-08T20:51:07.282362Z qemu-system-x86_64: warning: host doesn't support requested feature: MSR(48DH).vmx-posted-intr [bit 7]
2020-09-08T20:51:07.282366Z qemu-system-x86_64: warning: host doesn't support requested feature: MSR(48FH).vmx-exit-load-perf-global-ctrl [bit 12]
2020-09-08T20:51:07.282371Z qemu-system-x86_64: warning: host doesn't support requested feature: MSR(490H).vmx-entry-load-perf-global-ctrl [bit 13]
2020-09-08T20:51:07.282880Z qemu-system-x86_64: error: failed to set MSR 0x48e to 0xfff9fffe04006172
qemu-system-x86_64: /var/tmp/portage/app-emulation/qemu-5.0.0-r2/work/qemu-5.0.0/target/i386/kvm.c:2695: kvm_buf_set_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.”
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 75, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/createvm.py", line 2089, in _do_async_install
guest.installer_instance.start_install(guest, meter=meter)
File "/usr/share/virt-manager/virtinst/install/installer.py", line 544, in start_install
doboot, transient)
File "/usr/share/virt-manager/virtinst/install/installer.py", line 491, in _create_guest
domain = self.conn.createXML(install_xml or final_xml, 0)
File "/usr/lib/python3.7/site-packages/libvirt.py", line 4035, in createXML
if ret is None:raise libvirtError('virDomainCreateXML() failed', conn=self)
libvirt.libvirtError: internal error: qemu unexpectedly closed the monitor: 2020-09-08T20:51:07.282295Z qemu-system-x86_64: warning: host doesn't support requested feature: MSR(48BH).vmx-apicv-register [bit 8]
2020-09-08T20:51:07.282346Z qemu-system-x86_64: warning: host doesn't support requested feature: MSR(48BH).vmx-apicv-vid [bit 9]
2020-09-08T20:51:07.282362Z qemu-system-x86_64: warning: host doesn't support requested feature: MSR(48DH).vmx-posted-intr [bit 7]
2020-09-08T20:51:07.282366Z qemu-system-x86_64: warning: host doesn't support requested feature: MSR(48FH).vmx-exit-load-perf-global-ctrl [bit 12]
2020-09-08T20:51:07.282371Z qemu-system-x86_64: warning: host doesn't support requested feature: MSR(490H).vmx-entry-load-perf-global-ctrl [bit 13]
2020-09-08T20:51:07.282880Z qemu-system-x86_64: error: failed to set MSR 0x48e to 0xfff9fffe04006172
qemu-system-x86_64: /var/tmp/portage/app-emulation/qemu-5.0.0-r2/work/qemu-5.0.0/target/i386/kvm.c:2695: kvm_buf_set_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed. |
How can it be fixed? |
|
| Back to top |
|
 |
pablocool n00b


Joined: 27 Jul 2017 Posts: 58
|
Posted: Thu Sep 10, 2020 5:52 am Post subject: |
|
|
I have found workaround. The default cpu setting is copy host configuration. And for my cpu it results with thise qemu parameters:
| Code: | | IvyBridge,ss=on,vmx=on,pcid=on,hypervisor=on,arat=on,tsc-adjust=on,umip=on,arch-capabilities=on,xsaveopt=on,skip-l1dfl-vmentry=on |
I have disabled it and manually put IvyBridge and now it looks like this:
And now it works. But why magically copy host cpu configuration stopped working? |
|
| Back to top |
|
 |
Hu Moderator

Joined: 06 Mar 2007 Posts: 21192
|
Posted: Thu Sep 10, 2020 4:14 pm Post subject: |
|
|
| It is probably the case that a bare -cpu IvyBridge omits at least one of those other feature flags, that the older version of the packages did not enable those flags even with -cpu host, that the new version does (as you showed), and that there is a bug in the implementation of one of those parameters. It's also possible that the old version enabled all those flags too, but that the assertion failure is a recent regression, and it went unnoticed because it only applies when one of those feature flags is enabled. |
|
| Back to top |
|
 |
pablocool n00b


Joined: 27 Jul 2017 Posts: 58
|
Posted: Thu Sep 10, 2020 4:43 pm Post subject: |
|
|
| But then why issue also occurs for new VM installations? I need to manually change CPU type.I guess this is about vmx=on. But I have this flag on /proc/cpuinfo. I cannot figure out what has changed. |
|
| Back to top |
|
 |
Anon-E-moose Watchman


Joined: 23 May 2008 Posts: 6074 Location: Dallas area
|
Posted: Thu Sep 10, 2020 4:55 pm Post subject: |
|
|
From an arch bug report
| Quote: | Hi,
I'm seeing the same warnings about vmx-exit-load-perf-global-ctrl & vmx-entry-load-perf-global-ctrl but I doubt they are related to your migration issue.
They are just emitted when qemu starts on the target but way before migration starts and you said you got to 57%.
I've seen many those warnings when qemu/libvirt is newer than the kernel, since qemu tries to set sub-features but the kernel doesn't allow that yet.
To avoid people trail a red herring and actually look into your migration issue I'd recommend disabling vmx for the guest which will make the warning disappear. |
_________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
| Back to top |
|
 |
Hu Moderator

Joined: 06 Mar 2007 Posts: 21192
|
Posted: Thu Sep 10, 2020 5:12 pm Post subject: |
|
|
| pablocool wrote: | | But then why issue also occurs for new VM installations? I need to manually change CPU type.I guess this is about vmx=on. But I have this flag on /proc/cpuinfo. I cannot figure out what has changed. | In your first post, you said you upgraded system components, presumably including qemu itself. Are you trying to create those new VM installations using an old version of the system, from before the upgrade? |
|
| Back to top |
|
 |
pablocool n00b


Joined: 27 Jul 2017 Posts: 58
|
Posted: Tue Sep 15, 2020 11:07 am Post subject: |
|
|
Hi
@Ho I am not sure what do you mean by " Are you trying to create those new VM installations using an old version of the system, from before the upgrade?". I upgraded system and first thing I noticed was that my previous VM installations that were working before upgrade, do not work any more. Second thing I noticed I cannot create new VM installation with default settings. I need to tweak settings to manually set cpu type. This fixes both old VM installations and new ones. Following what @Anon-E-moose wrote I will try to upgrade kernel to check if this fixes vmx issue. |
|
| Back to top |
|
 |
pablocool n00b


Joined: 27 Jul 2017 Posts: 58
|
Posted: Tue Sep 15, 2020 11:43 am Post subject: |
|
|
| @Anon-E-moose upgrading kernel from 5.1.0 to latest solved issue. Thank you! |
|
| Back to top |
|
 |
Hu Moderator

Joined: 06 Mar 2007 Posts: 21192
|
Posted: Tue Sep 15, 2020 4:47 pm Post subject: |
|
|
| You asked why new VMs were also broken. My question was to confirm that the newly created non-working VMs were running under the same new qemu that was also failing to run old VMs. If so, then it seems reasonable that the issue was with new qemu generally (and based on your later success, new qemu with old kernel), and is not specific to the old VMs being incompatible with the upgraded qemu. |
|
| Back to top |
|
 |
pablocool n00b


Joined: 27 Jul 2017 Posts: 58
|
Posted: Wed Sep 16, 2020 9:31 am Post subject: |
|
|
| Quote: | | My question was to confirm that the newly created non-working VMs were running under the same new qemu that was also failing to run old VMs |
Yes, same qemu.
| Quote: | | the issue was with new qemu generally |
Yes.
Thanks all for the input. |
|
| Back to top |
|
 |
|