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
vagrant up removes domain.xml on libvirt/qemu/kvm error #949
Comments
I see what you mean, that the domain is only restore for a specific fog error and not on any error |
Actually, I suspect the problem here is that the XML is valid but rejected by libvirt based on the current capabilities and would also reject the old XML. So what is needed is a way of seeing if the new domain XML definition is accepted before attempting to undefine the existing, or sending the XML as an edit |
Calling undefine on a domain and recreating it can result in some edge case errors where if the current capabilities of libvirt have been reduced, it may not be possible to restore the old definition. Instead switch to calling `domain_define` with the new definition and check that the resulting libvirt domain definition has been updated in the expected manner, otherwise report an error to the user. Fixes: vagrant-libvirt#949 Relates-to: vagrant-libvirt#1329 Relates-to: vagrant-libvirt#1027 Relates-to: vagrant-libvirt#1371
Calling undefine on a domain and recreating it can result in some edge case errors where if the current capabilities of libvirt have been reduced, it may not be possible to restore the old definition. Instead switch to calling `domain_define` with the new definition and check that the resulting libvirt domain definition has been updated in the expected manner, otherwise report an error to the user. Fixes: vagrant-libvirt#949 Relates-to: vagrant-libvirt#1329 Relates-to: vagrant-libvirt#1027 Relates-to: vagrant-libvirt#1371
Calling undefine on a domain and recreating it can result in some edge case errors where if the current capabilities of libvirt have been reduced, it may not be possible to restore the old definition. Instead switch to calling `domain_define` with the new definition and check that the resulting libvirt domain definition has been updated in the expected manner, otherwise report an error to the user. Fixes: #949 Relates-to: #1329 Relates-to: #1027 Relates-to: #1371
Calling undefine on a domain and recreating it can result in some edge case errors where if the current capabilities of libvirt have been reduced, it may not be possible to restore the old definition. Instead switch to calling `domain_define` with the new definition and check that the resulting libvirt domain definition has been updated in the expected manner, otherwise report an error to the user. Fixes: vagrant-libvirt#949 Relates-to: vagrant-libvirt#1329 Relates-to: vagrant-libvirt#1027 Relates-to: vagrant-libvirt#1371
When I
vagrant up
a machine after host (re)boot the domain.xml is removed when libvirt/qemu/kvm throws this error:It seems like this is happening because vagrant-libvirt is trying to update the domain.xml by removing the original domain.xml and creating a new domain.xml.new file (and moving it back to domain.xml after it doesn't fail). I figure the problem is at https://github.com/vagrant-libvirt/vagrant-libvirt/blob/master/lib/vagrant-libvirt/action/start_domain.rb#L280-L290 and it's somehow not catching the error and not restoring the original domain.xml.
The reason that I'm getting the error in the first place is that there appears to be some issue with the KVM module and AMD processors causing KVM to finish loading after libvirtd has started. When I force load the KVM module at boot or run
virsh capabilities
beforevagrant up
the error doesn't happen andvagrant up
works as expected.So I guess the KVM/AMD thingy is exposing an issue in vagrant-libvirt and it would be nice if it would be handled a bit more gracefully than wiping out the domain.xml and losing data due to having to recreate the machine.
System configuration
OS/Distro version: Arch Linux
Libvirt version: 4.8.0
Output of
vagrant version; vagrant plugin list
:Output of
VAGRANT_LOG=debug vagrant up --no-destroy-on-error > vagrant.log 2>&1
output
Are you using upstream vagrant package or your distros package?
Distro
The text was updated successfully, but these errors were encountered: