Skip to content

Commit

Permalink
nixos.libvirtd: fix broken VMs due to emulator path changes
Browse files Browse the repository at this point in the history
This had already been fixed in f52f9bf,
but the problem was reintroduced in
bce59a1 because the path to the XML
files changed.

(cherry picked from commit af01fa7)
  • Loading branch information
wizeman authored and bjornfor committed Nov 3, 2016
1 parent a29900e commit 3f6c9cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nixos/modules/virtualisation/libvirtd.nix
Expand Up @@ -123,7 +123,7 @@ in {
# config file. But this path can unfortunately be garbage collected
# while still being used by the virtual machine. So update the
# emulator path on each startup to something valid (re-scan $PATH).
for file in /etc/libvirt/qemu/*.xml /etc/libvirt/lxc/*.xml; do
for file in /var/lib/libvirt/qemu/*.xml /var/lib/libvirt/lxc/*.xml; do
test -f "$file" || continue
# get (old) emulator path from config file
emulator=$(grep "^[[:space:]]*<emulator>" "$file" | sed 's,^[[:space:]]*<emulator>\(.*\)</emulator>.*,\1,')
Expand Down

0 comments on commit 3f6c9cc

Please sign in to comment.