From 525cfba36ef76ec282a88ee0251990d2802c5fe0 Mon Sep 17 00:00:00 2001 From: Matt Hicks Date: Thu, 17 Jul 2008 18:24:54 -0400 Subject: Switching from using 'virsh autostart' to manually creating the autostart link to allow for the autostart to work even when the VM is not running. --- func/minion/modules/virt.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'func/minion/modules/virt.py') diff --git a/func/minion/modules/virt.py b/func/minion/modules/virt.py index e6a896a..6cf8c31 100644 --- a/func/minion/modules/virt.py +++ b/func/minion/modules/virt.py @@ -197,10 +197,13 @@ class Virt(func_module.FuncModule): "/etc/xen/auto" ] else: - autostart_args = [ - "/usr/bin/virsh", - "autostart", - vm + # We aren't using virsh autostart because we want + # the command to work even when the VM isn't running + autostart_args = [ + "/bin/ln", + "-s", + "/etc/libvirt/qemu/%s.xml" % vm, + "/etc/libvirt/qemu/autostart/%s.xml" % vm ] return sub_process.call(autostart_args,shell=False,close_fds=True) -- cgit