]> git.ipfire.org Git - thirdparty/libvirt.git/commit
xen: Don't add dom0 twice on driver reload
authorJim Fehlig <jfehlig@suse.com>
Fri, 11 Sep 2020 17:35:47 +0000 (11:35 -0600)
committerJim Fehlig <jfehlig@suse.com>
Thu, 24 Sep 2020 04:30:29 +0000 (22:30 -0600)
commitde49d5bad33565544f0ba5cf734b60dbb7fe5948
tree97e69dc9623f8a1c3803ae4850f9565a93952de9
parentaf5fb476da55759ba8265194e554d24f64007ceb
xen: Don't add dom0 twice on driver reload

When the xen driver loads, it probes libxl for some info about dom0 and
adds it to the virDomainObjList. The driver then looks for any domains
in stateDir and if they are still alive adds them to the list as well.
This logic is a bit flawed wrt handling driver reload and causes the
following error

  internal error: unexpected domain Domain-0 already exists

A simple fix is to load all domains from stateDir first and then only
add dom0 if needed.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/libxl/libxl_driver.c