From 4abcb52f6f950a1a7b43c1f12e3dfe208bc58055 Mon Sep 17 00:00:00 2001 From: Matt Hicks Date: Fri, 18 Jul 2008 12:02:03 -0400 Subject: We need to make sure the KVM autostart directory exists since it is dynamically created with 'virsh autostart'. In the case that you haven't run virsh autostart, the directory doesn't exist and makes the func module fail. --- func/minion/modules/virt.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'func') diff --git a/func/minion/modules/virt.py b/func/minion/modules/virt.py index ebc0a1c..2c68ab4 100644 --- a/func/minion/modules/virt.py +++ b/func/minion/modules/virt.py @@ -200,6 +200,15 @@ class Virt(func_module.FuncModule): "/etc/xen/auto" ] else: + # When using KVM, we need to make sure the autostart + # directory exists + mkdir_args = [ + "/bin/mkdir", + "-p", + "/etc/libvirt/qemu/autostart" + ] + sub_process.call(mkdir_args,shell=False,close_fds=True) + # We aren't using virsh autostart because we want # the command to work even when the VM isn't running autostart_args = [ -- cgit