Virt-sandbox-image will pass exact network arguments to virt-sandbox --- virt-sandbox-image/virt-sandbox-image.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/virt-sandbox-image/virt-sandbox-image.py b/virt-sandbox-image/virt-sandbox-image.py index c182874..058738a 100755 --- a/virt-sandbox-image/virt-sandbox-image.py +++ b/virt-sandbox-image/virt-sandbox-image.py @@ -145,9 +145,13 @@ def run(args): if args.connect is not None: cmd.append("-c") cmd.append(args.connect) - params = ['-m','host-image:/=%s,format=%s' %(diskfile,format), - '--', - commandToRun] + params = ['-m','host-image:/=%s,format=%s' %(diskfile,format)] + networkArgs = args.network + if networkArgs is not None: + params.append('-N') + params.append(networkArgs) + params.append('--') + params.append(commandToRun) cmd = cmd + params subprocess.call(cmd) subprocess.call(["rm", "-rf", diskfile]) @@ -228,6 +232,8 @@ def gen_run_args(subparser): help=_("Template directory for saving templates")) parser.add_argument("-i","--igniter", help=_("Igniter command for image")) + parser.add_argument("-n","--network", + help=_("Network params for running template")) parser.set_defaults(func=run) if __name__ == '__main__': -- 2.1.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list