run virsh connected to lxc
Thierry Parmentelat [Fri, 10 Jan 2014 10:28:22 +0000 (11:28 +0100)]
lxcsu

diff --git a/lxcsu b/lxcsu
index eb3c5ce..95e1bcd 100755 (executable)
--- a/lxcsu
+++ b/lxcsu
@@ -84,7 +84,7 @@ def main ():
                debug=True
 
        try:
-               cmd = '/usr/bin/virsh domid %s'%slice_name
+               cmd = '/usr/bin/virsh --connect lxc:/// domid %s'%slice_name
                pidnum = int(os.popen(cmd).read().rstrip())
        except:
                print "Error finding slice %s"%slice_name