diff options
author | Matt Hicks <mhicks@localhost.localdomain> | 2008-07-17 18:24:54 -0400 |
---|---|---|
committer | Matt Hicks <mhicks@localhost.localdomain> | 2008-07-18 14:09:46 -0400 |
commit | b5212c0ef95ae159d5f06c1d8f4f18bcda714105 (patch) | |
tree | 79565a2d7dfd84cb87ae5d60f4f07fc3fa03322d /func | |
parent | 6e0515892516782abd513c9d12554f8000906302 (diff) | |
download | func-b5212c0ef95ae159d5f06c1d8f4f18bcda714105.tar.gz func-b5212c0ef95ae159d5f06c1d8f4f18bcda714105.tar.xz func-b5212c0ef95ae159d5f06c1d8f4f18bcda714105.zip |
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.
Diffstat (limited to 'func')
-rw-r--r-- | func/minion/modules/virt.py | 11 |
1 files changed, 7 insertions, 4 deletions
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) |