virt-sandbox-service execute is not supported on qemu sandboxes.

Signed-off-by: Dan Walsh <dwa...@redhat.com>
---
 bin/virt-sandbox-service | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service
index 8c9ea76..7b0410a 100755
--- a/bin/virt-sandbox-service
+++ b/bin/virt-sandbox-service
@@ -928,6 +928,9 @@ def fullpath(cmd):
     return cmd
 
 def execute(args):
+    if args.uri != "lxc:///":
+        raise ValueError(_("Can only execute commands inside of linux 
containers."))
+
     myexec = [ "virsh", "-c", args.uri, "lxc-enter-namespace" ]
 #    myexec = [ "virt-sandbox-service-util", "execute" ]
     if args.noseclabel:
@@ -1074,7 +1077,7 @@ def gen_connect_args(subparser):
 
 def gen_execute_args(subparser):
     parser = subparser.add_parser("execute",
-                                  help=_("Execute a command within a sandbox 
container"))
+                                  help=_("Execute a command within a sandbox 
container. Only available for lxc:///"))
     parser.add_argument("-N", "--noseclabel", dest="noseclabel",
                         default=False, action="store_true",
                         help=_("do not modify the label of the executable 
process.  By default all commands execute with the label of the sandbox"))
-- 
1.8.2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to