-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hyper-V synthetic timers (hv-stimer) requires Hypver-V clocksources (hv-time) #154
Comments
One likely issue is that the cpu on the host system does not support the features. Currently, the vagrant-libvirt plugin does not check wether if the host cpu has the needed featureset, allways enabling to use these features (most recent cpus have, though) if set in the vagrantfile. So the only workaround is to disable the feature if running the boxes on systems with older hardware. You could script this in your vagrantfile, checking the cpus's vmx features and only enable the feature if they are present. Maybe you also need to enable those options in your BIOS. Another reason could be that your libvirt version is way newer than the linux kernel on the system, trying to use features your kernel does not yet support, but your hardware would. |
Interesting, I'm running libvirt on a new GCP instance (https://cloud.google.com/compute/docs/instances/enable-nested-virtualization-vm-instances#restrictions), so it's not a case of older hardware, and vmx for the bios is not something I can fine-tune adjust except for just enabling nested vmx overall for my instannce. And the stimer enlightenment has been enabled for a long time in the base box vagrantfile for this repo and has run without error, suggesting it's not a case of a too-new libvirt, yeah? |
Not sure if related, but others seem to have such issues too, especially on GCP/Azure. see: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1882774 It could also be related to the default cpu emulation model that is picked up by libvirt, maybe it helps you to set another emulated cpu type, using the domain specific cpu settings by vagrant-libvirt: https://github.com/vagrant-libvirt/vagrant-libvirt#domain-specific-options |
@deargle Is there any chance to try it on the real hardware? I'm not sure if it's a problem of the software or if the issues in "hardware" Azure/GCP (some limitation of public clouds). I added these "hyperv_feature" they should speed up running Windows: packer-templates/Vagrantfile-windows.template Lines 14 to 19 in 4aefc7a
I'm running VMs with these parameters with older laptop without any problems (but I'm using Ubuntu 20.04). I can try to install Debian testing (bullseye) myself and five it a try, but this will take some time... |
I'm trying this on my machine. And the result is the same:
I'm on Arch Linux.
Log of
|
Hello guys. I was looking at it and seems the problem is in the vagrant-libvirt, which doesn't support the "clock" values - PR for this is still opened: https://github.com/vagrant-libvirt/vagrant-libvirt/pull/1047/files and the issue vagrant-libvirt/vagrant-libvirt#640 as well. Anyway here is something to read about it:
Few commands how to reproduce it and fix it (Debian Testing): $ mkdir windows-10-enterprise-x64-eval
$ cd windows-10-enterprise-x64-eval
$ vagrant init peru/windows-10-enterprise-x64-eval
$ VAGRANT_DEFAULT_PROVIDER=libvirt vagrant up --no-destroy-on-error
...
...
==> default: Creating shared folders metadata...
==> default: Starting domain.
There was an error talking to Libvirt. The error message is shown
below:
Call to virDomainCreateWithFlags failed: internal error: qemu unexpectedly closed the monitor: 2020-08-05T07:29:04.474443Z qemu-system-x86_64: warning: host doesn't support requested feature: MSR(48BH).vmx-apicv-register [bit 8]
2020-08-05T07:29:04.474490Z qemu-system-x86_64: warning: host doesn't support requested feature: MSR(48BH).vmx-apicv-vid [bit 9]
2020-08-05T07:29:04.474495Z qemu-system-x86_64: warning: host doesn't support requested feature: MSR(48DH).vmx-posted-intr [bit 7]
2020-08-05T07:29:04.474498Z qemu-system-x86_64: warning: host doesn't support requested feature: MSR(48FH).vmx-exit-load-perf-global-ctrl [bit 12]
2020-08-05T07:29:04.474501Z qemu-system-x86_64: warning: host doesn't support requested feature: MSR(490H).vmx-entry-load-perf-global-ctrl [bit 13]
Hyper-V synthetic timers (hv-stimer) requires Hyper-V clocksources (hv-time)
2020-08-05T07:29:04.474893Z qemu-system-x86_64: kvm_init_vcpu failed: Function not implemented You will get the known error ^^^ You should be able to see the VM using this command: $ virsh -c qemu:///system list --all
Id Name State
---------------------------------------------------------
- windows-10-enterprise-x64-eval_default shut off Edit the VM definition using the <clock offset='utc'>
<timer name='hypervclock' present='yes'/>
</clock> Then try tu run the VAGRANT_DEFAULT_PROVIDER=libvirt vagrant up The VM should be successfully started. Can you please try it please? Thank you |
stimer can not be enabled because it needs clock / hypervclock (https://bugzilla.redhat.com/show_bug.cgi?id=1816670) settings which are not supported by vagrant-libvirt #154
What about disabling the I created PR for that #159 Let me know if you have any objections or ideas how this can be done better. |
@ruzickap Hello. Sorry for late reply! I've tried your solution on two different machines (both with ArchLinux). On one of them there were no error after this workaround. I'm sure that it is not connected with this issue. Thank you! |
Thank you... I'll do more tests and re-generate boxes without |
Yes, it works for me too on gcp nested virt when I disable stimer. I havent
tried the manual clock edit yet though.
…On Thu, Aug 6, 2020, 8:33 AM Petr Ruzicka ***@***.***> wrote:
Thank you...
I'll do more tests and re-generate boxes without stimer.
I'll keep this open for some time until I find some better solution
(ideally with help of vagrant-libvirt).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#154 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAI6Y7J42HIUTUMXFNFYPTDR7K5LTANCNFSM4PR36YHA>
.
|
All images are without the |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I'm on debian testing (well, actually, Kali rolling, which uses debian testing), so libvirt 6.4.0-2, https://packages.debian.org/source/bullseye/libvirt
Alas,
hv-time
is not supported:Setting hv-stimer state to off allows boot.
IIRC part of qemu more strict checks to see if requested enlightenment features are actually usable, which I guess stimer isn't without time?
The text was updated successfully, but these errors were encountered: